plumber

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2022 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingShutdownCtx      = errors.New("ServiceShutdownCtx cannot be nil")
	ErrMissingMainShutdownFunc = errors.New("MainShutdownFunc cannot be nil")
	ErrMissingMainContext      = errors.New("MainContext cannot be nil")
	ErrMissingOptions          = errors.New("CLIOptions cannot be nil")
	ErrMissingPersistentConfig = errors.New("PersistentConfig cannot be nil")
	ErrMissingKongCtx          = errors.New("KongCtx cannot be nil")
	ErrMissingActions          = errors.New("Actions cannot be nil")
)

Functions

func GenerateMessageDescriptors added in v1.0.4

func GenerateMessageDescriptors(cliOpts *opts.CLIOptions) (map[pb.MDType]*desc.MessageDescriptor, error)

Types

type Config

type Config struct {
	PersistentConfig   *config.Config
	Actions            *actions.Actions
	ServiceShutdownCtx context.Context
	CLIOptions         *opts.CLIOptions
	KongCtx            *kong.Context
}

Config contains configurable options for instantiating a new Plumber

type Plumber

type Plumber struct {
	*Config

	Bus     bus.IBus
	RelayCh chan interface{}
	// contains filtered or unexported fields
}

func New

func New(cfg *Config) (*Plumber, error)

New instantiates a properly configured instance of Plumber or a config error

func (*Plumber) HandleBatchCmd added in v1.0.0

func (p *Plumber) HandleBatchCmd() error

HandleBatchCmd handles all commands related to Batch.sh API

func (*Plumber) HandleDynamicCmd added in v1.0.0

func (p *Plumber) HandleDynamicCmd() error

HandleDynamicCmd handles dynamic replay destination mode commands

func (*Plumber) HandleReadCmd added in v1.0.0

func (p *Plumber) HandleReadCmd() error

HandleReadCmd handles CLI read mode

func (*Plumber) HandleRelayCmd added in v1.0.0

func (p *Plumber) HandleRelayCmd() error

HandleRelayCmd handles CLI relay mode. Container/envar mode is handled by processEnvRelayFlags

func (*Plumber) HandleWriteCmd added in v1.0.0

func (p *Plumber) HandleWriteCmd() error

HandleWriteCmd handles write mode

func (*Plumber) Run

func (p *Plumber) Run()

Run is the main entrypoint to the plumber application

func (*Plumber) RunServer added in v1.0.0

func (p *Plumber) RunServer() error

RunServer is a wrapper for starting embedded etcd and starting the gRPC server.

Jump to

Keyboard shortcuts

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