January 2020
Intermediate to advanced
640 pages
16h 56m
English
The first and most crucial question we need to answer before we begin working on the pipeline package implementation is how can we describe pipeline payloads in a generic way using Go?
The kind of obvious answer to this question is to define payloads as empty interface values (an interface{} in Go terminology). The key argument in favor of this approach is that the pipeline internals shouldn't really care about payloads per se; all the pipeline needs to do is shuttle payloads between the various pipeline stages.
The interpretation of the payload contents (for example, by casting the input to a known type) should be the sole responsibility of the processing functions that execute at each stage. Given that the processing ...