Documentation ¶
Index ¶
- Variables
- func Client() *kafkactl.KClient
- func ClientVersion() sarama.KafkaVersion
- func CloseClient()
- func ClusterDetails()
- func ConfigurePartitionCount(flags OpsCreateFlags, topics ...string)
- func CreateTopics(partitions int32, rFactor int16, topics ...string)
- func DeleteGroups(groups ...string)
- func DeleteTopics(topics ...string)
- func FilterTOMByLeader(tom []kafkactl.TopicOffsetMap, leaders []int32) []kafkactl.TopicOffsetMap
- func FollowTopic(flags MSGFlags, outFlags out.OutFlags, topics ...string)
- func GetBrokerMetrics(intervals, seconds int) kafkactl.MetricCollection
- func GetGOM(group string, topics ...string) []kafkactl.GroupOffsetMap
- func GetKakfaMetrics(flags MetricFlags) kafkactl.MetricCollection
- func GetMessages(flags MSGFlags, topics ...string) []*kafkactl.Message
- func GetTopicOffsetMap(tm []kafkactl.TopicMeta) []kafkactl.TopicOffsetMap
- func GroupMetaByMember(members ...string) []kafkactl.GroupMeta
- func GroupMetaByTopics(topics ...string) []kafkactl.GroupMeta
- func LaunchClient(context *cx.Context, flags ClientFlags)
- func MetaData() kafkactl.ClusterMeta
- func MetricR() *metrics.Registry
- func ParseTopicStdin(r io.Reader) []topicStdinData
- func PrintAdm(i interface{})
- func PrintMSG(msg *kafkactl.Message, outFlags out.OutFlags)
- func PrintMSGs(msgs []*kafkactl.Message, outFlags out.OutFlags)
- func PrintMetricCollection(MC kafkactl.MetricCollection)
- func PrintMetrics(i interface{})
- func PrintOut(i interface{})
- func ProduceFromFile(flags SendFlags, data io.Reader, topics ...string)
- func SearchGroupListMeta(groups ...string) []kafkactl.GroupListMeta
- func SearchGroupMeta(group ...string) []kafkactl.GroupMeta
- func SearchTOM(topics ...string) []kafkactl.TopicOffsetMap
- func SearchTopicMeta(topics ...string) []kafkactl.TopicMeta
- func SetOffsets(flags OpsOffsetFlags, topics ...string)
- func ZkCreateRAP(rapList RAPartList) bool
- type APIVersion
- type Broker
- type BrokerReplicas
- type ClientFlags
- type GroupFlags
- type GroupPartitionMeta
- type GroupTopicOffsetMeta
- type GrpLag
- type LagFlags
- type MSGFlags
- type MetricFlags
- type OffsetDetail
- type OffsetDetails
- type OffsetRangeMap
- type OpsCreateFlags
- type OpsOffsetFlags
- type OpsReplicaFlags
- type PREFlags
- type PREList
- type PREPartition
- type PRESummary
- type PRETopicMeta
- type PartitionLag
- type RAPartList
- type RAPartition
- type ReplicaDetails
- type SendFlags
- type TopicConfig
- func GetNonDefaultConfigs(configs []TopicConfig) []TopicConfig
- func GetTopicConfigs(configs []string, topics ...string) []TopicConfig
- func SearchTopicConfigs(configs []string, topics ...string) []TopicConfig
- func SetDefaultConfig(config string, topics ...string) []TopicConfig
- func SetTopicConfig(config, value string, topics ...string) []TopicConfig
- type TopicConfigFlags
- type TopicFlags
- type TopicPartitionMeta
- type TotalLag
Constants ¶
This section is empty.
Variables ¶
var (
Alive bool
)
client variables
var ( // FORCE bypasses any configured checks. FORCE bool )
Functions ¶
func ClientVersion ¶
func ClientVersion() sarama.KafkaVersion
ClientVersion returns the kafkactl client.
func CloseClient ¶
func CloseClient()
func ConfigurePartitionCount ¶
func ConfigurePartitionCount(flags OpsCreateFlags, topics ...string)
func CreateTopics ¶
func DeleteGroups ¶
func DeleteGroups(groups ...string)
func DeleteTopics ¶
func DeleteTopics(topics ...string)
func FilterTOMByLeader ¶
func FilterTOMByLeader(tom []kafkactl.TopicOffsetMap, leaders []int32) []kafkactl.TopicOffsetMap
func GetBrokerMetrics ¶
func GetBrokerMetrics(intervals, seconds int) kafkactl.MetricCollection
GetBrokerMetrics return broker related metrics.
func GetKakfaMetrics ¶
func GetKakfaMetrics(flags MetricFlags) kafkactl.MetricCollection
func GetMessages ¶
GetMessages returns messages from a kafka topic
func GetTopicOffsetMap ¶
func GetTopicOffsetMap(tm []kafkactl.TopicMeta) []kafkactl.TopicOffsetMap
func GroupMetaByMember ¶
func GroupMetaByTopics ¶
func LaunchClient ¶
func LaunchClient(context *cx.Context, flags ClientFlags)
func MetaData ¶
func MetaData() kafkactl.ClusterMeta
func ParseTopicStdin ¶
ParseTopicStdin parses Stdin passed from kafkactl topic metadata
func PrintMetricCollection ¶
func PrintMetricCollection(MC kafkactl.MetricCollection)
func PrintMetrics ¶
func PrintMetrics(i interface{})
func SearchGroupListMeta ¶
func SearchGroupListMeta(groups ...string) []kafkactl.GroupListMeta
func SearchGroupMeta ¶
func SearchTOM ¶
func SearchTOM(topics ...string) []kafkactl.TopicOffsetMap
func SearchTopicMeta ¶
func SetOffsets ¶
func SetOffsets(flags OpsOffsetFlags, topics ...string)
func ZkCreateRAP ¶
func ZkCreateRAP(rapList RAPartList) bool
Types ¶
type APIVersion ¶
APIVersion describes an API Version Key and its Max Version.
func GetAPIVersions ¶
func GetAPIVersions() []APIVersion
type Broker ¶
type Broker struct { Address string ID int32 GroupsCoordinating int64 LeaderReplicas int64 PeerReplicas int64 TotalReplicas int64 MigratingReplicas int64 Overload int64 }
func GetBrokerInfo ¶
type BrokerReplicas ¶
type ClientFlags ¶
type GroupFlags ¶
type GroupPartitionMeta ¶
type GroupTopicOffsetMeta ¶
type GroupTopicOffsetMeta struct { TopicPartitionMeta GroupPartitionMeta }
type MetricFlags ¶
MetricFlags defines flags for reporting metrics.
type OffsetDetail ¶
type OffsetDetails ¶
type OffsetDetails struct { Details []OffsetDetail IncludesGroups bool }
func GetTopicOffsets ¶
func GetTopicOffsets(topics ...string) (topicDetails OffsetDetails)
func MatchGroupOffsets ¶
func MatchGroupOffsets(topicDetails OffsetDetails) (groupDetails OffsetDetails)
type OffsetRangeMap ¶ added in v1.0.24
OffsetRangeMap contains Topics and a Range of Offsets specified from a beginning and end.
func GetMsgOffsets ¶ added in v1.0.24
func GetMsgOffsets(flags MSGFlags, topics ...string) OffsetRangeMap
GetMsgOffsets returns offsets for the given topics queried by time.
type OpsCreateFlags ¶
type OpsOffsetFlags ¶
type OpsReplicaFlags ¶
type PREList ¶
type PREList struct { Version int `json:"version"` Partitions []PREPartition `json:"partitions"` }
type PREPartition ¶
type PRESummary ¶
type PRETopicMeta ¶
func GetPREMeta ¶
func GetPREMeta(topics ...string) PRETopicMeta
func PerformTopicPRE ¶
func PerformTopicPRE(topics ...string) PRETopicMeta
func (PRETopicMeta) CreatePREList ¶
func (pre PRETopicMeta) CreatePREList() PREList
func (PRETopicMeta) CreatePRESummary ¶
func (pre PRETopicMeta) CreatePRESummary() PRESummary
type PartitionLag ¶
type PartitionLag struct { Group string Topic string Partition int32 Host string Member string Offset int64 Lag int64 }
PartitionLag struct def:
func FindPartitionLag ¶
func FindPartitionLag() []PartitionLag
func GetGroupLag ¶
func GetGroupLag(grpMeta []kafkactl.GroupMeta) []PartitionLag
type RAPartList ¶
type RAPartList struct { Version int `json:"version"` Partitions []RAPartition `json:"partitions"` }
func MovePartitionsStdin ¶
func MovePartitionsStdin(moveData []topicStdinData, brokers []int32) RAPartList
func RebalanceTopics ¶
func RebalanceTopics(flags OpsReplicaFlags, topics ...string) RAPartList
func SetTopicReplicas ¶
func SetTopicReplicas(flags OpsReplicaFlags, topics ...string) RAPartList
type RAPartition ¶
type ReplicaDetails ¶
func GetTopicReplicas ¶
func GetTopicReplicas(topics ...string) ReplicaDetails
type TopicConfig ¶
type TopicConfig struct { Topic string Config string Value string ReadOnly bool Default bool Sensitive bool }
TopicConfig struct def:
func GetNonDefaultConfigs ¶
func GetNonDefaultConfigs(configs []TopicConfig) []TopicConfig
GetNonDefaultConfigs returns Topic Configs that have been altered.
func GetTopicConfigs ¶
func GetTopicConfigs(configs []string, topics ...string) []TopicConfig
GetTopicConfigs creates and returns Topic Configs.
func SearchTopicConfigs ¶
func SearchTopicConfigs(configs []string, topics ...string) []TopicConfig
SearchTopicConfigs searches and returns Topic Configs.
func SetDefaultConfig ¶
func SetDefaultConfig(config string, topics ...string) []TopicConfig
SetDefaultConfig sets the configuration for a Topic back to defaults.
func SetTopicConfig ¶
func SetTopicConfig(config, value string, topics ...string) []TopicConfig
SetTopicConfig sets a parameter for a Topic.
type TopicConfigFlags ¶
type TopicConfigFlags struct { Config string Value string Configs []string GetNonDefaults bool SetDefault bool }
TopicConfigFlags .