commander

package
v0.0.0-...-cf31420 Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func New

func New(opts ...ServerOption) (manager.Service, error)

func ServerOptions

func ServerOptions(opts []ServerOption) (*serverOptions, error)

Types

type Commander

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

func (*Commander) Start

func (c *Commander) Start() error

func (*Commander) Stop

func (c *Commander) Stop() error

type ServerOption

type ServerOption interface {
	// contains filtered or unexported methods
}

func InterruptOn

func InterruptOn(interruptCh <-chan interface{}) ServerOption

InterruptOn interrupts server on the signal from server. If channel is nil Start() will block forever.

func WithConfig

func WithConfig(cfg *config.Config) ServerOption

WithConfig sets a custom configuration

func WithConfigLoader

func WithConfigLoader(configDir string) ServerOption

WithConfigLoader sets a custom configuration load

func WithLogger

func WithLogger(logger logger.Logger) ServerOption

WithLogger sets a custom logger

func WithServices

func WithServices(names []string) ServerOption

WithServices indicates which supplied services (e.g. frontend, worker) within the server to start

Directories

Path Synopsis
services

Jump to

Keyboard shortcuts

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