shell

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2021 License: Apache-2.0 Imports: 13 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".

func WithFormat added in v1.10.2

func WithFormat(format string) Option

WithFormat specifies the output format.

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