cli

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2022 License: MIT Imports: 27 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Config added in v0.6.3

func Config(args []string) (config.Config, error)

Config returns CLI configuration

func DebugMode

func DebugMode() bool

DebugMode returns true if -debug flag is provided

func PrintHelp

func PrintHelp()

PrintHelp prints CLI usage instructions to STDOUT

func ShowHelp

func ShowHelp() bool

ShowHelp returns true if -h flag was provided

func ShowVersion

func ShowVersion() bool

ShowVersion returns true if -v flag was provided

Types

type Runner added in v1.1.0

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

func NewRunner added in v1.1.0

func NewRunner(name string, config *config.Config) *Runner

func (*Runner) ControllerFactory added in v1.1.0

func (r *Runner) ControllerFactory(fn controllerFactory)

func (*Runner) DisconnectorFactory added in v1.1.0

func (r *Runner) DisconnectorFactory(fn disconnectorFactory)

func (*Runner) Router added in v1.2.0

func (r *Runner) Router() *router.RouterController

func (*Runner) Run added in v1.1.0

func (r *Runner) Run() error

func (*Runner) SetRouter added in v1.2.0

func (r *Runner) SetRouter(router *router.RouterController)

func (*Runner) SubscriberFactory added in v1.1.0

func (r *Runner) SubscriberFactory(fn subscriberFactory)

func (*Runner) WebsocketHandler added in v1.1.0

func (r *Runner) WebsocketHandler(fn websocketHandler)

type Shutdownable added in v1.1.0

type Shutdownable interface {
	Shutdown() error
}

Jump to

Keyboard shortcuts

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