Documentation
¶
Overview ¶
Package cmds has command line command.
Index ¶
- Constants
- Variables
- func HookBase(ctx context.Context) (context.Context, error)
- func HookCleanContainers(ctx context.Context) (context.Context, error)
- func HookCleanStoppedNodeContainers(ctx context.Context) (context.Context, error)
- func HookCloseHosts(ctx context.Context) (context.Context, error)
- func HookCloseMongodb(ctx context.Context) (context.Context, error)
- func HookConfigStorage(ctx context.Context) (context.Context, error)
- func HookContestReady(ctx context.Context) (context.Context, error)
- func HookStopLogHandlers(ctx context.Context) (context.Context, error)
- func HookVars(ctx context.Context) (context.Context, error)
- func LoadExitChanContextValue(ctx context.Context, l *chan error) error
- func LoadExitErrorContextValue(ctx context.Context, l *error) error
- func NewHostCommandAction(ctx context.Context, args []string) (host.Action, error)
- func ProcessConfig(ctx context.Context) (context.Context, error)
- func ProcessHosts(ctx context.Context) (context.Context, error)
- func ProcessLogSaver(ctx context.Context) (context.Context, error)
- func ProcessLogWatcher(ctx context.Context) (context.Context, error)
- func ProcessMongodb(ctx context.Context) (context.Context, error)
- func ProcessNodes(ctx context.Context) (context.Context, error)
- type BaseNodesAction
- type CustomNodesAction
- type HostCommandAction
- type InitNodesAction
- type KillAction
- type LoadAction
- type RunCommand
- type StartNodesAction
- type StopNodesAction
Constants ¶
View Source
const ( ProcessNameConfig = "config" HookNameConfigStorage = "config_storage" )
View Source
const ( ProcessNameHosts = "hosts" HookNameCleanStoppedNodeContainers = "clean_stopped_node_containers" )
View Source
const ( ProcessNameLogWatcher = "log_watcher" HookNameStopLogHandlers = "stop_log_handlers" )
View Source
const ( ProcessNameMongodb = "mongodb" HookNameCloseMongodb = "close_mongodb" )
View Source
const (
HookNameBase = "base"
)
View Source
const HookNameCleanContainers = "clean_containers"
View Source
const HookNameContestReady = "contest_ready"
View Source
const HookNameVars = "vars"
View Source
const ProcessNameLogSaver = "log_saver"
View Source
const ProcessNameNodes = "nodes"
Variables ¶
View Source
var ( ContextValueExitError util.ContextKey = "exit_error" ContextValueExitChan util.ContextKey = "exit_chan" )
View Source
var ( ProcessorHosts pm.Process HookNameCloseHosts = "close_hosts" )
View Source
var ActionLoaders = map[string]LoadAction{
"init-nodes": initNodesActionFunc,
"start-nodes": startNodesActionFunc,
"custom-nodes": customNodesActionFunc,
"stop-nodes": stopNodesActionFunc,
"kill": killActionFunc,
"host-command": hostCommandActionFunc,
}
View Source
var ProcessorConfig pm.Process
View Source
var ProcessorLogSaver pm.Process
View Source
var ProcessorLogWatcher pm.Process
View Source
var ProcessorMongodb pm.Process
View Source
var ProcessorNodes pm.Process
Functions ¶
func NewHostCommandAction ¶
Types ¶
type BaseNodesAction ¶
func NewBaseNodesAction ¶
func (BaseNodesAction) Map ¶
func (ac BaseNodesAction) Map() map[string]interface{}
func (*BaseNodesAction) Name ¶
func (ac *BaseNodesAction) Name() string
type CustomNodesAction ¶
type CustomNodesAction struct {
*BaseNodesAction
}
func NewCustomNodesAction ¶
func (CustomNodesAction) MarshalJSON ¶
func (ac CustomNodesAction) MarshalJSON() ([]byte, error)
type HostCommandAction ¶
func (*HostCommandAction) Map ¶
func (ac *HostCommandAction) Map() map[string]interface{}
func (HostCommandAction) MarshalJSON ¶
func (ac HostCommandAction) MarshalJSON() ([]byte, error)
func (*HostCommandAction) Name ¶
func (*HostCommandAction) Name() string
type InitNodesAction ¶
type InitNodesAction struct {
*BaseNodesAction
}
func NewInitNodesAction ¶
func NewInitNodesAction(ctx context.Context, aliases []string) (*InitNodesAction, error)
func (InitNodesAction) MarshalJSON ¶
func (ac InitNodesAction) MarshalJSON() ([]byte, error)
type KillAction ¶
type KillAction struct {
// contains filtered or unexported fields
}
func (KillAction) MarshalJSON ¶
func (KillAction) MarshalJSON() ([]byte, error)
func (KillAction) Name ¶
func (KillAction) Name() string
type LoadAction ¶
type RunCommand ¶
type RunCommand struct { *logging.Logging *mitumcmds.LogFlags RunnerFile string `arg:"" name:"runner-file" type:"existingfile"` Design mitumcmds.FileLoad `arg:"" name:"contest design file" help:"contest design file"` ContestLogDir string `name:"contest-log-dir" help:"contest logs directory"` Force bool `name:"force" help:"kill the still running node containers"` CleanAfter bool `name:"clean-after" help:"clean node containers after exit"` ExitAfter time.Duration `name:"exit-after" help:"exit contest"` ConfigOnly bool `name:"config-only" help:"exit after config"` // contains filtered or unexported fields }
func NewRunCommand ¶
func NewRunCommand() (RunCommand, error)
type StartNodesAction ¶
type StartNodesAction struct {
*BaseNodesAction
}
func NewStartNodesAction ¶
func (StartNodesAction) MarshalJSON ¶
func (ac StartNodesAction) MarshalJSON() ([]byte, error)
type StopNodesAction ¶
type StopNodesAction struct {
*BaseNodesAction
}
func NewStopNodesAction ¶
func NewStopNodesAction(ctx context.Context, aliases []string) (*StopNodesAction, error)
func (StopNodesAction) MarshalJSON ¶
func (ac StopNodesAction) MarshalJSON() ([]byte, error)
Click to show internal directories.
Click to hide internal directories.