hosting

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Stop

func Stop()

Types

type Host

type Host interface {
	Start(ctx context.Context) task.Task
	Stop(ctx context.Context) task.Task

	Configuration() configuration.Configuration
	Logger() logging.Logger
}

func NewDefaultHost

func NewDefaultHost(logger logging.Logger,
	configuration configuration.Configuration,
	services []HostedService) Host

type HostLifetime

type HostLifetime interface {
	WaitForStart(ctx context.Context) task.Task
	WaitForStop(ctx context.Context) task.Task
	Stop()
}

func NewHostLifetime

func NewHostLifetime() HostLifetime

type HostedService

type HostedService interface {
	Init(logging.Logger, configuration.Configuration)
	Start(context.Context) task.Task
	Stop(context.Context) task.Task
}

Jump to

Keyboard shortcuts

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