cmd

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrServerNotExist = errors.New("event bus be not run")
	ErrClientNotExist = errors.New("event client be not run")
	ErrPipeNotExist   = errors.New("event pipe be not exist")
	ErrInvalidParam   = errors.New("command: invalid param")
	ErrParamsIsEmpty  = errors.New("command: params is empty")
)
View Source
var App = grumble.New(&grumble.Config{
	Name:                  "ebus",
	Description:           "An event bus CLI.",
	HistoryFile:           filepath.Join(os.TempDir(), ".ebus_history"),
	Prompt:                "ebus§ ",
	PromptColor:           color.New(color.FgGreen, color.Bold),
	HelpHeadlineColor:     color.New(color.FgGreen),
	HelpHeadlineUnderline: true,
	HelpSubCommands:       true,

	Flags: func(f *grumble.Flags) {
		f.String("d", "directory", "", "set an alternative root directory path")
		f.Bool("v", "verbose", false, "enable verbose mode")
	},
})

Functions

This section is empty.

Types

type ClientHandler

type ClientHandler struct{}

func (*ClientHandler) OnPipeClosed

func (h *ClientHandler) OnPipeClosed(p protocol.Pipe)

func (*ClientHandler) OnPipeConnected

func (h *ClientHandler) OnPipeConnected(p protocol.Pipe)

func (*ClientHandler) OnPipeDataArrived

func (h *ClientHandler) OnPipeDataArrived(p protocol.Pipe, msg interface{}) error

func (*ClientHandler) OnPipeTimer

func (h *ClientHandler) OnPipeTimer(p protocol.Pipe)

Jump to

Keyboard shortcuts

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