app

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 11, 2022 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App added in v0.1.1

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

App handles application lifecycle.

func Initialize added in v0.1.1

func Initialize() (*App, error)

Initialize dependencies graph.

func NewApp added in v0.1.1

func NewApp(log *zerolog.Logger) *App

NewApp creates and returns new App.

func (*App) RegisterWorkers added in v0.1.1

func (a *App) RegisterWorkers(workers ...Worker)

RegisterWorkers allows to add workers into app lifecycle. App will keep them alive until shutdown signal is received.

func (*App) Run added in v0.1.1

func (a *App) Run()

Run application, block until interruption received, and handle graceful shutdown.

type Worker added in v0.1.1

type Worker interface {
	Start()
	Close() error
}

Worker describes something that starts working when Start is called and stops when Close is called.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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