plumber

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2022 License: MIT Imports: 42 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")
	ErrMissingTelemetry        = errors.New("Telemetry cannot be nil")
)

Functions

func GenerateMessageDescriptors added in v1.0.4

func GenerateMessageDescriptors(cliOpts *opts.CLIOptions) (*dpb.FileDescriptorSet, error)

Types

type Config

type Config struct {
	Telemetry          telemetry.ITelemetry
	PersistentConfig   *config.Config
	Actions            actions.IActions
	ServiceShutdownCtx context.Context
	MainShutdownFunc   context.CancelFunc
	MainShutdownCtx    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) EnqueueManage added in v1.12.0

func (p *Plumber) EnqueueManage(event posthog.Capture)

func (*Plumber) HandleBatchCmd added in v1.0.0

func (p *Plumber) HandleBatchCmd() error

HandleBatchCmd handles all commands related to Batch.sh API

func (*Plumber) HandleCreateConnectionCmd added in v1.5.0

func (p *Plumber) HandleCreateConnectionCmd(ctx context.Context, client protos.PlumberServerClient) error

func (*Plumber) HandleCreateRelayCmd added in v1.5.0

func (p *Plumber) HandleCreateRelayCmd(ctx context.Context, client protos.PlumberServerClient) error

func (*Plumber) HandleCreateTunnelCmd added in v1.5.0

func (p *Plumber) HandleCreateTunnelCmd(ctx context.Context, client protos.PlumberServerClient) error

func (*Plumber) HandleDeleteConnectionCmd added in v1.5.0

func (p *Plumber) HandleDeleteConnectionCmd(ctx context.Context, client protos.PlumberServerClient) error

func (*Plumber) HandleDeleteRelayCmd added in v1.5.0

func (p *Plumber) HandleDeleteRelayCmd(ctx context.Context, client protos.PlumberServerClient) error

func (*Plumber) HandleDeleteTunnelCmd added in v1.5.0

func (p *Plumber) HandleDeleteTunnelCmd(ctx context.Context, client protos.PlumberServerClient) error

func (*Plumber) HandleGetAllConnectionsCmd added in v1.5.0

func (p *Plumber) HandleGetAllConnectionsCmd(ctx context.Context, client protos.PlumberServerClient) error

func (*Plumber) HandleGetAllRelaysCmd added in v1.5.0

func (p *Plumber) HandleGetAllRelaysCmd(ctx context.Context, client protos.PlumberServerClient) error

func (*Plumber) HandleGetAllTunnelsCmd added in v1.5.0

func (p *Plumber) HandleGetAllTunnelsCmd(ctx context.Context, client protos.PlumberServerClient) error

func (*Plumber) HandleGetConnectionCmd added in v1.5.0

func (p *Plumber) HandleGetConnectionCmd(ctx context.Context, client protos.PlumberServerClient) error

func (*Plumber) HandleGetRelayCmd added in v1.5.0

func (p *Plumber) HandleGetRelayCmd(ctx context.Context, client protos.PlumberServerClient) error

func (*Plumber) HandleGetTunnelCmd added in v1.5.0

func (p *Plumber) HandleGetTunnelCmd(ctx context.Context, client protos.PlumberServerClient) error

func (*Plumber) HandleManageCmd added in v1.5.0

func (p *Plumber) HandleManageCmd() error

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) HandleResumeRelayCmd added in v1.5.0

func (p *Plumber) HandleResumeRelayCmd(ctx context.Context, client protos.PlumberServerClient) error

func (*Plumber) HandleResumeTunnelCmd added in v1.5.0

func (p *Plumber) HandleResumeTunnelCmd(ctx context.Context, client protos.PlumberServerClient) error

func (*Plumber) HandleStopRelayCmd added in v1.5.0

func (p *Plumber) HandleStopRelayCmd(ctx context.Context, client protos.PlumberServerClient) error

func (*Plumber) HandleStopTunnelCmd added in v1.5.0

func (p *Plumber) HandleStopTunnelCmd(ctx context.Context, client protos.PlumberServerClient) error

func (*Plumber) HandleTunnelCmd added in v1.4.0

func (p *Plumber) HandleTunnelCmd() error

HandleTunnelCmd handles tunnel destination mode commands

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