root

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidOperator = errors.New("not a valid operator")
)

Functions

This section is empty.

Types

type Command

type Command interface {
	Execute(rpc clientrpc.RootRPCClient, msg *rootpb.Operator) (proto.Message, error)
	Name() string
}

type ListenerCommand

type ListenerCommand struct {
	Add  subCommand `command:"add" description:"Add a listener" subcommands-optional:"true" `
	Del  subCommand `command:"del" description:"Delete a listener" subcommands-optional:"true" `
	List subCommand `command:"list" description:"List all listeners"`
}

ListenerCommand - Listener command

func (*ListenerCommand) Execute

func (*ListenerCommand) Name

func (ln *ListenerCommand) Name() string

type RootClient

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

func NewRootClient

func NewRootClient(addr string) (*RootClient, error)

func (*RootClient) Execute

func (client *RootClient) Execute(cmd Command, msg *rootpb.Operator) error

type UserCommand

type UserCommand struct {
	Add  subCommand `command:"add" description:"Add a user" subcommands-optional:"true" `
	Del  subCommand `command:"del" description:"Delete a user" subcommands-optional:"true" `
	List subCommand `command:"list" description:"List all users"`
}

UserCommand - User command

func (*UserCommand) Execute

func (user *UserCommand) Execute(rpc clientrpc.RootRPCClient, msg *rootpb.Operator) (proto.Message, error)

func (*UserCommand) Name

func (user *UserCommand) Name() string

Jump to

Keyboard shortcuts

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