server

package
v0.0.0-...-a3585ed Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PreRebootEndpoint is the endpoint for requesting a semaphore lock.
	PreRebootEndpoint = "/v1/pre-reboot"
)
View Source
const (
	// SteadyStateEndpoint is the endpoint for releasing a semaphore lock.
	SteadyStateEndpoint = "/v1/steady-state"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Airlock

type Airlock struct {
	config.Settings
}

Airlock is the main service

func (*Airlock) PreReboot

func (a *Airlock) PreReboot() http.Handler

PreReboot is the handler for the `/v1/pre-reboot` endpoint.

func (*Airlock) RegisterMetrics

func (a *Airlock) RegisterMetrics() error

RegisterMetrics registers all server-related metrics.

func (*Airlock) RunConsistencyChecker

func (a *Airlock) RunConsistencyChecker(ctx context.Context)

RunConsistencyChecker runs a continuous checker for consistency between configuration and remote state.

func (*Airlock) SteadyState

func (a *Airlock) SteadyState() http.Handler

SteadyState is the handler for the `/v1/steady-state` endpoint.

type HTTPParams

type HTTPParams struct {
	ClientParams Params `json:"client_params"`
}

HTTPParams contains all parameters for a remote lock request.

type NodeIdentity

type NodeIdentity struct {
	Group string
	ID    string
}

NodeIdentity contains validated client identity from request parameters.

type Params

type Params struct {
	Group string `json:"group"`
	ID    string `json:"id"`
}

Params contains client parameters for a remote lock request.

Jump to

Keyboard shortcuts

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