cli

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2022 License: MIT Imports: 29 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConfigFromCLI added in v1.2.3

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

NewConfigFromCLI reads config from os.Args. It returns config, error (if any) and a bool value indicating that the usage message or version was shown, no further action required.

Types

type Option added in v1.2.3

type Option func(*Runner) error

Option represents a Runner configuration function

func WithController added in v1.2.3

func WithController(fn controllerFactory) Option

WithName is an Option to set Runner controller

func WithDefaultRPCController added in v1.2.3

func WithDefaultRPCController() Option

WithDefaultRPCController is an Option to set Runner controller to default rpc.Controller

func WithDefaultSubscriber added in v1.2.3

func WithDefaultSubscriber() Option

WithDefaultSubscriber is an Option to set Runner subscriber to pubsub.NewSubscriber

func WithName added in v1.2.3

func WithName(name string) Option

WithName is an Option to set Runner name

func WithSubscriber added in v1.2.3

func WithSubscriber(fn subscriberFactory) Option

WithSubscriber is an Option to set Runner subscriber

type Runner added in v1.1.0

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

func NewRunner added in v1.1.0

func NewRunner(c *config.Config, options []Option) *Runner

NewRunner creates returns new Runner structure

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

Run starts the instance

func (*Runner) SetRouter added in v1.2.0

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

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