package
1.18.0
Repository: https://github.com/segmentio/topicctl.git
Documentation: pkg.go.dev

# Functions

AssignmentDiffs returns the diffs implied by the argument current and desired PartitionAssignments.
AssignmentsToReplicas is the inverse of ReplicasToAssignments.
AssignmentsToUpdate returns the subset of assignments that need to be updated given the current and desired states.
BrokerCountsPerRack returns a mapping of rack -> number of brokers.
BrokerIDs returns a slice of the IDs of the argument brokers.
BrokerRacks returns a mapping of broker ID -> rack.
BrokersPerRack returns a mapping of rack -> broker IDs.
BrokerThrottles returns a slice of BrokerThrottles that we should apply.
CheckAssignments does some basic sanity checks on the assignments that are passed into an Assigner or extender so that we can fail early if something is obviously wrong.
CopyAssignments returns a deep copy of the argument PartitionAssignment slice.
DistinctRacks returns a sorted slice of all the distinct racks in the cluster.
FollowerPartitionThrottles returns a slice of PartitionThrottles that we should apply on the follower side.
FormatACLInfo formats an ACLInfo struct as a string, using the string version of all the fields.
FormatACLs creates a pretty table that lists the details of the argument acls.
FormatAssignentDiffs generates a pretty table that shows the before and after states of a partition replica and/or leader update.
FormatBrokerMaxPartitions generates a pretty table that shows the total number of partitions that each broker is involved in for a diff.
FormatBrokerRackReplicas creates a pretty table that shows how many replicas are in each position (i.e., leader, second, third) by rack across all topics.
FormatBrokerReplicas creates a pretty table that shows how many replicas are in each position (i.e., leader, second, third) by broker across all topics.
FormatBrokers creates a pretty table from a list of brokers.
FormatBrokersPerRack creates a pretty table that shows the number of brokers per rack.
FormatClusterID creates a pretty table for cluster ID.
FormatConfig creates a pretty table with all of the keys and values in a topic or broker config.
FormatControllerID creates a pretty table for controller broker.
FormatTopicLeadersPerRack creates a pretty table that shows the number of partitions with a leader in each rack.
FormatTopicPartitions creates a pretty table with information on all of the partitions for a topic.
FormatTopics creates a pretty table that lists the details of the argument topics.
FormatTopicsPartitions creates a pretty table with information on all of the partitions for topics.
FormatTopicsPartitionsSummary creates a pretty table with summary of the partitions for topics.
FormatUsers creates a pretty table that lists the details of the argument users.
No description provided by the author
No description provided by the author
Get the Partition Status - ok - offline - under-replicated NOTE: partition is 1.
Get the partition status info for specified topics.
Get the partition status summary.
given an input of topics, returns topics that exist in the cluster.
HasLeaders returns whether at least one partition in the argument topics has a non-zero leader set.
LeaderPartitionThrottles returns a slice of PartitionThrottles that we should apply on the leader side.
LeadersPerRack returns a mapping of rack -> number of partitions with a leader in that rack.
MaxPartitionsPerBroker calculates the number of partitions that each broker may need to handle during a migration.
MaxReplication returns the maximum amount of replication across all partitions in the argument topics.
NewBrokerAdminClient constructs a new BrokerAdminClient instance.
NewConnector contructs a new Connector instance given the argument config.
NewLeaderPartitions returns the partition IDs which will have new leaders given the current and desired assignments.
NewZKAdminClient creates and returns a new Client instance.
ParseBrokerThrottles returns slices of the leader and follower throttles for the argument brokers.
ParsePartitionThrottles returns slices of the leader and follower partition throttles for the argument topic.
ParsePartitionThrottleStr converts a throttle config string from zk into a slice of PartitionThrottle structs.
PartitionIDs returns the IDs from the argument partitions.
PartitionThrottleConfigEntries generates the topic config entries for the provided leader and follower throttles.
ReplicasToAssignments converts a slice of slices to a slice of PartitionAssignments, assuming that the argument slices are in partition order.
SameBrokers returns whether two PartitionAssignments have the same brokers.
SASLNameToMechanism converts the argument SASL mechanism name string to a valid instance of the SASLMechanism enum.
Check if a string is valid PartitionStatus type.
ThrottledBrokerIDs returns a slice of the IDs of the subset of argument brokers that have throttles on them.
ThrottledTopicNames returns the names of topics in the argument slice that have throttles on them.

# Constants

No description provided by the author
FollowerReplicasThrottledKey is the config key for the list of follower replicas that should be throttled.
FollowerThrottledKey is the config key for the follower throttle rate.
LeaderReplicasThrottledKey is the config key for the list of leader replicas that should be throttled.
LeaderThrottledKey is the config key for the leader throttle rate.
No description provided by the author
No description provided by the author
No description provided by the author
RetentionKey is the config key used for topic time retention.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

ErrTopicDoesNotExist is returned by admin functions when a topic that should exist does not.

# Structs

PartitionInfo represents the information stored about an ACL in zookeeper.
AssignmentDiff represents the diff in a single partition reassignment.
BrokerAdminClient is a Client implementation that only uses broker APIs, without any zookeeper access.
BrokerAdminClientConfig contains the configuration settings to construct a BrokerAdminClient instance.
BrokerInfo represents the information stored about a broker in zookeeper.
BrokerThrottle represents a throttle being applied to a single broker.
Connector is a wrapper around the low-level, kafka-go dialer and client.
ConnectorConfig contains the configuration used to contruct a connector.
CredentialInfo represents read only information about a users credentials in zookeeper.
PartitionAssignment contains the actual or desired assignment of replicas in a topic partition.
PartitionInfo represents the information stored about a topic partition in zookeeper.
No description provided by the author
PartitionThrottle represents a throttle being applied to a single partition, broker combination.
SASLConfig stores the SASL-related configuration for a connection.
SupportedFeatures provides a summary of what an admin client supports.
TLSConfig stores the TLS-related configuration for a connection.
TopicInfo represents the information stored about a topic in zookeeper.
UserInfo represents the information stored about a user in zookeeper.
ZKAdminClient is a general client for interacting with a kafka cluster that assumes zookeeper access.
ZKAdminClientConfig contains all of the parameters necessary to create a kafka admin client.

# Interfaces

Client is an interface for interacting with a cluster for administrative tasks.

# Type aliases

ACLOperationType presents the Kafka operation type.
ACLPermissionType presents the Kafka operation type.
No description provided by the author
No description provided by the author
PatternType presents the Kafka pattern type.
ResourceType presents the Kafka resource type.
SASLMechanism is the name of a SASL mechanism that will be used for client authentication.
ScramMechanism represents the ScramMechanism used for a users credential in zookeeper.