config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultNamesrvAddr = "127.0.0.1:9876"
	FlagAccessKey      = "accessKey"
	FlagConfig         = "config"
	FlagContext        = "context"
	FlagNameserver     = "nameserver"
	FlagSecretKey      = "secretKey"
)
View Source
const AnnotationSkipResolve = "rmq.echooymxq.io/skip-resolve"

Variables

This section is empty.

Functions

func ShouldSkipResolve

func ShouldSkipResolve(cmd *cobra.Command) bool

func SplitAndTrim

func SplitAndTrim(value string) []string

Types

type ContextStore

type ContextStore struct {
	ConfigFile string
	Current    string
	Contexts   []ContextSummary
}

type ContextSummary

type ContextSummary struct {
	Name         string
	Current      bool
	NamesrvAddrs []string
	AccessKey    string
}

type RocketMQConfig

type RocketMQConfig struct {
	ConfigFile   string
	Context      string
	AccessKey    string
	SecretKey    string
	NamesrvAddrs string

	Runtime RuntimeConfig
}

func (*RocketMQConfig) AddContext

func (r *RocketMQConfig) AddContext(name string, namesrvAddrs []string, accessKey, secretKey string) error

func (*RocketMQConfig) ContextExists

func (r *RocketMQConfig) ContextExists(name string) (bool, error)

func (*RocketMQConfig) GetNamesrvAddrs

func (r *RocketMQConfig) GetNamesrvAddrs() []string

func (*RocketMQConfig) InstallRocketMQFlags

func (r *RocketMQConfig) InstallRocketMQFlags(cmd *cobra.Command)

func (*RocketMQConfig) InstallRootFlags

func (r *RocketMQConfig) InstallRootFlags(cmd *cobra.Command)

func (*RocketMQConfig) Load

func (r *RocketMQConfig) Load() error

func (*RocketMQConfig) LoadContextStore

func (r *RocketMQConfig) LoadContextStore() (ContextStore, error)

func (*RocketMQConfig) Resolve

func (r *RocketMQConfig) Resolve(cmd *cobra.Command) error

func (*RocketMQConfig) SetCurrentContext

func (r *RocketMQConfig) SetCurrentContext(name string) error

type RuntimeConfig

type RuntimeConfig struct {
	Context      string
	ConfigFile   string
	NamesrvAddrs []string
	AccessKey    string
	SecretKey    string
}

Jump to

Keyboard shortcuts

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