application

package
v0.0.0-...-7c6bc89 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbstractComponent

type AbstractComponent struct {
	Ctx    context.Context
	Cancel context.CancelFunc
	Wg     *sync.WaitGroup
	// contains filtered or unexported fields
}

func (*AbstractComponent) MakeLocalCtxAndWg

func (s *AbstractComponent) MakeLocalCtxAndWg(mainParams *MainParams)

func (*AbstractComponent) Stop

func (s *AbstractComponent) Stop()

func (*AbstractComponent) WaitAndDo

func (s *AbstractComponent) WaitAndDo(doAfter ...func())

type Application

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

func New

func New(appName string, appVersion string) *Application

func (*Application) Add

func (s *Application) Add(components ...Runnable) *Application

func (*Application) Run

func (s *Application) Run() error

func (*Application) Stop

func (s *Application) Stop(timeout time.Duration)

func (*Application) Wait

func (s *Application) Wait()

type MainParams

type MainParams struct {
	Ctx     context.Context
	Wg      *sync.WaitGroup
	AppStop func()
}

type Runnable

type Runnable interface {
	Run(*MainParams) error
	Stop()
}

Jump to

Keyboard shortcuts

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