Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reader ¶
type Reader interface { // RegisterHandler adds an event handler that will perform some action // when an event with the given ID is received. Must be called before // calling Listen. RegisterHandler(event EventID, handler StreamEventHandler) error // Listen will listen for incoming events and route them internally. // This is a blocking call. Listen(ctx context.Context) error }
type Serializer ¶
Serializer is something that can Serialize to a writer, such as an Avro object
type Writer ¶
type Writer interface { // Close gives underlying resources a chance to flush and close gracefully Close() error // Write will write a payload to the stream with the given event ID using // the given key to send to the correct partition. // // Note that the key is a Kafka primary key which will dictate the partition // and order guarantees for the event. For example, the User ID should be used // on all events that have to do with a particular User. Write(ctx context.Context, key []byte, eventID EventID, payload Serializer) error }
func NewKafkaStreamWriter ¶
Click to show internal directories.
Click to hide internal directories.