Help us shape the future of Go! Take the 2026 Go Developer Survey

client

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse added in v0.6.0

func Parse(p string, cp *CliPayload) error

func Run

func Run(args []string)

func RunWithOptions

func RunWithOptions(options *Options) error

Types

type C added in v0.6.0

type C uint8
const (
	None C = iota
	Single
	Batch
)

type CliPayload added in v0.6.0

type CliPayload struct {
	Data  map[string]interface{}
	Batch int
}

func (*CliPayload) Bind added in v0.6.0

func (c *CliPayload) Bind(k string, value interface{}, msg *client.Message) error

func (*CliPayload) Iterator added in v0.6.0

func (c *CliPayload) Iterator(pair common.Pair) error

func (*CliPayload) Pair added in v0.6.0

func (c *CliPayload) Pair(key string, value interface{}) error

Not implementating this side of interface, not used -- the interface itself may not be necessary

func (*CliPayload) SetBatch added in v0.6.0

func (c *CliPayload) SetBatch(msg *client.Message)

type Options

type Options struct {
	Host       string `short:"h" long:"host" description:"endpoint host"`
	Port       int    `short:"p" long:"port" description:"endpoint port"`
	Debug      bool   `long:"debug"`
	Model      string `short:"m" long:"model" description:"model"`
	Storable   string `short:"s" long:"storable"`
	PayloadStr string `short:"a" long:"payload"`
	Format     string `short:"f" long:"format" choice:"mly" choice:"json"`
}

func (*Options) Hosts

func (o *Options) Hosts() []*client.Host

func (*Options) Init

func (o *Options) Init()

func (*Options) Payload added in v0.6.0

func (o *Options) Payload() (*CliPayload, error)

func (*Options) Validate

func (o *Options) Validate() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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