client

package
v0.0.1-beta2 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Version = 0
	Prompt  = "> "
)

Variables

This section is empty.

Functions

func Print

func Print(out io.Writer, msg vtp.Message, group *sync.WaitGroup)

func PrintEnv

func PrintEnv(out io.Writer, env *environment)

Types

type CmdClient

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

func NewCmdClient

func NewCmdClient(bindTo string) *CmdClient

func (*CmdClient) Repl

func (c *CmdClient) Repl(in io.Reader, out io.Writer)

type Evaluator

type Evaluator interface {
	Eval(string) []vtp.Message
}

type Repl

type Repl interface {
	Repl(in io.Reader, out io.Writer)
}

type Scanner

type Scanner interface {
	Text() string
	Scan() bool
}

type TCPClient

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

func NewTCPClient

func NewTCPClient(config TCPClientConfig) *TCPClient

func (*TCPClient) Alias

func (c *TCPClient) Alias(index, alias string, cb callback)

func (*TCPClient) Drop

func (c *TCPClient) Drop(index string, cb callback)

func (*TCPClient) Error

func (c *TCPClient) Error(fn errorCallback)

func (*TCPClient) Index

func (c *TCPClient) Index(index, name, payload string, format entities.MimeType, cb callback)

func (*TCPClient) Request

func (c *TCPClient) Request(msg vtp.Message)

func (*TCPClient) Responses

func (c *TCPClient) Responses() <-chan vtp.Message

func (*TCPClient) Search

func (c *TCPClient) Search(index, terms string, engine search.EngineType, cb callback)

func (*TCPClient) ShowIndices

func (c *TCPClient) ShowIndices(cb callback)

func (*TCPClient) Start

func (c *TCPClient) Start(ctx context.Context)

func (*TCPClient) Stop

func (c *TCPClient) Stop()

func (*TCPClient) UnAlias

func (c *TCPClient) UnAlias(index, alias string, cb callback)

type TCPClientConfig

type TCPClientConfig struct {
	BindTo       string
	ReadPoolSize int
	ProxyStream  bool
}

Jump to

Keyboard shortcuts

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