controllers

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	Name string
	Log  *logger.Logger
	// contains filtered or unexported fields
}

Base - base daemon controller ("parent" for all controllers).

func New

func New(name string, log *logger.Logger) *Base

New - constructor of Base controller.

func (*Base) RegisterHandlers

func (b *Base) RegisterHandlers(h ...Handler)

RegisterHandlers - register [] Handler.

func (*Base) RegisterShutdownFunc

func (b *Base) RegisterShutdownFunc(f ShutdownFunc)

RegisterShutdownFunc - register ShutdownFunc.

func (*Base) Run

func (b *Base) Run(ctx context.Context) error

Run - default runner for controllers.

func (*Base) Shutdown

func (b *Base) Shutdown(ctx context.Context)

Shutdown - runs shutdown func register for direct controller.

type Config

type Config struct {
	Slave   slave.Config
	General general.Config
	Master  master.Config
}

Config - config of all controllers.

type DaemonController

type DaemonController interface {
	Run(ctx context.Context) error
	Shutdown(ctx context.Context)
}

DaemonController - interface which describe DaemonController service.

type Handler

type Handler = func(ctx context.Context) error

Handler - handlers for broker events.

type ShutdownFunc

type ShutdownFunc = func(ctx context.Context)

ShutdownFunc - func which will invoke when controller will finished.

Directories

Path Synopsis
scanner
Package scanner - package for price scanning
Package scanner - package for price scanning

Jump to

Keyboard shortcuts

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