Documentation ¶
Index ¶
- Constants
- type MockKafkaClient
- func (m MockKafkaClient) Broker(brokerID int32) (*sarama.Broker, error)
- func (m MockKafkaClient) Brokers() []*sarama.Broker
- func (m *MockKafkaClient) Close() error
- func (m MockKafkaClient) Closed() bool
- func (m MockKafkaClient) Config() *sarama.Config
- func (m MockKafkaClient) Controller() (*sarama.Broker, error)
- func (m MockKafkaClient) Coordinator(consumerGroup string) (*sarama.Broker, error)
- func (m MockKafkaClient) GetOffset(topic string, partitionID int32, time int64) (int64, error)
- func (m MockKafkaClient) InSyncReplicas(topic string, partitionID int32) ([]int32, error)
- func (m MockKafkaClient) InitProducerID() (*sarama.InitProducerIDResponse, error)
- func (m MockKafkaClient) Leader(topic string, partitionID int32) (*sarama.Broker, error)
- func (m MockKafkaClient) LeaderAndEpoch(topic string, partitionID int32) (*sarama.Broker, int32, error)
- func (m MockKafkaClient) LeastLoadedBroker() *sarama.Broker
- func (m MockKafkaClient) OfflineReplicas(topic string, partitionID int32) ([]int32, error)
- func (m MockKafkaClient) Partitions(topic string) ([]int32, error)
- func (m MockKafkaClient) RefreshBrokers(addrs []string) error
- func (m MockKafkaClient) RefreshController() (*sarama.Broker, error)
- func (m MockKafkaClient) RefreshCoordinator(consumerGroup string) error
- func (m MockKafkaClient) RefreshMetadata(topics ...string) error
- func (m MockKafkaClient) RefreshTransactionCoordinator(transactionID string) error
- func (m MockKafkaClient) Replicas(topic string, partitionID int32) ([]int32, error)
- func (m MockKafkaClient) Topics() ([]string, error)
- func (m MockKafkaClient) TransactionCoordinator(transactionID string) (*sarama.Broker, error)
- func (m MockKafkaClient) WritablePartitions(topic string) ([]int32, error)
- type MockKafkaClusterAdmin
- func (m *MockKafkaClusterAdmin) AlterClientQuotas(entity []sarama.QuotaEntityComponent, op sarama.ClientQuotasOp, ...) error
- func (m *MockKafkaClusterAdmin) AlterConfig(resourceType sarama.ConfigResourceType, name string, ...) error
- func (m *MockKafkaClusterAdmin) AlterPartitionReassignments(topic string, assignment [][]int32) error
- func (m *MockKafkaClusterAdmin) Close() error
- func (m *MockKafkaClusterAdmin) Controller() (*sarama.Broker, error)
- func (m *MockKafkaClusterAdmin) CreateACL(resource sarama.Resource, acl sarama.Acl) error
- func (m *MockKafkaClusterAdmin) CreateACLs(acls []*sarama.ResourceAcls) error
- func (m *MockKafkaClusterAdmin) CreatePartitions(topic string, count int32, assignment [][]int32, validateOnly bool) error
- func (m *MockKafkaClusterAdmin) CreateTopic(topic string, detail *sarama.TopicDetail, validateOnly bool) error
- func (m *MockKafkaClusterAdmin) DeleteACL(filter sarama.AclFilter, validateOnly bool) ([]sarama.MatchingAcl, error)
- func (m *MockKafkaClusterAdmin) DeleteConsumerGroup(group string) error
- func (m *MockKafkaClusterAdmin) DeleteConsumerGroupOffset(group string, topic string, partition int32) error
- func (m *MockKafkaClusterAdmin) DeleteRecords(topic string, partitionOffsets map[int32]int64) error
- func (m *MockKafkaClusterAdmin) DeleteTopic(topic string) error
- func (m *MockKafkaClusterAdmin) DeleteUserScramCredentials(delete []sarama.AlterUserScramCredentialsDelete) ([]*sarama.AlterUserScramCredentialsResult, error)
- func (m *MockKafkaClusterAdmin) DescribeClientQuotas(components []sarama.QuotaFilterComponent, strict bool) ([]sarama.DescribeClientQuotasEntry, error)
- func (m *MockKafkaClusterAdmin) DescribeCluster() (brokers []*sarama.Broker, controllerID int32, err error)
- func (m *MockKafkaClusterAdmin) DescribeConfig(resource sarama.ConfigResource) ([]sarama.ConfigEntry, error)
- func (m *MockKafkaClusterAdmin) DescribeConsumerGroups(groups []string) ([]*sarama.GroupDescription, error)
- func (m *MockKafkaClusterAdmin) DescribeLogDirs(brokers []int32) (map[int32][]sarama.DescribeLogDirsResponseDirMetadata, error)
- func (m *MockKafkaClusterAdmin) DescribeTopics(topics []string) (metadata []*sarama.TopicMetadata, err error)
- func (m *MockKafkaClusterAdmin) DescribeUserScramCredentials(users []string) ([]*sarama.DescribeUserScramCredentialsResult, error)
- func (m *MockKafkaClusterAdmin) IncrementalAlterConfig(resourceType sarama.ConfigResourceType, name string, ...) error
- func (m *MockKafkaClusterAdmin) ListAcls(filter sarama.AclFilter) ([]sarama.ResourceAcls, error)
- func (m *MockKafkaClusterAdmin) ListConsumerGroupOffsets(group string, topicPartitions map[string][]int32) (*sarama.OffsetFetchResponse, error)
- func (m *MockKafkaClusterAdmin) ListConsumerGroups() (map[string]string, error)
- func (m *MockKafkaClusterAdmin) ListPartitionReassignments(topics string, partitions []int32) (topicStatus map[string]map[int32]*sarama.PartitionReplicaReassignmentsStatus, ...)
- func (m *MockKafkaClusterAdmin) ListTopics() (map[string]sarama.TopicDetail, error)
- func (m *MockKafkaClusterAdmin) RemoveMemberFromConsumerGroup(groupId string, groupInstanceIds []string) (*sarama.LeaveGroupResponse, error)
- func (m *MockKafkaClusterAdmin) UpsertUserScramCredentials(upsert []sarama.AlterUserScramCredentialsUpsert) ([]*sarama.AlterUserScramCredentialsResult, error)
Constants ¶
View Source
const (
ErrorOnDeleteConsumerGroupTestKey = "error-on-delete-consumer-group"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockKafkaClient ¶
func (MockKafkaClient) Broker ¶
func (m MockKafkaClient) Broker(brokerID int32) (*sarama.Broker, error)
func (MockKafkaClient) Brokers ¶
func (m MockKafkaClient) Brokers() []*sarama.Broker
func (*MockKafkaClient) Close ¶
func (m *MockKafkaClient) Close() error
func (MockKafkaClient) Closed ¶
func (m MockKafkaClient) Closed() bool
func (MockKafkaClient) Config ¶
func (m MockKafkaClient) Config() *sarama.Config
func (MockKafkaClient) Controller ¶
func (m MockKafkaClient) Controller() (*sarama.Broker, error)
func (MockKafkaClient) Coordinator ¶
func (m MockKafkaClient) Coordinator(consumerGroup string) (*sarama.Broker, error)
func (MockKafkaClient) InSyncReplicas ¶
func (m MockKafkaClient) InSyncReplicas(topic string, partitionID int32) ([]int32, error)
func (MockKafkaClient) InitProducerID ¶
func (m MockKafkaClient) InitProducerID() (*sarama.InitProducerIDResponse, error)
func (MockKafkaClient) LeaderAndEpoch ¶ added in v0.39.0
func (MockKafkaClient) LeastLoadedBroker ¶ added in v0.35.0
func (m MockKafkaClient) LeastLoadedBroker() *sarama.Broker
func (MockKafkaClient) OfflineReplicas ¶
func (m MockKafkaClient) OfflineReplicas(topic string, partitionID int32) ([]int32, error)
func (MockKafkaClient) Partitions ¶
func (m MockKafkaClient) Partitions(topic string) ([]int32, error)
func (MockKafkaClient) RefreshBrokers ¶
func (m MockKafkaClient) RefreshBrokers(addrs []string) error
func (MockKafkaClient) RefreshController ¶
func (m MockKafkaClient) RefreshController() (*sarama.Broker, error)
func (MockKafkaClient) RefreshCoordinator ¶
func (m MockKafkaClient) RefreshCoordinator(consumerGroup string) error
func (MockKafkaClient) RefreshMetadata ¶
func (m MockKafkaClient) RefreshMetadata(topics ...string) error
func (MockKafkaClient) RefreshTransactionCoordinator ¶ added in v0.35.0
func (m MockKafkaClient) RefreshTransactionCoordinator(transactionID string) error
func (MockKafkaClient) Replicas ¶
func (m MockKafkaClient) Replicas(topic string, partitionID int32) ([]int32, error)
func (MockKafkaClient) Topics ¶
func (m MockKafkaClient) Topics() ([]string, error)
func (MockKafkaClient) TransactionCoordinator ¶ added in v0.35.0
func (m MockKafkaClient) TransactionCoordinator(transactionID string) (*sarama.Broker, error)
func (MockKafkaClient) WritablePartitions ¶
func (m MockKafkaClient) WritablePartitions(topic string) ([]int32, error)
type MockKafkaClusterAdmin ¶
type MockKafkaClusterAdmin struct { // (Create|Delete)Topic ExpectedTopicName string // CreateTopic ExpectedTopicDetail sarama.TopicDetail ErrorOnCreateTopic error // DeleteTopic ErrorOnDeleteTopic error ExpectedClose bool ExpectedCloseError error // DescribeTopics ExpectedTopics []string ExpectedErrorOnDescribeTopics error ExpectedTopicsMetadataOnDescribeTopics []*sarama.TopicMetadata // DescribeConsumerGroups ExpectedConsumerGroups []string ExpectedErrorOnDescribeConsumerGroups error ExpectedGroupDescriptionOnDescribeConsumerGroups []*sarama.GroupDescription ErrorOnDeleteConsumerGroup error T *testing.T }
func (*MockKafkaClusterAdmin) AlterClientQuotas ¶
func (m *MockKafkaClusterAdmin) AlterClientQuotas(entity []sarama.QuotaEntityComponent, op sarama.ClientQuotasOp, validateOnly bool) error
func (*MockKafkaClusterAdmin) AlterConfig ¶
func (m *MockKafkaClusterAdmin) AlterConfig(resourceType sarama.ConfigResourceType, name string, entries map[string]*string, validateOnly bool) error
func (*MockKafkaClusterAdmin) AlterPartitionReassignments ¶
func (m *MockKafkaClusterAdmin) AlterPartitionReassignments(topic string, assignment [][]int32) error
func (*MockKafkaClusterAdmin) Close ¶
func (m *MockKafkaClusterAdmin) Close() error
func (*MockKafkaClusterAdmin) Controller ¶
func (m *MockKafkaClusterAdmin) Controller() (*sarama.Broker, error)
func (*MockKafkaClusterAdmin) CreateACLs ¶ added in v0.33.0
func (m *MockKafkaClusterAdmin) CreateACLs(acls []*sarama.ResourceAcls) error
func (*MockKafkaClusterAdmin) CreatePartitions ¶
func (*MockKafkaClusterAdmin) CreateTopic ¶
func (m *MockKafkaClusterAdmin) CreateTopic(topic string, detail *sarama.TopicDetail, validateOnly bool) error
func (*MockKafkaClusterAdmin) DeleteACL ¶
func (m *MockKafkaClusterAdmin) DeleteACL(filter sarama.AclFilter, validateOnly bool) ([]sarama.MatchingAcl, error)
func (*MockKafkaClusterAdmin) DeleteConsumerGroup ¶
func (m *MockKafkaClusterAdmin) DeleteConsumerGroup(group string) error
func (*MockKafkaClusterAdmin) DeleteConsumerGroupOffset ¶
func (m *MockKafkaClusterAdmin) DeleteConsumerGroupOffset(group string, topic string, partition int32) error
func (*MockKafkaClusterAdmin) DeleteRecords ¶
func (m *MockKafkaClusterAdmin) DeleteRecords(topic string, partitionOffsets map[int32]int64) error
func (*MockKafkaClusterAdmin) DeleteTopic ¶
func (m *MockKafkaClusterAdmin) DeleteTopic(topic string) error
func (*MockKafkaClusterAdmin) DeleteUserScramCredentials ¶
func (m *MockKafkaClusterAdmin) DeleteUserScramCredentials(delete []sarama.AlterUserScramCredentialsDelete) ([]*sarama.AlterUserScramCredentialsResult, error)
func (*MockKafkaClusterAdmin) DescribeClientQuotas ¶
func (m *MockKafkaClusterAdmin) DescribeClientQuotas(components []sarama.QuotaFilterComponent, strict bool) ([]sarama.DescribeClientQuotasEntry, error)
func (*MockKafkaClusterAdmin) DescribeCluster ¶
func (m *MockKafkaClusterAdmin) DescribeCluster() (brokers []*sarama.Broker, controllerID int32, err error)
func (*MockKafkaClusterAdmin) DescribeConfig ¶
func (m *MockKafkaClusterAdmin) DescribeConfig(resource sarama.ConfigResource) ([]sarama.ConfigEntry, error)
func (*MockKafkaClusterAdmin) DescribeConsumerGroups ¶
func (m *MockKafkaClusterAdmin) DescribeConsumerGroups(groups []string) ([]*sarama.GroupDescription, error)
func (*MockKafkaClusterAdmin) DescribeLogDirs ¶
func (m *MockKafkaClusterAdmin) DescribeLogDirs(brokers []int32) (map[int32][]sarama.DescribeLogDirsResponseDirMetadata, error)
func (*MockKafkaClusterAdmin) DescribeTopics ¶
func (m *MockKafkaClusterAdmin) DescribeTopics(topics []string) (metadata []*sarama.TopicMetadata, err error)
func (*MockKafkaClusterAdmin) DescribeUserScramCredentials ¶
func (m *MockKafkaClusterAdmin) DescribeUserScramCredentials(users []string) ([]*sarama.DescribeUserScramCredentialsResult, error)
func (*MockKafkaClusterAdmin) IncrementalAlterConfig ¶
func (m *MockKafkaClusterAdmin) IncrementalAlterConfig(resourceType sarama.ConfigResourceType, name string, entries map[string]sarama.IncrementalAlterConfigsEntry, validateOnly bool) error
func (*MockKafkaClusterAdmin) ListAcls ¶
func (m *MockKafkaClusterAdmin) ListAcls(filter sarama.AclFilter) ([]sarama.ResourceAcls, error)
func (*MockKafkaClusterAdmin) ListConsumerGroupOffsets ¶
func (m *MockKafkaClusterAdmin) ListConsumerGroupOffsets(group string, topicPartitions map[string][]int32) (*sarama.OffsetFetchResponse, error)
func (*MockKafkaClusterAdmin) ListConsumerGroups ¶
func (m *MockKafkaClusterAdmin) ListConsumerGroups() (map[string]string, error)
func (*MockKafkaClusterAdmin) ListPartitionReassignments ¶
func (m *MockKafkaClusterAdmin) ListPartitionReassignments(topics string, partitions []int32) (topicStatus map[string]map[int32]*sarama.PartitionReplicaReassignmentsStatus, err error)
func (*MockKafkaClusterAdmin) ListTopics ¶
func (m *MockKafkaClusterAdmin) ListTopics() (map[string]sarama.TopicDetail, error)
func (*MockKafkaClusterAdmin) RemoveMemberFromConsumerGroup ¶ added in v0.35.0
func (m *MockKafkaClusterAdmin) RemoveMemberFromConsumerGroup(groupId string, groupInstanceIds []string) (*sarama.LeaveGroupResponse, error)
func (*MockKafkaClusterAdmin) UpsertUserScramCredentials ¶
func (m *MockKafkaClusterAdmin) UpsertUserScramCredentials(upsert []sarama.AlterUserScramCredentialsUpsert) ([]*sarama.AlterUserScramCredentialsResult, error)
Click to show internal directories.
Click to hide internal directories.