command

package
v0.0.0-...-3b05df2 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultConfig

func DefaultConfig(service string) string

func Indent

func Indent(n int, s string) string

func IndentLine

func IndentLine(s string) string

func NewCtl

func NewCtl() *cobra.Command

func NewDaemon

func NewDaemon() *cobra.Command

func NewWorker

func NewWorker() *cobra.Command

func ParseConfig

func ParseConfig(configPath string, data any, envPrefix string, subKey string) (*viper.Viper, error)

func ParseFilesToObjects

func ParseFilesToObjects(items []files.Item) (map[string][]v1.UnstructuredObject, error)

func Register

func Register(cmd *cobra.Command, name string, short string, opts ...any) *cobra.Command

Types

type DaemonConfig

type DaemonConfig struct {
	Server   server.Config   `json:"server"`
	Logger   wslog.Config    `json:"logger,omitempty"`
	Database database.Config `json:"database,omitempty"`
	Queue    queue.Config    `json:"queue,omitempty"`
	Livelog  livelog.Config  `json:"livelog"`
}

func (*DaemonConfig) Validate

func (c *DaemonConfig) Validate() error

type DaemonOption

type DaemonOption struct {
	ConfigPath   string
	ConfigSubKey string
}

type Example

type Example string

func (Example) String

func (s Example) String() string

type WorkerConfig

type WorkerConfig struct {
	Logger  wslog.Config       `json:"logger,omitempty"`
	Workers []WorkerItemConfig `json:"workers,omitempty"`
}

func (*WorkerConfig) Validate

func (c *WorkerConfig) Validate() error

type WorkerItemConfig

type WorkerItemConfig struct {
	Name   string     `json:"name"`
	Addr   string     `json:"addr"`
	Count  int        `json:"count"`
	Worker *v1.Worker `json:"worker"`
}

type WorkerOption

type WorkerOption struct {
	ConfigPath   string
	ConfigSubKey string
}

Jump to

Keyboard shortcuts

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