Documentation
¶
Index ¶
- Constants
- Variables
- type Consumer
- func (c *Consumer) ACK(token, group, topic string, partition int32, offset int64) error
- func (c *Consumer) Consume(group, topic string, timeout, ttr time.Duration) (message *sarama.ConsumerMessage, err error)
- func (c *Consumer) Export(group string) (map[string]interface{}, error)
- func (c *Consumer) GetConsumerGroup(group string) *consumerGroup
- func (c *Consumer) GetConsumerGroupState(group string) (string, error)
- func (c *Consumer) GetMetadataByName(group string) *GroupMetadata
- func (c *Consumer) ListConsumerGroup() []string
- func (c *Consumer) ReleaseConsumerGroups()
- func (c *Consumer) Start() error
- func (c *Consumer) Stop()
- func (c *Consumer) UpdateConsumerGroupState(group string, stopped bool) error
- type GroupMetadata
- type Puller
- type TopicUnackManager
Constants ¶
View Source
const ( SemanticAtMostOnce = "atMostOnce" SemanticAtLeastOnce = "atLeastOnce" OwnerName = "kaproxy" )
View Source
const (
PeerProxyID = "__peer_proxy__"
)
Variables ¶
View Source
var ( ErrGroupStopped = errors.New("consumer group was stopped") ErrGroupNotFound = errors.New("consumer group not found") ErrTopicNotFound = errors.New("topic not found in this consumer group") ErrNoMessage = errors.New("no message in brokers") ErrUnackManagerStopped = errors.New("unack manager was stopped") ErrUnackMessageNotFound = errors.New("unack message not found") ErrGroupNotAllowACK = errors.New("consumer group is not allowed to be acknowledged") ErrNoPartition = errors.New("consumer group doesn't claim any partition") ErrNoPeer = errors.New("no peer can pull message") )
Functions ¶
This section is empty.
Types ¶
type Consumer ¶
type Consumer struct { Puller *Puller // contains filtered or unexported fields }
func NewConsumer ¶
func (*Consumer) GetConsumerGroup ¶
func (*Consumer) GetConsumerGroupState ¶
func (*Consumer) GetMetadataByName ¶
func (c *Consumer) GetMetadataByName(group string) *GroupMetadata
func (*Consumer) ListConsumerGroup ¶
func (*Consumer) ReleaseConsumerGroups ¶
func (c *Consumer) ReleaseConsumerGroups()
type GroupMetadata ¶
type Puller ¶
type Puller struct {
// contains filtered or unexported fields
}
func (*Puller) PullFromPeers ¶
type TopicUnackManager ¶
type TopicUnackManager struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.