MCPcopy Create free account
hub / github.com/AdRoll/baker / Run

Method Run

examples/sharding/output.go:35–44  ·  view source on GitHub ↗
(input <-chan baker.OutputRecord, _ chan<- string)

Source from the content-addressed store, hash-verified

33}
34
35func (s *Shardable) Run(input <-chan baker.OutputRecord, _ chan<- string) error {
36 // Do something with `input` record.
37 // s.idx identifies the output process index and should
38 // be used to manage the sharding
39 for data := range input {
40 log.Printf(`Shard #%d: Getting "%s"`, s.idx, data.Record)
41 }
42
43 return nil
44}
45
46func (s *Shardable) Stats() baker.OutputStats { return baker.OutputStats{} }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected