Documentation ¶
Index ¶
- type ConfigEntry
- type ConfigResource
- type ConfigSynonym
- type Configurer
- type ConsumerLister
- type Creator
- type Deleter
- type DescribeLogDirsResponseDirMetadata
- type DescribeLogDirsResponsePartition
- type DescribeLogDirsResponseTopic
- type Describer
- type KafkaAPIClient
- type KafkaSSHClient
- type ListTopicsRequest
- type Lister
- type MockClusterAdmin
- func (m *MockClusterAdmin) AlterConfig(resourceType sarama.ConfigResourceType, name string, ...) error
- func (m *MockClusterAdmin) AlterPartitionReassignments(topic string, assignment [][]int32) error
- func (m *MockClusterAdmin) Close() error
- func (m *MockClusterAdmin) CreateACL(resource sarama.Resource, acl sarama.Acl) error
- func (m *MockClusterAdmin) CreatePartitions(topic string, count int32, assignment [][]int32, validateOnly bool) error
- func (m *MockClusterAdmin) CreateTopic(topic string, detail *sarama.TopicDetail, validateOnly bool) error
- func (m *MockClusterAdmin) DeleteACL(filter sarama.AclFilter, validateOnly bool) ([]sarama.MatchingAcl, error)
- func (m *MockClusterAdmin) DeleteConsumerGroup(group string) error
- func (m *MockClusterAdmin) DeleteRecords(topic string, partitionOffsets map[int32]int64) error
- func (m *MockClusterAdmin) DeleteTopic(topic string) error
- func (m *MockClusterAdmin) DescribeCluster() (brokers []*sarama.Broker, controllerID int32, err error)
- func (m *MockClusterAdmin) DescribeConfig(resource sarama.ConfigResource) ([]sarama.ConfigEntry, error)
- func (m *MockClusterAdmin) DescribeConsumerGroups(groups []string) ([]*sarama.GroupDescription, error)
- func (m *MockClusterAdmin) DescribeLogDirs(brokers []int32) (map[int32][]sarama.DescribeLogDirsResponseDirMetadata, error)
- func (m *MockClusterAdmin) DescribeTopics(topics []string) (metadata []*sarama.TopicMetadata, err error)
- func (m *MockClusterAdmin) ListAcls(filter sarama.AclFilter) ([]sarama.ResourceAcls, error)
- func (m *MockClusterAdmin) ListConsumerGroupOffsets(group string, topicPartitions map[string][]int32) (*sarama.OffsetFetchResponse, error)
- func (m *MockClusterAdmin) ListConsumerGroups() (map[string]string, error)
- func (m *MockClusterAdmin) ListPartitionReassignments(topics string, partitions []int32) (topicStatus map[string]map[int32]*sarama.PartitionReplicaReassignmentsStatus, ...)
- func (m *MockClusterAdmin) ListTopics() (map[string]sarama.TopicDetail, error)
- type MockConfigurer
- type MockCreator
- type MockDeleter
- type MockDescriber
- type MockKafkaAPIClient
- func (m *MockKafkaAPIClient) CreatePartitions(topic string, count int32, assignment [][]int32, validateOnly bool) error
- func (m *MockKafkaAPIClient) CreateTopic(topic string, detail TopicDetail, validateOnly bool) error
- func (m *MockKafkaAPIClient) DeleteTopic(topics []string) error
- func (m *MockKafkaAPIClient) DescribeLogDirs(brokerIDs []int32) (map[int32][]DescribeLogDirsResponseDirMetadata, error)
- func (m *MockKafkaAPIClient) DescribeTopicMetadata(topics []string) ([]*TopicMetadata, error)
- func (m *MockKafkaAPIClient) GetConfig(resource ConfigResource) ([]ConfigEntry, error)
- func (m *MockKafkaAPIClient) GetTopicResourceType() int
- func (m *MockKafkaAPIClient) ListBrokers() map[int]string
- func (m *MockKafkaAPIClient) ListTopicDetails() (map[string]TopicDetail, error)
- func (m *MockKafkaAPIClient) UpdateConfig(resourceType int, name string, entries map[string]*string, validateOnly bool) error
- type MockLister
- func (m *MockLister) List() (map[string]TopicDetail, error)
- func (m *MockLister) ListLastWrittenTopics(lastWrittenEpoch int64, dataDir string) ([]string, error)
- func (m *MockLister) ListOnly(regex string, include bool) ([]string, error)
- func (m *MockLister) ListTopicWithSizeLessThanOrEqualTo(size int64) ([]string, error)
- type MockPartitioner
- type MockSSHCli
- type MockSSHClient
- type MockSaramaClient
- func (m *MockSaramaClient) Brokers() []*sarama.Broker
- func (m *MockSaramaClient) Close() error
- func (m *MockSaramaClient) Closed() bool
- func (m *MockSaramaClient) Config() *sarama.Config
- func (m *MockSaramaClient) Controller() (*sarama.Broker, error)
- func (m *MockSaramaClient) Coordinator(consumerGroup string) (*sarama.Broker, error)
- func (m *MockSaramaClient) GetOffset(topic string, partitionID int32, time int64) (int64, error)
- func (m *MockSaramaClient) InSyncReplicas(topic string, partitionID int32) ([]int32, error)
- func (m *MockSaramaClient) InitProducerID() (*sarama.InitProducerIDResponse, error)
- func (m *MockSaramaClient) Leader(topic string, partitionID int32) (*sarama.Broker, error)
- func (m *MockSaramaClient) OfflineReplicas(topic string, partitionID int32) ([]int32, error)
- func (m *MockSaramaClient) Partitions(topic string) ([]int32, error)
- func (m *MockSaramaClient) RefreshBrokers(addrs []string) error
- func (m *MockSaramaClient) RefreshController() (*sarama.Broker, error)
- func (m *MockSaramaClient) RefreshCoordinator(consumerGroup string) error
- func (m *MockSaramaClient) RefreshMetadata(topics ...string) error
- func (m *MockSaramaClient) Replicas(topic string, partitionID int32) ([]int32, error)
- func (m *MockSaramaClient) Topics() ([]string, error)
- func (m *MockSaramaClient) WritablePartitions(topic string) ([]int32, error)
- type PartitionMetadata
- type Partitioner
- type SSHClient
- type SaramaClient
- func (s *SaramaClient) CreatePartitions(topic string, count int32, assignment [][]int32, validateOnly bool) error
- func (s *SaramaClient) CreateTopic(topic string, detail TopicDetail, validateOnly bool) error
- func (s *SaramaClient) DeleteTopic(topics []string) error
- func (s *SaramaClient) DescribeLogDirs(brokerIDs []int32) (map[int32][]DescribeLogDirsResponseDirMetadata, error)
- func (s *SaramaClient) DescribeTopicMetadata(topics []string) ([]*TopicMetadata, error)
- func (s *SaramaClient) GetConfig(resource ConfigResource) ([]ConfigEntry, error)
- func (s *SaramaClient) GetConsumerGroupsForTopic(groups []string, topic string) (chan string, error)
- func (s *SaramaClient) GetTopicResourceType() int
- func (s *SaramaClient) ListBrokers() map[int]string
- func (s *SaramaClient) ListConsumerGroups() (map[string]string, error)
- func (s *SaramaClient) ListTopicDetails() (map[string]TopicDetail, error)
- func (s *SaramaClient) UpdateConfig(resourceType int, name string, entries map[string]*string, validateOnly bool) error
- type TopicDetail
- type TopicMetadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigEntry ¶
type ConfigResource ¶
type ConfigSynonym ¶
type Configurer ¶
type ConsumerLister ¶ added in v0.1.0
type DescribeLogDirsResponseDirMetadata ¶ added in v0.1.1
type DescribeLogDirsResponseDirMetadata struct { Error error Path string Topics []DescribeLogDirsResponseTopic }
type DescribeLogDirsResponsePartition ¶ added in v0.1.1
type DescribeLogDirsResponseTopic ¶ added in v0.1.1
type DescribeLogDirsResponseTopic struct { Topic string Partitions []DescribeLogDirsResponsePartition }
type Describer ¶
type Describer interface {
Describe(topics []string) ([]*TopicMetadata, error)
}
type KafkaAPIClient ¶
type KafkaAPIClient interface { CreateTopic(topic string, detail TopicDetail, validateOnly bool) error CreatePartitions(topic string, count int32, assignment [][]int32, validateOnly bool) error ListBrokers() map[int]string ListTopicDetails() (map[string]TopicDetail, error) DeleteTopic(topics []string) error DescribeTopicMetadata(topics []string) ([]*TopicMetadata, error) UpdateConfig(resourceType int, name string, entries map[string]*string, validateOnly bool) error GetTopicResourceType() int GetConfig(resource ConfigResource) ([]ConfigEntry, error) DescribeLogDirs(brokerIDs []int32) (map[int32][]DescribeLogDirsResponseDirMetadata, error) }
type KafkaSSHClient ¶
type KafkaSSHClient interface {
ListTopics(ListTopicsRequest) ([]string, error)
}
func NewKafkaRemoteClient ¶
func NewKafkaRemoteClient(apiClient KafkaAPIClient, sshClient sshCli) (KafkaSSHClient, error)
type ListTopicsRequest ¶
type MockClusterAdmin ¶
func (*MockClusterAdmin) AlterConfig ¶
func (m *MockClusterAdmin) AlterConfig(resourceType sarama.ConfigResourceType, name string, entries map[string]*string, validateOnly bool) error
func (*MockClusterAdmin) AlterPartitionReassignments ¶ added in v0.1.1
func (m *MockClusterAdmin) AlterPartitionReassignments(topic string, assignment [][]int32) error
func (*MockClusterAdmin) Close ¶
func (m *MockClusterAdmin) Close() error
func (*MockClusterAdmin) CreatePartitions ¶
func (*MockClusterAdmin) CreateTopic ¶
func (m *MockClusterAdmin) CreateTopic(topic string, detail *sarama.TopicDetail, validateOnly bool) error
func (*MockClusterAdmin) DeleteACL ¶
func (m *MockClusterAdmin) DeleteACL(filter sarama.AclFilter, validateOnly bool) ([]sarama.MatchingAcl, error)
func (*MockClusterAdmin) DeleteConsumerGroup ¶
func (m *MockClusterAdmin) DeleteConsumerGroup(group string) error
func (*MockClusterAdmin) DeleteRecords ¶
func (m *MockClusterAdmin) DeleteRecords(topic string, partitionOffsets map[int32]int64) error
func (*MockClusterAdmin) DeleteTopic ¶
func (m *MockClusterAdmin) DeleteTopic(topic string) error
func (*MockClusterAdmin) DescribeCluster ¶
func (m *MockClusterAdmin) DescribeCluster() (brokers []*sarama.Broker, controllerID int32, err error)
func (*MockClusterAdmin) DescribeConfig ¶
func (m *MockClusterAdmin) DescribeConfig(resource sarama.ConfigResource) ([]sarama.ConfigEntry, error)
func (*MockClusterAdmin) DescribeConsumerGroups ¶
func (m *MockClusterAdmin) DescribeConsumerGroups(groups []string) ([]*sarama.GroupDescription, error)
func (*MockClusterAdmin) DescribeLogDirs ¶ added in v0.1.1
func (m *MockClusterAdmin) DescribeLogDirs(brokers []int32) (map[int32][]sarama.DescribeLogDirsResponseDirMetadata, error)
func (*MockClusterAdmin) DescribeTopics ¶
func (m *MockClusterAdmin) DescribeTopics(topics []string) (metadata []*sarama.TopicMetadata, err error)
func (*MockClusterAdmin) ListAcls ¶
func (m *MockClusterAdmin) ListAcls(filter sarama.AclFilter) ([]sarama.ResourceAcls, error)
func (*MockClusterAdmin) ListConsumerGroupOffsets ¶
func (m *MockClusterAdmin) ListConsumerGroupOffsets(group string, topicPartitions map[string][]int32) (*sarama.OffsetFetchResponse, error)
func (*MockClusterAdmin) ListConsumerGroups ¶
func (m *MockClusterAdmin) ListConsumerGroups() (map[string]string, error)
func (*MockClusterAdmin) ListPartitionReassignments ¶ added in v0.1.1
func (m *MockClusterAdmin) ListPartitionReassignments(topics string, partitions []int32) (topicStatus map[string]map[int32]*sarama.PartitionReplicaReassignmentsStatus, err error)
func (*MockClusterAdmin) ListTopics ¶
func (m *MockClusterAdmin) ListTopics() (map[string]sarama.TopicDetail, error)
type MockConfigurer ¶
func (*MockConfigurer) GetConfig ¶
func (m *MockConfigurer) GetConfig(topic string) ([]ConfigEntry, error)
func (*MockConfigurer) UpdateConfig ¶
type MockCreator ¶
func (*MockCreator) Create ¶
func (m *MockCreator) Create(topic string, detail TopicDetail, validateOnly bool) error
func (*MockCreator) CreatePartitions ¶
type MockDeleter ¶
func (*MockDeleter) Delete ¶
func (m *MockDeleter) Delete(topics []string) error
type MockDescriber ¶
func (*MockDescriber) Describe ¶
func (m *MockDescriber) Describe(topics []string) ([]*TopicMetadata, error)
type MockKafkaAPIClient ¶
func (*MockKafkaAPIClient) CreatePartitions ¶
func (*MockKafkaAPIClient) CreateTopic ¶
func (m *MockKafkaAPIClient) CreateTopic(topic string, detail TopicDetail, validateOnly bool) error
func (*MockKafkaAPIClient) DeleteTopic ¶
func (m *MockKafkaAPIClient) DeleteTopic(topics []string) error
func (*MockKafkaAPIClient) DescribeLogDirs ¶ added in v0.1.1
func (m *MockKafkaAPIClient) DescribeLogDirs(brokerIDs []int32) (map[int32][]DescribeLogDirsResponseDirMetadata, error)
func (*MockKafkaAPIClient) DescribeTopicMetadata ¶
func (m *MockKafkaAPIClient) DescribeTopicMetadata(topics []string) ([]*TopicMetadata, error)
func (*MockKafkaAPIClient) GetConfig ¶
func (m *MockKafkaAPIClient) GetConfig(resource ConfigResource) ([]ConfigEntry, error)
func (*MockKafkaAPIClient) GetTopicResourceType ¶
func (m *MockKafkaAPIClient) GetTopicResourceType() int
func (*MockKafkaAPIClient) ListBrokers ¶
func (m *MockKafkaAPIClient) ListBrokers() map[int]string
func (*MockKafkaAPIClient) ListTopicDetails ¶
func (m *MockKafkaAPIClient) ListTopicDetails() (map[string]TopicDetail, error)
func (*MockKafkaAPIClient) UpdateConfig ¶
type MockLister ¶
func (*MockLister) List ¶
func (m *MockLister) List() (map[string]TopicDetail, error)
func (*MockLister) ListLastWrittenTopics ¶
func (m *MockLister) ListLastWrittenTopics(lastWrittenEpoch int64, dataDir string) ([]string, error)
func (*MockLister) ListOnly ¶
func (m *MockLister) ListOnly(regex string, include bool) ([]string, error)
func (*MockLister) ListTopicWithSizeLessThanOrEqualTo ¶ added in v0.1.1
func (m *MockLister) ListTopicWithSizeLessThanOrEqualTo(size int64) ([]string, error)
type MockPartitioner ¶
func (*MockPartitioner) IncreaseReplication ¶
func (m *MockPartitioner) IncreaseReplication(topicsMetadata []*TopicMetadata, replicationFactor, numOfBrokers, batch, timeoutPerBatchInS, pollIntervalInS, throttle int) error
func (*MockPartitioner) ReassignPartitions ¶
func (m *MockPartitioner) ReassignPartitions(topics []string, brokerList string, batch, timeoutPerBatchInS, pollIntervalInS, throttle, partitionBatchSize int) error
type MockSSHCli ¶
func (*MockSSHCli) DialAndExecute ¶
func (m *MockSSHCli) DialAndExecute(address string, commands ...shellCmd) (*bytes.Buffer, error)
type MockSSHClient ¶ added in v0.1.1
func (*MockSSHClient) ListTopics ¶ added in v0.1.1
func (m *MockSSHClient) ListTopics(req ListTopicsRequest) ([]string, error)
type MockSaramaClient ¶
func (*MockSaramaClient) Brokers ¶
func (m *MockSaramaClient) Brokers() []*sarama.Broker
func (*MockSaramaClient) Close ¶
func (m *MockSaramaClient) Close() error
func (*MockSaramaClient) Closed ¶
func (m *MockSaramaClient) Closed() bool
func (*MockSaramaClient) Config ¶
func (m *MockSaramaClient) Config() *sarama.Config
func (*MockSaramaClient) Controller ¶
func (m *MockSaramaClient) Controller() (*sarama.Broker, error)
func (*MockSaramaClient) Coordinator ¶
func (m *MockSaramaClient) Coordinator(consumerGroup string) (*sarama.Broker, error)
func (*MockSaramaClient) InSyncReplicas ¶
func (m *MockSaramaClient) InSyncReplicas(topic string, partitionID int32) ([]int32, error)
func (*MockSaramaClient) InitProducerID ¶
func (m *MockSaramaClient) InitProducerID() (*sarama.InitProducerIDResponse, error)
func (*MockSaramaClient) OfflineReplicas ¶
func (m *MockSaramaClient) OfflineReplicas(topic string, partitionID int32) ([]int32, error)
func (*MockSaramaClient) Partitions ¶
func (m *MockSaramaClient) Partitions(topic string) ([]int32, error)
func (*MockSaramaClient) RefreshBrokers ¶ added in v0.1.1
func (m *MockSaramaClient) RefreshBrokers(addrs []string) error
func (*MockSaramaClient) RefreshController ¶ added in v0.1.1
func (m *MockSaramaClient) RefreshController() (*sarama.Broker, error)
func (*MockSaramaClient) RefreshCoordinator ¶
func (m *MockSaramaClient) RefreshCoordinator(consumerGroup string) error
func (*MockSaramaClient) RefreshMetadata ¶
func (m *MockSaramaClient) RefreshMetadata(topics ...string) error
func (*MockSaramaClient) Replicas ¶
func (m *MockSaramaClient) Replicas(topic string, partitionID int32) ([]int32, error)
func (*MockSaramaClient) Topics ¶
func (m *MockSaramaClient) Topics() ([]string, error)
func (*MockSaramaClient) WritablePartitions ¶
func (m *MockSaramaClient) WritablePartitions(topic string) ([]int32, error)
type PartitionMetadata ¶
type Partitioner ¶
type Partitioner interface { ReassignPartitions(topics []string, brokerList string, topicBatchSize, timeoutPerBatchInS, pollIntervalInS, throttle, partitionBatchSize int) error IncreaseReplication(topicsMetadata []*TopicMetadata, replicationFactor, numOfBrokers, batch, timeoutPerBatchInS, pollIntervalInS, throttle int) error }
type SSHClient ¶
type SSHClient struct {
// contains filtered or unexported fields
}
func NewSSHClient ¶
type SaramaClient ¶
type SaramaClient struct {
// contains filtered or unexported fields
}
func NewSaramaClient ¶
func NewSaramaClient(addr []string) *SaramaClient
func (*SaramaClient) CreatePartitions ¶
func (*SaramaClient) CreateTopic ¶
func (s *SaramaClient) CreateTopic(topic string, detail TopicDetail, validateOnly bool) error
func (*SaramaClient) DeleteTopic ¶
func (s *SaramaClient) DeleteTopic(topics []string) error
func (*SaramaClient) DescribeLogDirs ¶ added in v0.1.1
func (s *SaramaClient) DescribeLogDirs(brokerIDs []int32) (map[int32][]DescribeLogDirsResponseDirMetadata, error)
func (*SaramaClient) DescribeTopicMetadata ¶
func (s *SaramaClient) DescribeTopicMetadata(topics []string) ([]*TopicMetadata, error)
func (*SaramaClient) GetConfig ¶
func (s *SaramaClient) GetConfig(resource ConfigResource) ([]ConfigEntry, error)
func (*SaramaClient) GetConsumerGroupsForTopic ¶ added in v0.1.0
func (s *SaramaClient) GetConsumerGroupsForTopic(groups []string, topic string) (chan string, error)
func (*SaramaClient) GetTopicResourceType ¶
func (s *SaramaClient) GetTopicResourceType() int
func (*SaramaClient) ListBrokers ¶
func (s *SaramaClient) ListBrokers() map[int]string
func (*SaramaClient) ListConsumerGroups ¶ added in v0.1.0
func (s *SaramaClient) ListConsumerGroups() (map[string]string, error)
func (*SaramaClient) ListTopicDetails ¶
func (s *SaramaClient) ListTopicDetails() (map[string]TopicDetail, error)
func (*SaramaClient) UpdateConfig ¶
type TopicDetail ¶
type TopicMetadata ¶
type TopicMetadata struct { Err error Name string IsInternal bool Partitions []*PartitionMetadata }
Click to show internal directories.
Click to hide internal directories.