Documentation ¶
Overview ¶
Package kv contains Pair for holding <K,V> pairs as byte slices, and Codec for transforming <K,V> pairs into Pair and vice versa.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Codec ¶
type Codec struct { KType beam.EncodedType VType beam.EncodedType // contains filtered or unexported fields }
Codec provides functions for encoding a <K,V> pair into a Pair and decoding a Pair into a <K,V> pair. It can be used for performing <K,V> transforms. Whenever they are used inside a structural doFn, they should be an exported field in order for them to be serialized to JSON.
After initialization, Setup function should be called before any calls are made to Encode/Decode.
type DecodeFn ¶
type DecodeFn struct { KType beam.EncodedType VType beam.EncodedType // contains filtered or unexported fields }
DecodeFn transforms a PCollection<codedKV> into a PCollection<K,V>.
func NewDecodeFn ¶
NewDecodeFn returns a DecodeFn from given types.
func (*DecodeFn) ProcessElement ¶
ProcessElement decodes a Pair into a <K,V>.
type EncodeFn ¶
type EncodeFn struct { KType beam.EncodedType VType beam.EncodedType // contains filtered or unexported fields }
EncodeFn transforms a PCollection<K,V> into a PCollection<Pair>.
func NewEncodeFn ¶
NewEncodeFn returns an EncodeFn from given types.
func (*EncodeFn) ProcessElement ¶
ProcessElement encodes a <K,V> as a Pair.