Documentation ¶
Index ¶
- type Client
- func (g *Client) Close() error
- func (g *Client) FetchData(topic string, part int32, offset int64, n int32, timeout time.Duration) ([]*sarama.ConsumerMessage, error)
- func (g *Client) ListGroups() ([]*sarama.GroupDescription, error)
- func (g *Client) OffsetRange(topic string, part int32) (int64, int64, error)
- func (g *Client) TopicInfos(topics ...string) ([]*sarama.TopicMetadata, error)
- func (g *Client) TopicNames() ([]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is simplified Kafka client to manage and inspect Kafka topic
func NewClient ¶
NewClient connects to the specified brokers. You should close the client after using it.
func (*Client) FetchData ¶
func (g *Client) FetchData(topic string, part int32, offset int64, n int32, timeout time.Duration) ([]*sarama.ConsumerMessage, error)
FetchData fetches messages within specific offset range of single partition The main purpose of this function is to access to any single topic partition's data in random access manner.
func (*Client) ListGroups ¶
func (g *Client) ListGroups() ([]*sarama.GroupDescription, error)
func (*Client) OffsetRange ¶
OffsetRange returns min/max offset of the single partition
func (*Client) TopicInfos ¶
func (g *Client) TopicInfos(topics ...string) ([]*sarama.TopicMetadata, error)
TopicInfos returns status and other useful informations of requested topics.
func (*Client) TopicNames ¶
TopicNames returns list of topic from the connected cluster
Click to show internal directories.
Click to hide internal directories.