Documentation ¶
Index ¶
- type AsyncProducer
- func (p *AsyncProducer) Emit(msg proto.Message) error
- func (p *AsyncProducer) EmitWithBytesKey(key []byte, msg proto.Message) error
- func (p *AsyncProducer) EmitWithPartition(partition int32, msg proto.Message) error
- func (p *AsyncProducer) EmitWithStringKey(key string, msg proto.Message) error
- func (p *AsyncProducer) Stop() error
- type Producer
- type ProducerConfig
- type SyncProducer
- func (p *SyncProducer) Emit(msg proto.Message) error
- func (p *SyncProducer) EmitWithBytesKey(key []byte, msg proto.Message) error
- func (p *SyncProducer) EmitWithPartition(partition int32, msg proto.Message) error
- func (p *SyncProducer) EmitWithStringKey(key string, msg proto.Message) error
- func (p *SyncProducer) Stop() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AsyncProducer ¶
type AsyncProducer struct {
// contains filtered or unexported fields
}
AsyncProducer struct
func (*AsyncProducer) Emit ¶
func (p *AsyncProducer) Emit(msg proto.Message) error
Emit a new log in PB format to the stream with the current timestamp
func (*AsyncProducer) EmitWithBytesKey ¶
func (p *AsyncProducer) EmitWithBytesKey(key []byte, msg proto.Message) error
EmitWithBytesKey emit a new log in PB format to the keyed stream with the current timestamp
func (*AsyncProducer) EmitWithPartition ¶
func (p *AsyncProducer) EmitWithPartition(partition int32, msg proto.Message) error
EmitWithPartition a new log in PB format to the given stream partition with the current timestamp
func (*AsyncProducer) EmitWithStringKey ¶
func (p *AsyncProducer) EmitWithStringKey(key string, msg proto.Message) error
EmitWithStringKey emit a new log in PB format to the keyed stream with the current timestamp
type Producer ¶
type Producer interface { Stop() error Emit(msg proto.Message) error EmitWithStringKey(key string, msg proto.Message) error EmitWithBytesKey(key []byte, msg proto.Message) error EmitWithPartition(partition int32, msg proto.Message) error }
Producer a event log producer that pushes events into Kinesis stream.
func NewProducer ¶
func NewProducer(conf *ProducerConfig) (Producer, error)
NewProducer create a new producer for the specified topic
type SyncProducer ¶
type SyncProducer struct {
// contains filtered or unexported fields
}
SyncProducer struct
func (*SyncProducer) Emit ¶
func (p *SyncProducer) Emit(msg proto.Message) error
Emit a new log in PB format to the stream with the current timestamp
func (*SyncProducer) EmitWithBytesKey ¶
func (p *SyncProducer) EmitWithBytesKey(key []byte, msg proto.Message) error
EmitWithBytesKey emit a new log in PB format to the keyed stream with the current timestamp
func (*SyncProducer) EmitWithPartition ¶
func (p *SyncProducer) EmitWithPartition(partition int32, msg proto.Message) error
EmitWithPartition a new log in PB format to the given stream partition with the current timestamp
func (*SyncProducer) EmitWithStringKey ¶
func (p *SyncProducer) EmitWithStringKey(key string, msg proto.Message) error
EmitWithStringKey emit a new log in PB format to the keyed stream with the current timestamp