cli

package
v1.22.0-aws-sdk-v2-test Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2025 License: MIT Imports: 26 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLIRunner

type CLIRunner struct {
	// contains filtered or unexported fields
}

CLIRunner is a utility that runs commands from either the command-line or the repl.

func NewCLIRunner

func NewCLIRunner(
	adminClient admin.Client,
	printer func(f string, a ...interface{}),
	showSpinner bool,
) *CLIRunner

NewCLIRunner creates and returns a new CLIRunner instance.

func (*CLIRunner) ApplyTopic

func (c *CLIRunner) ApplyTopic(
	ctx context.Context,
	applierConfig apply.TopicApplierConfig,
) error

ApplyTopic does an apply run according to the spec in the argument config.

func (*CLIRunner) BootstrapTopics

func (c *CLIRunner) BootstrapTopics(
	ctx context.Context,
	topics []string,
	clusterConfig config.ClusterConfig,
	matchRegexpStr string,
	excludeRegexpStr string,
	outputDir string,
	overwrite bool,
	allowInternalTopics bool,
) error

BootstrapTopics creates configs for one or more topics based on their current state in the cluster.

func (*CLIRunner) CheckTopic

func (c *CLIRunner) CheckTopic(
	ctx context.Context,
	checkConfig check.CheckConfig,
) (bool, error)

CheckTopic runs a topic check against a single topic and prints a summary of the results out.

func (*CLIRunner) CreateACL added in v1.12.0

func (c *CLIRunner) CreateACL(
	ctx context.Context,
	aclAdminConfig acl.ACLAdminConfig,
) error

CreateACL does an apply run according to the spec in the argument config.

func (*CLIRunner) DeleteACL added in v1.12.0

func (c *CLIRunner) DeleteACL(
	ctx context.Context,
	aclAdminConfig acl.ACLAdminConfig,
	filter kafka.DeleteACLsFilter,
) error

DeleteACL deletes a single ACL.

func (*CLIRunner) DeleteTopic added in v1.21.0

func (c *CLIRunner) DeleteTopic(ctx context.Context, topic string) error

DeleteTopic deletes a single topic.

func (*CLIRunner) GetACLs added in v1.10.3

func (c *CLIRunner) GetACLs(
	ctx context.Context,
	filter kafka.ACLFilter,
) error

GetACLs fetches the details of each acl in the cluster and prints out a summary.

func (*CLIRunner) GetBrokerBalance

func (c *CLIRunner) GetBrokerBalance(ctx context.Context, topicName string) error

GetBrokerBalance evaluates the balance of the brokers for a single topic and prints a summary out for user inspection.

func (*CLIRunner) GetBrokers

func (c *CLIRunner) GetBrokers(ctx context.Context, full bool) error

GetBrokers gets all brokers and prints out a summary for the user.

func (*CLIRunner) GetClusterID added in v1.14.0

func (c *CLIRunner) GetClusterID(ctx context.Context, full bool) error

Get cluster ID

func (*CLIRunner) GetConfig

func (c *CLIRunner) GetConfig(ctx context.Context, brokerOrTopic string) error

GetConfig fetches the config for a broker or topic and prints it out for user inspection.

func (*CLIRunner) GetControllerID added in v1.14.0

func (c *CLIRunner) GetControllerID(ctx context.Context, full bool) error

Get active controller broker ID

func (*CLIRunner) GetGroupMembers

func (c *CLIRunner) GetGroupMembers(ctx context.Context, groupID string, full bool) error

GetGroupMembers fetches and prints out information about every member in a consumer group.

func (*CLIRunner) GetGroups

func (c *CLIRunner) GetGroups(ctx context.Context) error

GetGroups fetches all consumer groups and prints them out for user inspection.

func (*CLIRunner) GetMemberLags

func (c *CLIRunner) GetMemberLags(
	ctx context.Context,
	topic string,
	groupID string,
	full bool,
	sortByValues bool,
) error

GetMemberLags fetches and prints a summary of the consumer group lag for each partition in a single topic.

func (*CLIRunner) GetOffsets

func (c *CLIRunner) GetOffsets(ctx context.Context, topic string) error

GetOffsets fetches details about all partition offsets in a single topic and prints out a summary.

func (*CLIRunner) GetPartitions

func (c *CLIRunner) GetPartitions(
	ctx context.Context,
	topics []string,
	status admin.PartitionStatus,
	summary bool,
) error

GetPartitions fetches the details of each partition in a topic and prints out a summary for user inspection.

func (*CLIRunner) GetTopics

func (c *CLIRunner) GetTopics(ctx context.Context, full bool) error

GetTopics fetches the details of each topic in the cluster and prints out a summary.

func (*CLIRunner) GetUsers added in v1.10.3

func (c *CLIRunner) GetUsers(ctx context.Context, names []string) error

GerUsers fetches the details of each user in the cluster and prints out a table of them.

func (*CLIRunner) ResetOffsets

func (c *CLIRunner) ResetOffsets(
	ctx context.Context,
	topic string,
	groupID string,
	partitionOffsets map[int]int64,
) error

ResetOffsets resets the offsets for a single consumer group / topic combination.

func (*CLIRunner) Tail

func (c *CLIRunner) Tail(
	ctx context.Context,
	topic string,
	offset int64,
	partitions []int,
	maxMessages int,
	filterRegexp string,
	raw bool,
	headers bool,
) error

Tail prints out a stream of the latest messages in a topic.

type Repl

type Repl struct {
	// contains filtered or unexported fields
}

Repl manages the repl mode for topicctl.

func NewRepl

func NewRepl(
	ctx context.Context,
	adminClient admin.Client,
) (*Repl, error)

NewRepl initializes and returns a Repl instance.

func (*Repl) Run

func (r *Repl) Run()

Run starts the repl main loop.

Jump to

Keyboard shortcuts

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