app

package
v0.0.0-...-dec19c8 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

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

App is a common skeleton for daemon application.

func New

func New(initializer Initializer) *App

func (*App) Logger

func (app *App) Logger() *zap.Logger

func (*App) Run

func (app *App) Run() int

func (*App) RunWithContextAndConfig

func (app *App) RunWithContextAndConfig(ctx context.Context, configFileName string) int

func (*App) SetLogger

func (app *App) SetLogger(logger *zap.Logger)

func (*App) Viper

func (app *App) Viper() *config.ViperEC

type Closer

type Closer interface {
	Close()
}

type Initializer

type Initializer func(context.Context) ([]Runner, []Closer, bool)

type Runner

type Runner interface {
	Run(ctx context.Context, wg *sync.WaitGroup, errc chan<- error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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