services

package
v0.0.205 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

func NewServiceRegistry

func NewServiceRegistry() *Registry

func (*Registry) Get

func (r *Registry) Get(name ServiceName) (Service, bool)

func (*Registry) Register

func (r *Registry) Register(name ServiceName, service Service)

func (*Registry) StartAll

func (r *Registry) StartAll()

func (*Registry) StopAll

func (r *Registry) StopAll() error

type Service

type Service interface {
	// Start starts the service
	Start() error

	// Stop stops the service
	Stop() error

	// Reload reloads the service
	Reload() error

	// IsRunning returns true if the service is running
	IsRunning() bool

	// IsEnabled returns true if the service is enabled
	IsEnabled() bool
}

type ServiceName

type ServiceName string
const (
	VTunServiceName    ServiceName = "vtun"
	OLSRServiceName    ServiceName = "olsr"
	BabelServiceName   ServiceName = "babel"
	DNSMasqServiceName ServiceName = "dnsmasq"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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