Documentation ¶
Index ¶
- func Concurrency(j int) func(*Client)
- func WithDecoder(d Decoder) func(*Client)
- type Client
- func (c *Client) Close()
- func (c *Client) Fetch(info Partition, end int64, cb func(string)) error
- func (c *Client) GetPartition(part Partition, end int, f func([]byte) bool) ([]Message, error)
- func (c *Client) GetTopic(topic string) ([]Partition, error)
- func (c *Client) GetTopics() ([]string, error)
- func (c *Client) Search(info Partition, s string, cb func(i, j int64)) (int64, error)
- func (c *Client) SearchTopic(partitions []Partition, s string, firstResult bool, cb func(int64, int64)) ([]Partition, error)
- type Decoder
- type Message
- type Opt
- type Partition
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Concurrency ¶
Concurrency is used to set the size of the search worker pool
func WithDecoder ¶
WithDecoder is used to insert a Decoder plugin
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client fetches from kafka
func (*Client) GetPartition ¶
GetPartition fetches a kafka partition. It includes a callback func so that the caller can tell it when to stop consuming.
type Message ¶
type Message struct { Partition Partition `json:"partition"` Value []byte `json:"msg"` Offset int64 `json:"offset"` }
Message holds information about a single kafka message
Click to show internal directories.
Click to hide internal directories.