service

package
v0.0.0-...-c8b884f Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxEventSize = 20
)

Variables

This section is empty.

Functions

func NewService

func NewService(name string, ln listener.Listener, h handler.Handler, opts ...Option) service.Service

Types

type Event

type Event struct {
	Time    time.Time
	Message string
}

type Option

type Option func(opts *options)

func AdmissionOption

func AdmissionOption(admission admission.Admission) Option

func LoggerOption

func LoggerOption(logger logger.Logger) Option

func ObserverOption

func ObserverOption(observer observer.Observer) Option

func PostDownOption

func PostDownOption(cmds []string) Option

func PostUpOption

func PostUpOption(cmds []string) Option

func PreDownOption

func PreDownOption(cmds []string) Option

func PreUpOption

func PreUpOption(cmds []string) Option

func RecordersOption

func RecordersOption(recorders ...recorder.RecorderObject) Option

func StatsOption

func StatsOption(stats *stats.Stats) Option

type ServiceEvent

type ServiceEvent struct {
	Kind    string
	Service string
	State   State
	Msg     string
}

func (ServiceEvent) Type

type State

type State string
const (
	StateRunning State = "running"
	StateReady   State = "ready"
	StateFailed  State = "failed"
	StateClosed  State = "closed"
)

type Status

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

func (*Status) CreateTime

func (p *Status) CreateTime() time.Time

func (*Status) Events

func (p *Status) Events() []Event

func (*Status) State

func (p *Status) State() State

func (*Status) Stats

func (p *Status) Stats() *stats.Stats

Jump to

Keyboard shortcuts

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