kafkas

package
v0.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Acl

type Acl struct {
	sarama.Acl
}

type AdminClient

type AdminClient struct {
	sarama.ClusterAdmin
}

func InitKafka

func InitKafka(addrs []string, offsetOldest, isSync, randomPart bool, retryMax int) (*AdminClient, error)

func InitKafkaPlain

func InitKafkaPlain(addrs []string, username, password string, offsetOldest, isSync, randomPart bool, retryMax int) (*AdminClient, error)

func InitKafkaScram

func InitKafkaScram(addrs []string, username, password string, offsetOldest, isSync, randomPart bool, retryMax int) (*AdminClient, error)

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) GroupList

func (c *AdminClient) GroupList() (map[string]string, 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

type ConsumerClient struct {
	sarama.Consumer
	Offset int64
}

func InitConsumer

func InitConsumer(addrs []string, offsetOldest, isSync, randomPart bool, retryMax int) (*ConsumerClient, error)

func InitConsumerPlain

func InitConsumerPlain(addrs []string, username, password string, offsetOldest, isSync, randomPart bool, retryMax int) (*ConsumerClient, error)

func InitConsumerScram

func InitConsumerScram(addrs []string, username, password string, offsetOldest, isSync, randomPart bool, retryMax int) (*ConsumerClient, error)

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

type ConsumerGroup struct {
	Size     int
	Messages [][]byte
}

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 InitConsumerGroup(addrs []string, groupID string, isSync, offsetOldest, randomPart bool, retryMax int) (*ConsumerGroupClient, error)

func InitConsumerGroupPlain

func InitConsumerGroupPlain(addrs []string, groupID, username, password string, isSync, offsetOldest, randomPart bool, retryMax int) (*ConsumerGroupClient, error)

func InitConsumerGroupScram

func InitConsumerGroupScram(addrs []string, groupID, username, password string, isSync, offsetOldest, randomPart bool, retryMax int) (*ConsumerGroupClient, error)

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 InitProducerPlain(addrs []string, username, password string, isSync, randomPart bool, retryMax int) (*ProducerClient, error)

func InitProducerScram

func InitProducerScram(addrs []string, username, password string, isSync, randomPart bool, retryMax int) (*ProducerClient, error)

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 Resource

type Resource struct {
	sarama.Resource
}

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

func (*XDGSCRAMClient) Step

func (x *XDGSCRAMClient) Step(challenge string) (response string, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL