app

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: MIT Imports: 5 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
}

func NewApplication

func NewApplication() *App

func (*App) RegisterOnRun

func (app *App) RegisterOnRun(f func())

func (*App) RegisterOnShutdown

func (app *App) RegisterOnShutdown(f func())

func (*App) RegisterRunner

func (app *App) RegisterRunner(service Runner)

func (*App) Run

func (app *App) Run()

type Application

type Application interface {
	Run()
	RegisterRunner(runner Runner)
	RegisterOnRun(f func())
	RegisterOnShutdown(f func())
}

type Runner

type Runner interface {
	Run(ctx context.Context)
}

func NewRunner

func NewRunner(name string, task func(context.Context)) Runner

func RunnerFunc

func RunnerFunc(start, stop func()) Runner

Directories

Path Synopsis
db
message_queue
For generate mocks on sarama interfaces
For generate mocks on sarama interfaces
app
Package mock_app is a generated GoMock package.
Package mock_app is a generated GoMock package.
httputils
Package mock_httputils is a generated GoMock package.
Package mock_httputils is a generated GoMock package.

Jump to

Keyboard shortcuts

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