Output is the final end of a topology, it process the records that have reached the end of the filter chain and performs the final action (storing, sending through the wire, counting, etc.)
| 103 | // reached the end of the filter chain and performs the final action (storing, |
| 104 | // sending through the wire, counting, etc.) |
| 105 | type Output interface { |
| 106 | // Run processes the OutputRecord data coming through a channel. |
| 107 | // Run must block until in channel has been closed and it has processed |
| 108 | // all records. |
| 109 | // It can send filenames via upch, they will be handled by an Upload if one |
| 110 | // is present in the topology. |
| 111 | // TODO: since Run must be blocking, it could return an error, useful |
| 112 | // for the topology to acknowledge the correct processing if nil, or |
| 113 | // end the whole topology in case non-nil. |
| 114 | Run(in <-chan OutputRecord, upch chan<- string) error |
| 115 | |
| 116 | // Stats returns stats about the output. |
| 117 | Stats() OutputStats |
| 118 | |
| 119 | // CanShards returns true if this output supports sharding. |
| 120 | CanShard() bool |
| 121 | } |
| 122 | |
| 123 | // OutputRecord is the data structure sent to baker output components. |
| 124 | // |
no outgoing calls
no test coverage detected