command

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: MIT Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultTimeout = time.Second * 15

Variables

This section is empty.

Functions

func PathEnvDecoder

func PathEnvDecoder() kong.MapperFunc

func WithConn

func WithConn(addr string, fn func(client zproto.ZanderClient) error) error

func WithConnTimeout

func WithConnTimeout(addr string, timeout time.Duration, fn func(ctx context.Context, client zproto.ZanderClient) error) error

func XDGRuntimeFile

func XDGRuntimeFile() kong.MapperFunc

Types

type AttachCmd

type AttachCmd struct {
	ID string `arg:"" required:"true" help:"ID of doom server to attach to" predictor:"server_list"`

	Output                    string `flag:"" enum:"raw,default" default:"default" help:"Output mode. (valid values: ${enum})"`
	ScrollLines               int    `flag:"" default:"5" help:"How many lines to scroll when pgup and pgdn are pressed. Only valid in default output mode"`
	CmdHistoryLen             int    `flag:"" default:"500" help:"How many entered commands to remember"`
	DeDuplicatedHistoryAppend bool   `` /* 127-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*AttachCmd) Run

func (a *AttachCmd) Run(cmdCtx CmdCtx) error

type CmdCtx

type CmdCtx struct {
	Commit    string
	Version   string
	Date      string
	GoVersion string
	Socket    string
}

type ListServersCmd

type ListServersCmd struct {
	Output  string   `` /* 135-byte string literal not displayed */
	Columns []string `` /* 277-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ListServersCmd) Run

func (l *ListServersCmd) Run(cmdCtx CmdCtx) error

type LogsCmd added in v0.1.9

type LogsCmd struct {
	ID    string `arg:"" required:"true" help:"ID of doom server to print logs from" predictor:"server_list"`
	Lines int    `short:"n" default:"-1" help:"The number of recent lines to print"`
	Tail  bool   `short:"t" help:"Run in tail mode"`
}

func (*LogsCmd) Run added in v0.1.9

func (t *LogsCmd) Run(cmdCtx CmdCtx) error

type ReloadCmd added in v0.2.0

type ReloadCmd struct{}

func (*ReloadCmd) Run added in v0.2.0

func (r *ReloadCmd) Run(cmdCtx CmdCtx) error

type RestartServerCmd

type RestartServerCmd struct {
	Ids []string `arg:"" required:"true" help:"Doom servers to restart" predictor:"server_list"`
}

func (*RestartServerCmd) Run

func (r *RestartServerCmd) Run(cmdCtx CmdCtx) error

type Server

type Server struct {
	ConfigDir string `flag:"" short:"c" type:"path" description:"Directory containing zander configuration. Defaults to $XDG_CONFIG_HOME/zander"`
	// contains filtered or unexported fields
}

func (*Server) Run

func (s *Server) Run(cmdctx CmdCtx) error

type StartServerCmd

type StartServerCmd struct {
	Ids []string `arg:"" required:"true" help:"Doom servers to start" predictor:"server_list"`
}

func (*StartServerCmd) Run

func (r *StartServerCmd) Run(cmdCtx CmdCtx) error

type StopServerCmd

type StopServerCmd struct {
	Ids []string `arg:"" required:"true" help:"Doom servers to stop" predictor:"server_list"`
}

func (*StopServerCmd) Run

func (r *StopServerCmd) Run(cmdCtx CmdCtx) error

type VersionCmd

type VersionCmd struct{}

func (*VersionCmd) Run

func (v *VersionCmd) Run(ctx CmdCtx) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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