core

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnknownCmd = errors.New("unknown command")

Functions

func GetCompleter

func GetCompleter(cmd *Cmd) func(d prompt.Document) []prompt.Suggest

func GetExecutor

func GetExecutor(cmd *Cmd) func(s string)

func ParseCmd

func ParseCmd(cmd string) (name string, options []string)

Types

type Auth

type Auth struct {
	Scheme  string
	Payload []byte
}

func NewAuth

func NewAuth(scheme, auth string) *Auth

type Cmd

type Cmd struct {
	Name        string
	Options     []string
	ExitWhenErr bool
	Conn        *zk.Conn
	Config      *Config
}

func NewCmd

func NewCmd(name string, options []string, conn *zk.Conn, config *Config) *Cmd

func (*Cmd) Run

func (c *Cmd) Run()

type Config

type Config struct {
	Servers []string
	Auth    *Auth

	SlientLog bool
}

func NewConfig

func NewConfig(Servers []string, slientLog bool) *Config

func (*Config) Connect

func (c *Config) Connect() (conn *zk.Conn, err error)

type SuggestCache

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

Jump to

Keyboard shortcuts

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