Documentation ¶
Index ¶
- func PatchNewClient(client sarama.Client, err error) *monkey.PatchGuard
- func PatchNewSyncProducer(producer sarama.SyncProducer, err error) *monkey.PatchGuard
- type Client
- func (c *Client) Brokers() []*sarama.Broker
- func (c *Client) Close() error
- func (c *Client) Closed() bool
- func (c *Client) Config() *sarama.Config
- func (c *Client) Controller() (*sarama.Broker, error)
- func (c *Client) Coordinator(consumerGroup string) (*sarama.Broker, error)
- func (c *Client) GetOffset(topic string, partitionID int32, time int64) (int64, error)
- func (c *Client) InSyncReplicas(topic string, partitionID int32) ([]int32, error)
- func (c *Client) Leader(topic string, partitionID int32) (*sarama.Broker, error)
- func (c *Client) Partitions(topic string) ([]int32, error)
- func (c *Client) RefreshCoordinator(consumerGroup string) error
- func (c *Client) RefreshMetadata(topics ...string) error
- func (c *Client) Replicas(topic string, partitionID int32) ([]int32, error)
- func (c *Client) Topics() ([]string, error)
- func (c *Client) WritablePartitions(topic string) ([]int32, error)
- type SyncProducer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PatchNewClient ¶
func PatchNewClient(client sarama.Client, err error) *monkey.PatchGuard
func PatchNewSyncProducer ¶
func PatchNewSyncProducer(producer sarama.SyncProducer, err error) *monkey.PatchGuard
Types ¶
type Client ¶
type Client struct { ConfigFunc func() *sarama.Config ControllerFunc func() (*sarama.Broker, error) BrokersFunc func() []*sarama.Broker TopicsFunc func() ([]string, error) PartitionsFunc func(topic string) ([]int32, error) WritablePartitionsFunc func(topic string) ([]int32, error) LeaderFunc func(topic string, partitionID int32) (*sarama.Broker, error) ReplicasFunc func(topic string, partitionID int32) ([]int32, error) InSyncReplicasFunc func(topic string, partitionID int32) ([]int32, error) RefreshMetadataFunc func(topics ...string) error GetOffsetFunc func(topic string, partitionID int32, time int64) (int64, error) CoordinatorFunc func(consumerGroup string) (*sarama.Broker, error) RefreshCoordinatorFunc func(consumerGroup string) error CloseFunc func() error ClosedFunc func() bool }
func (*Client) Coordinator ¶
func (*Client) InSyncReplicas ¶
func (*Client) RefreshCoordinator ¶
func (*Client) RefreshMetadata ¶
type SyncProducer ¶
type SyncProducer struct { SendMessageFunc func(msg *sarama.ProducerMessage) (partition int32, offset int64, err error) SendMessagesFunc func(msgs []*sarama.ProducerMessage) error CloseFunc func() error }
func NewSyncProducer ¶
func NewSyncProducer() *SyncProducer
func (SyncProducer) Close ¶
func (p SyncProducer) Close() error
func (SyncProducer) SendMessage ¶
func (p SyncProducer) SendMessage(msg *sarama.ProducerMessage) (int32, int64, error)
func (SyncProducer) SendMessages ¶
func (p SyncProducer) SendMessages(msgs []*sarama.ProducerMessage) error
Click to show internal directories.
Click to hide internal directories.