Documentation
¶
Index ¶
- Variables
- type Acl
- type AdminClient
- func (c *AdminClient) ACLCreate(resource Resource, acls []Acl) error
- func (c *AdminClient) ACLDelete(acl string) ([]MatchingAcl, error)
- func (c *AdminClient) ACLList() (map[string]TopicDetail, error)
- func (c *AdminClient) GroupDelete(group string) error
- func (c *AdminClient) GroupDescribe(groups []string) ([]*GroupDescription, error)
- func (c *AdminClient) GroupList() (map[string]string, error)
- func (c *AdminClient) GroupOffsetDelete(group string, topic string, partition int32) error
- func (c *AdminClient) GroupOffsetsList(group string, topicPartitions map[string][]int32) (*OffsetFetchResponse, error)
- func (c *AdminClient) GroupRemoveMember(groupId string, groupInstanceIds []string) (*LeaveGroupResponse, error)
- func (c *AdminClient) PartitionCreate(topic string, count int32, assignment [][]int32) error
- func (c *AdminClient) PartitionReassignAlter(topic string, assignment [][]int32) error
- func (c *AdminClient) PartitionReassignList(topics string, partitions []int32) (map[string]map[int32]*PartitionReplicaReassignmentsStatus, error)
- func (c *AdminClient) TopicCreate(topic string, partitions int32, replicationFactor int16) error
- func (c *AdminClient) TopicDelete(topic string) error
- func (c *AdminClient) TopicList() (map[string]TopicDetail, error)
- type ByteEncoder
- type ConsumerClient
- func InitConsumer(addrs []string, offsetOldest, isSync, randomPart bool, retryMax int) (*ConsumerClient, error)
- func InitConsumerPlain(addrs []string, username, password string, ...) (*ConsumerClient, error)
- func InitConsumerScram(addrs []string, username, password string, ...) (*ConsumerClient, error)
- type ConsumerGroup
- type ConsumerGroupClient
- func InitConsumerGroup(addrs []string, groupID string, isSync, offsetOldest, randomPart bool, ...) (*ConsumerGroupClient, error)
- func InitConsumerGroupPlain(addrs []string, groupID, username, password string, ...) (*ConsumerGroupClient, error)
- func InitConsumerGroupScram(addrs []string, groupID, username, password string, ...) (*ConsumerGroupClient, error)
- type GroupDescription
- type LeaveGroupResponse
- type MatchingAcl
- type Message
- type OffsetFetchResponse
- type PartitionReplicaReassignmentsStatus
- type ProducerClient
- func InitProducer(addrs []string, isSync, randomPart bool, retryMax int) (*ProducerClient, error)
- func InitProducerPlain(addrs []string, username, password string, isSync, randomPart bool, ...) (*ProducerClient, error)
- func InitProducerScram(addrs []string, username, password string, isSync, randomPart bool, ...) (*ProducerClient, error)
- func (c *ProducerClient) ProducerCustom(msg Message) (partition int32, offset int64, err error)
- func (c *ProducerClient) ProducerCustoms(msgs []Message) (err error)
- func (c *ProducerClient) ProducerMessage(topic string, msg interface{}) (partition int32, offset int64, err error)
- func (c *ProducerClient) ProducerMessages(topic string, msgs []interface{}) (err error)
- type Resource
- type StringEncoder
- type TopicDetail
- type XDGSCRAMClient
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SHA256 scram.HashGeneratorFcn = sha256.New SHA512 scram.HashGeneratorFcn = sha512.New )
Functions ¶
This section is empty.
Types ¶
type AdminClient ¶
type AdminClient struct {
sarama.ClusterAdmin
}
func InitKafka ¶
func InitKafka(addrs []string, offsetOldest, isSync, randomPart bool, retryMax int) (*AdminClient, error)
func InitKafkaPlain ¶
func InitKafkaScram ¶
func (*AdminClient) ACLCreate ¶
func (c *AdminClient) ACLCreate(resource Resource, acls []Acl) error
func (*AdminClient) ACLDelete ¶
func (c *AdminClient) ACLDelete(acl string) ([]MatchingAcl, error)
func (*AdminClient) ACLList ¶
func (c *AdminClient) ACLList() (map[string]TopicDetail, error)
func (*AdminClient) GroupDelete ¶
func (c *AdminClient) GroupDelete(group string) error
func (*AdminClient) GroupDescribe ¶
func (c *AdminClient) GroupDescribe(groups []string) ([]*GroupDescription, error)
func (*AdminClient) GroupOffsetDelete ¶
func (c *AdminClient) GroupOffsetDelete(group string, topic string, partition int32) error
func (*AdminClient) GroupOffsetsList ¶
func (c *AdminClient) GroupOffsetsList(group string, topicPartitions map[string][]int32) (*OffsetFetchResponse, error)
func (*AdminClient) GroupRemoveMember ¶
func (c *AdminClient) GroupRemoveMember(groupId string, groupInstanceIds []string) (*LeaveGroupResponse, error)
func (*AdminClient) PartitionCreate ¶
func (c *AdminClient) PartitionCreate(topic string, count int32, assignment [][]int32) error
func (*AdminClient) PartitionReassignAlter ¶
func (c *AdminClient) PartitionReassignAlter(topic string, assignment [][]int32) error
func (*AdminClient) PartitionReassignList ¶
func (c *AdminClient) PartitionReassignList(topics string, partitions []int32) (map[string]map[int32]*PartitionReplicaReassignmentsStatus, error)
func (*AdminClient) TopicCreate ¶
func (c *AdminClient) TopicCreate(topic string, partitions int32, replicationFactor int16) error
func (*AdminClient) TopicDelete ¶
func (c *AdminClient) TopicDelete(topic string) error
func (*AdminClient) TopicList ¶
func (c *AdminClient) TopicList() (map[string]TopicDetail, error)
type ByteEncoder ¶
type ByteEncoder sarama.ByteEncoder
func (ByteEncoder) Encode ¶
func (b ByteEncoder) Encode() ([]byte, error)
func (ByteEncoder) Length ¶
func (b ByteEncoder) Length() int
type ConsumerClient ¶
func InitConsumer ¶
func InitConsumer(addrs []string, offsetOldest, isSync, randomPart bool, retryMax int) (*ConsumerClient, error)
func InitConsumerPlain ¶
func InitConsumerScram ¶
func (*ConsumerClient) ConsumerMessage ¶
func (c *ConsumerClient) ConsumerMessage(topic string, partition int32) (value []byte, err error)
func (*ConsumerClient) ConsumerMessages ¶
func (c *ConsumerClient) ConsumerMessages(topic string, fn func(message []byte) error) (err error)
type ConsumerGroup ¶
func (*ConsumerGroup) Cleanup ¶
func (c *ConsumerGroup) Cleanup(session sarama.ConsumerGroupSession) error
func (*ConsumerGroup) ConsumeClaim ¶
func (c *ConsumerGroup) ConsumeClaim(session sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error
func (*ConsumerGroup) Setup ¶
func (c *ConsumerGroup) Setup(session sarama.ConsumerGroupSession) error
type ConsumerGroupClient ¶
type ConsumerGroupClient struct {
sarama.ConsumerGroup
}
func InitConsumerGroup ¶
func InitConsumerGroupPlain ¶
func InitConsumerGroupScram ¶
func (*ConsumerGroupClient) ConsumerCustom ¶
func (c *ConsumerGroupClient) ConsumerCustom(topics []string, handler ConsumerGroup) (err error)
func (*ConsumerGroupClient) ConsumerMessage ¶
func (c *ConsumerGroupClient) ConsumerMessage(topics []string) (value []byte, err error)
func (*ConsumerGroupClient) ConsumerMessages ¶
func (c *ConsumerGroupClient) ConsumerMessages(topics []string, msgSize int) (value [][]byte, err error)
type GroupDescription ¶
type GroupDescription struct {
sarama.GroupDescription
}
type LeaveGroupResponse ¶
type LeaveGroupResponse struct {
sarama.LeaveGroupResponse
}
type MatchingAcl ¶
type MatchingAcl struct {
sarama.MatchingAcl
}
type Message ¶
type Message struct {
sarama.ProducerMessage
}
type OffsetFetchResponse ¶
type OffsetFetchResponse struct {
sarama.OffsetFetchResponse
}
type PartitionReplicaReassignmentsStatus ¶
type PartitionReplicaReassignmentsStatus struct {
sarama.PartitionReplicaReassignmentsStatus
}
type ProducerClient ¶
type ProducerClient struct {
sarama.SyncProducer
}
func InitProducer ¶
func InitProducer(addrs []string, isSync, randomPart bool, retryMax int) (*ProducerClient, error)
func InitProducerPlain ¶
func InitProducerScram ¶
func (*ProducerClient) ProducerCustom ¶
func (c *ProducerClient) ProducerCustom(msg Message) (partition int32, offset int64, err error)
func (*ProducerClient) ProducerCustoms ¶
func (c *ProducerClient) ProducerCustoms(msgs []Message) (err error)
func (*ProducerClient) ProducerMessage ¶
func (c *ProducerClient) ProducerMessage(topic string, msg interface{}) (partition int32, offset int64, err error)
func (*ProducerClient) ProducerMessages ¶
func (c *ProducerClient) ProducerMessages(topic string, msgs []interface{}) (err error)
type StringEncoder ¶
type StringEncoder sarama.StringEncoder
func (StringEncoder) Encode ¶
func (s StringEncoder) Encode() ([]byte, error)
func (StringEncoder) Length ¶
func (s StringEncoder) Length() int
type TopicDetail ¶
type TopicDetail struct {
sarama.TopicDetail
}
type XDGSCRAMClient ¶
type XDGSCRAMClient struct { *scram.Client *scram.ClientConversation scram.HashGeneratorFcn }
func (*XDGSCRAMClient) Begin ¶
func (x *XDGSCRAMClient) Begin(userName, password, authzID string) (err error)
func (*XDGSCRAMClient) Done ¶
func (x *XDGSCRAMClient) Done() bool
Click to show internal directories.
Click to hide internal directories.