shell

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*options)

Option that can be used to tweak shell parameters.

func WithDialFunc

func WithDialFunc(dial client.DialFunc) Option

WithDialFunc sets a custom dial function for connecting to dqlite endpoints.

func WithDriverName

func WithDriverName(name string) Option

WithDriverName sets a custom name for the registered dqlite driver. The default is "dqlite".

type Shell

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

Shell can be used to implement interactive prompts for inspecting a dqlite database.

func New

func New(database string, store client.NodeStore, options ...Option) (*Shell, error)

New creates a new Shell connected to the given database.

func (*Shell) Process

func (s *Shell) Process(ctx context.Context, line string) (string, error)

Process a single input line.

Jump to

Keyboard shortcuts

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