services

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ServiceNotFoundErr error = errors.New("no matching service found")
)

Functions

func GetService

func GetService[TService Service](c ServiceContainer) (TService, error)

func MustGetService

func MustGetService[TService Service](c ServiceContainer) TService

Types

type Service

type Service interface {
	threading.BackgroundJob
}

type ServiceContainer

type ServiceContainer interface {
	InjectService(service Service)
	ListServices() []Service
	GetServiceByName(name string) Service
	RemoveService(service Service)
	Start() <-chan error
	Stop()
}

func NewServiceContainer

func NewServiceContainer() ServiceContainer

Jump to

Keyboard shortcuts

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