cli

package
v1.119.9 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig(cmd *cobra.Command, ball *mud.Ball, selector mud.ComponentSelector) (err error)

LoadConfig loads configuration with vip, and binds it to the registered (and selected) Config components. Simplified version of the logic, what we already have in storj.io/shared/process.

func NewComponentCmd

func NewComponentCmd(ctx context.Context, ball *mud.Ball, selector mud.ComponentSelector) *cobra.Command

NewComponentCmd creates a new components command with subcommands.

Types

type Factory

type Factory struct {
	Defaults    cfgstruct.BindOpt
	ConfDir     string
	IdentityDir string
	UseColor    bool
}

Factory contains default values for configuration flags.

func NewRootCmd

func NewRootCmd(name string, module func(ball *mud.Ball)) (*cobra.Command, *Factory)

NewRootCmd creates a new root command.

Jump to

Keyboard shortcuts

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