server

package
v0.11.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComponentStatus

type ComponentStatus interface {
	Ready() bool
	Healthy() bool
	Status() Status
}

type Config

type Config struct {
	Client client.AlertingClient
}

type InitializerF

type InitializerF interface {
	InitOnce(f func())
	Initialized() bool
	WaitForInit()
	WaitForInitContext(ctx context.Context) error
}

type ServerComponent

type ServerComponent interface {
	InitializerF
	ComponentStatus
	Name() string

	SetConfig(config Config)
	// Server components that manage independent dependencies
	// should implement this method to sync them
	// Sync implementations should be cancellable on ctx.Err()
	Sync(ctx context.Context, info sync.SyncInfo) error
}

type Status

type Status struct {
	Running bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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