app

package
v0.0.0-...-ea178e4 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(onStart OnStart)

Start starts the application.

Types

type App

type App struct {
	Name   string
	Config config.Config
	// contains filtered or unexported fields
}

App represents the application run by this service.

func (*App) OnShutdown

func (a *App) OnShutdown(onShutdown func())

OnShutdown registers a function that is called when the app is shutdown.

type Listener

type Listener interface {
	Listen(context.Context) error
}

Listener represents a type that can listen for incoming connections.

type OnShutdownFunc

type OnShutdownFunc func()

OnShutdownFunc is a function that is called when the app is shutdown.

type OnStart

type OnStart func(context.Context, *App) ([]Listener, error)

OnStart is a function that is called when the app is started.

Jump to

Keyboard shortcuts

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