Documentation ¶
Index ¶
Constants ¶
View Source
const SumsJournal pb.Journal = "examples/stream-sum/sums"
Variables ¶
View Source
var SumsMapping message.MappingFunc = func(msg message.Message) (pb.Journal, message.Framing, error) { return SumsJournal, message.JSONFraming, nil }
Functions ¶
func FillPRNG ¶
FillPRNG generates fast but high-quality random entropy into the provided byte slice.
func NewChunkMapping ¶
func NewChunkMapping(ctx context.Context, jc pb.JournalClient) (message.MappingFunc, error)
Types ¶
type Chunk ¶
type Chunk struct { ID StreamID // Unique ID of the stream. SeqNo int // Monotonic sequence number. One begins a new stream under this unique StreamID. Data []byte // Raw data included in the Value. If empty, this is the stream's final chunk. }
Chunk is an ordered slice of stream content.
Click to show internal directories.
Click to hide internal directories.