kafkautil

package
v0.39.0-beta1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterValidConsumerGroupIDs

func FilterValidConsumerGroupIDs(f *factory.Factory, toComplete string) (validIDs []string, directive cobra.ShellCompDirective)

FilterValidConsumerGroupIDs returns the list of consumer group IDs from the API

func FilterValidTopicNameArgs

func FilterValidTopicNameArgs(f *factory.Factory, toComplete string) (validNames []string, directive cobra.ShellCompDirective)

FilterValidTopicNameArgs filters topics from the API and returns the names This is used in for dynamic completion of topic names

func FindCloudProviderByName

func FindCloudProviderByName(cloudProviders []kafkamgmtclient.CloudProvider, name string) *kafkamgmtclient.CloudProvider

FindCloudProviderByName finds and returns a cloud provider item from the list by its name

func GetCloudProviderCompletionValues

func GetCloudProviderCompletionValues(f *factory.Factory) (validProviders []string, directive cobra.ShellCompDirective)

GetCloudProviderCompletionValues returns the list of supported cloud providers for creating a Kafka instance This is used in the cmd.RegisterFlagCompletionFunc for dynamic completion of --provider

func GetCloudProviderRegionCompletionValues

func GetCloudProviderRegionCompletionValues(f *factory.Factory, providerID string) (validRegions []string, directive cobra.ShellCompDirective)

GetCloudProviderCompletionValues returns the list of region IDs for a particular cloud provider

func GetEnabledCloudProviderNames

func GetEnabledCloudProviderNames(cloudProviders []kafkamgmtclient.CloudProvider) []string

GetEnabledCloudProviderNames returns a list of cloud provider names from the enabled cloud providers

func GetEnabledCloudRegionIDs

func GetEnabledCloudRegionIDs(regions []kafkamgmtclient.CloudRegion, userAllowedInstanceTypes *[]string) []string

GetEnabledCloudRegionIDs extracts and returns a slice of the unique IDs of all enabled regions

func InteractiveSelect

func InteractiveSelect(ctx context.Context, connection connection.Connection, logger logging.Logger, localizer localize.Localizer) (*kafkamgmtclient.KafkaRequest, error)

func InvalidNameError

func InvalidNameError(v string) error

func InvalidSearchValueError

func InvalidSearchValueError(v string) error

func IsRegionAllowed added in v0.38.5

func IsRegionAllowed(region *kafkamgmtclient.CloudRegion, userAllowedInstanceTypes *[]string) bool

func NotFoundByIDError

func NotFoundByIDError(id string) error

func NotFoundByNameError

func NotFoundByNameError(name string) error

func RegisterNameFlagCompletionFunc

func RegisterNameFlagCompletionFunc(cmd *cobra.Command, f *factory.Factory) error

RegisterNameFlagCompletionFunc adds dynamic completion for the --name flag

Types

This section is empty.

Jump to

Keyboard shortcuts

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