broker

package
v0.0.0-...-a045990 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// KReferenceMapping is mapping between the known config kinds to a basic
	// default KReference value
	KReferenceMapping = map[ConfigType]*duckv1.KReference{
		ConfigMapType: {Kind: "ConfigMap", APIVersion: "v1"},
		SecretType:    {Kind: "Secret", APIVersion: "v1"},
		RabbitMqType:  {Kind: "RabbitmqCluster", APIVersion: "rabbitmq.com/v1beta1"},
	}
	ConfigTypeMapping = map[string]ConfigType{
		"cm":              ConfigMapType,
		"configmap":       ConfigMapType,
		"sc":              SecretType,
		"secret":          SecretType,
		"rabbitmqcluster": RabbitMqType,
		"rabbitmq":        RabbitMqType,
		"rmq":             RabbitMqType,
	}
)

Functions

func ListHandlers

func ListHandlers(h hprinters.PrintHandler)

ListHandlers handles printing human readable table for `kn broker list` command's output

func NewBrokerCommand

func NewBrokerCommand(p *commands.KnParams) *cobra.Command

NewBrokerCommand represents broker management commands

func NewBrokerCreateCommand

func NewBrokerCreateCommand(p *commands.KnParams) *cobra.Command

NewBrokerCreateCommand represents command to create new broker instance

func NewBrokerDeleteCommand

func NewBrokerDeleteCommand(p *commands.KnParams) *cobra.Command

NewBrokerDeleteCommand represents command to existing delete broker

func NewBrokerDescribeCommand

func NewBrokerDescribeCommand(p *commands.KnParams) *cobra.Command

NewBrokerDescribeCommand represents command to describe details of broker instance

func NewBrokerListCommand

func NewBrokerListCommand(p *commands.KnParams) *cobra.Command

NewBrokerListCommand represents command to list all brokers

func NewBrokerUpdateCommand

func NewBrokerUpdateCommand(p *commands.KnParams) *cobra.Command

Types

type ConfigFlags

type ConfigFlags struct {
	BrokerConfig string
}

ConfigFlags represents the broker config

func (*ConfigFlags) Add

func (c *ConfigFlags) Add(cmd *cobra.Command)

Add is used to add the broker config flag to a command

func (*ConfigFlags) GetBrokerConfigReference

func (c *ConfigFlags) GetBrokerConfigReference() (*duckv1.KReference, error)

GetBrokerConfigReference parses the broker config and return the appropriate KReference object

type ConfigType

type ConfigType int
const (
	ConfigMapType ConfigType = iota
	SecretType
	RabbitMqType
)

Known config types for broker

type DeliveryOptionFlags

type DeliveryOptionFlags struct {
	SinkFlags     flags.SinkFlags
	RetryCount    int32
	Timeout       string
	BackoffPolicy string
	BackoffDelay  string
	RetryAfterMax string
}

func (*DeliveryOptionFlags) Add

func (d *DeliveryOptionFlags) Add(cmd *cobra.Command)

func (*DeliveryOptionFlags) GetDlSink

func (d *DeliveryOptionFlags) GetDlSink(cmd *cobra.Command, dynamicClient dynamic.KnDynamicClient, namespace string) (*duckv1.Destination, error)

Jump to

Keyboard shortcuts

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