Documentation
¶
Index ¶
- type Option
- type Options
- type Transport
- func (t *Transport) Close()
- func (t *Transport) Handle(path string, group string, handler func([]byte, func([]byte))) error
- func (t *Transport) Listen(callback func())
- func (t *Transport) OnClose(handler interface{})
- func (t *Transport) Publish(topic string, data []byte) error
- func (t *Transport) Request(path string, payload []byte, timeOut int) ([]byte, error)
- func (t *Transport) Subscribe(topic, serviceName string, handler func([]byte)) error
- func (t *Transport) SubscribeForRawMsg(topic, serviceName string, handler func(interface{})) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct { URL string TopicPartition int TopicReplicationFactor int ProducerPartition int32 ConsumerGroupID string SocketTimeout string Offset string Consumer *kafka.Consumer Producer *kafka.Producer }
Options for kafka transport
type Transport ¶
type Transport struct {
// contains filtered or unexported fields
}
Transport object
func (*Transport) OnClose ¶
func (t *Transport) OnClose(handler interface{})
OnClose adds a handler when the transport is closed. Passes error as an argument
func (*Transport) SubscribeForRawMsg ¶
SubscribeForRawMsg for topic Messages have te be committed manually
Click to show internal directories.
Click to hide internal directories.