app

package
v0.0.0-...-6343e97 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: Apache-2.0 Imports: 9 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
	// 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