supervisor

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main(version string, fn MainFn) cliapp.LifecycleAction

Main is the entrypoint into the Supervisor. This method returns a cliapp.LifecycleAction, to create an op-service CLI-lifecycle-managed supervisor with.

Types

type Backend

type Backend interface {
	frontend.Backend
	io.Closer
}

type MainFn

type MainFn func(ctx context.Context, cfg *config.Config, logger log.Logger) (cliapp.Lifecycle, error)

type SupervisorService

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

SupervisorService implements the full-environment bells and whistles around the Supervisor. This includes the setup and teardown of metrics, pprof, admin RPC, regular RPC etc.

func SupervisorFromConfig

func SupervisorFromConfig(ctx context.Context, cfg *config.Config, logger log.Logger) (*SupervisorService, error)

func (*SupervisorService) Start

func (su *SupervisorService) Start(ctx context.Context) error

func (*SupervisorService) Stop

func (su *SupervisorService) Stop(ctx context.Context) error

func (*SupervisorService) Stopped

func (su *SupervisorService) Stopped() bool

Directories

Path Synopsis
db

Jump to

Keyboard shortcuts

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