service

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListenAndServe

func ListenAndServe(s Service) error

Types

type Service

type Service interface {
	Name() string
	Address() string
	Serve() error
	Shutdown(ctx context.Context) error
	Logger() *logrus.Entry
}

func Create

func Create(ctx context.Context, name string) ([]Service, error)

type ServiceFactory

type ServiceFactory func(context.Context) (Service, error)

type ServiceManager

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

func NewServiceManager

func NewServiceManager(services ...Service) *ServiceManager

func (*ServiceManager) RunAll

func (m *ServiceManager) RunAll(ctx context.Context, cancel context.CancelCauseFunc) <-chan error

Jump to

Keyboard shortcuts

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