Documentation ¶
Index ¶
- Variables
- type Client
- func (k *Client) Connect(ctx context.Context, conf *conf.GlobalConfiguration, topic string, ...) error
- func (k *Client) Consumer(ctx context.Context, reader *kafka.Reader, action func(kafka.Message))
- func (k *Client) NewReader(groupID, topic string, partition int) (*kafka.Reader, error)
- func (k *Client) TopicList() (map[string]struct{}, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Database var Database kf = &Client{} )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Config *kafka.Conn Messages chan *sarama.ConsumerMessage Errors chan *sarama.ConsumerError Count int // contains filtered or unexported fields }
Client struct
func (*Client) Connect ¶
func (k *Client) Connect(ctx context.Context, conf *conf.GlobalConfiguration, topic string, partition int) error
Connect is basic connection to kafka
Click to show internal directories.
Click to hide internal directories.