Documentation ¶
Index ¶
- type Message
- type Subscription
- type Topic
- func (t *Topic) AnnounceSubscription(consumerName string, partitionNumber int) error
- func (t *Topic) GetConsumerOffset(consumerName string, partitionNumber int) (int64, error)
- func (t Topic) GetName() TopicName
- func (t Topic) GetPartitions() int
- func (t *Topic) GetTopicMetadata(topicName string) error
- func (t *Topic) Put(data string) (string, string)
- func (t *Topic) PutBatch(data []string) ([]string, []string)
- func (t *Topic) ScramblePartitions() []int
- func (t *Topic) Subscribe(consumerName string) ([]Subscription, error)
- func (t *Topic) SubscribeToPartition(consumerName string, partitionNumber int, offset int64) (Subscription, error)
- type TopicName
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Subscription ¶
type Subscription struct { Messages chan Message Shutdown chan bool ConsumerName string Topic Topic Partition int }
func (*Subscription) CommitOffset ¶
func (s *Subscription) CommitOffset(offset int64) error
func (*Subscription) KeepSubscriptionAlive ¶
func (s *Subscription) KeepSubscriptionAlive() chan bool
func (*Subscription) Unsubscribe ¶
func (s *Subscription) Unsubscribe()
type Topic ¶
type Topic struct { Name TopicName Partitions int MaxMessages int64 TTL time.Duration // contains filtered or unexported fields }
func CreateTopic ¶
func (*Topic) AnnounceSubscription ¶
func (*Topic) GetConsumerOffset ¶
func (Topic) GetPartitions ¶
func (*Topic) GetTopicMetadata ¶
func (*Topic) PutBatch ¶
PutBatch sends values to a given topic. Returns the successful and failed requests.
func (*Topic) ScramblePartitions ¶
func (*Topic) SubscribeToPartition ¶
Click to show internal directories.
Click to hide internal directories.