cmd

package
v0.21.2 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultNewRegistryFuncs new registry functions
	DefaultNewRegistryFuncs = map[service.RegisterType]registry.NewRegistryFunc{
		service.RegisterType_memory: memory.NewRegistry,
		service.RegisterType_etcd:   etcd.NewRegistry,
	}

	// DefaultHiddenVersions hidden versions
	DefaultHiddenVersions = []string{"0", "0.0", "0.0.0", "v0", "v0.0", "v0.0.0"}

	// DefaultCompManager default components manager
	DefaultCompManager = routes.NewCompManager()
)

Functions

func RegisterComponentFunc

func RegisterComponentFunc(service *service.Service, fn component.NewComponentFunc)

RegisterComponentFunc regist component funciton into default local route

Types

type Cmd

type Cmd interface {
	// Init initialises options
	// Note: Use Run to parse command line
	Init(opts ...Option) error
	// Options set within this command
	Options() Options

	App() *cli.App

	service.LifeCycle

	BlockRun() error
}

Cmd command

func New

func New(opts ...Option) (Cmd, error)

New new command interface

type Option

type Option func(*Options)

func ConfigFile

func ConfigFile(filepath string) Option

func WithConfig

func WithConfig(c *configure.Configure) Option

type Options

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

Jump to

Keyboard shortcuts

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