infraoperator

package
v1.10.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

type Checker interface {
	// Check should block until all underlying services reported their status
	Check(ctx context.Context) error
}

Checker interface is used for live-checks in background processed

type Operator

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

func (*Operator) AddService

func (o *Operator) AddService(ctx context.Context, service interface{}) error

AddService starts the service and puts it under operator's control. returns service's start error

func (*Operator) Check

func (o *Operator) Check(ctx context.Context) map[interface{}]error

Check does a live-check on all services. Returns map with

key = service reference
value = service stop errors

func (*Operator) RemoveService

func (o *Operator) RemoveService(ctx context.Context, service interface{}) error

RemoveService stops service and removes it service from operator's control. returns service's stop error

func (*Operator) StopAll

func (o *Operator) StopAll(ctx context.Context) map[interface{}]error

StopAll removes all checks and stops all services.

type Starter

type Starter interface {
	// Start should block until all underlying services are started
	Start(ctx context.Context) error
}

Starter interface is used to start background processes

type Stopper

type Stopper interface {
	// Stop should block until all underlying services are stopped
	Stop(ctx context.Context) error
}

Stopper interface is used to stop background processed

Jump to

Keyboard shortcuts

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