servicemanager

package
v0.0.0-...-0ad626a Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GenericService

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

func NewGenericService

func NewGenericService(name string, dependencies []string, run RunFunc) *GenericService

func (*GenericService) Dependencies

func (s *GenericService) Dependencies() []string

func (*GenericService) Name

func (s *GenericService) Name() string

func (*GenericService) Run

func (s *GenericService) Run(ctx context.Context, ready chan<- struct{}, stopped chan<- struct{}) error

type RunFunc

type RunFunc func(ctx context.Context, ready chan<- struct{}, stopped chan<- struct{}) error

type Runner

type Runner interface {
	Run(ctx context.Context, ready chan<- struct{}, stopped chan<- struct{}) error
}

type Service

type Service interface {
	Name() string
	Dependencies() []string
	Runner
}

type ServiceManager

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

func NewServiceManager

func NewServiceManager(startRec *startuprecorder.StartupRecorder) *ServiceManager

func (*ServiceManager) AddService

func (m *ServiceManager) AddService(s Service) error

func (*ServiceManager) Dependencies

func (s *ServiceManager) Dependencies() []string

func (*ServiceManager) Name

func (s *ServiceManager) Name() string

func (*ServiceManager) Run

func (m *ServiceManager) Run(ctx context.Context, ready chan<- struct{}, stopped chan<- struct{}) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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