avuploader

package
v0.99.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AVS_STATUS_DOWN = 0
	AVS_STATUS_UP   = 1
)

Variables

This section is empty.

Functions

func AddControllerToManager

func AddControllerToManager(logger logging.Logger, mgr manager.Manager, config *config.LandscaperServiceConfiguration) error

AddControllerToManager adds the AVUploader controller to the manager

Types

type AvsInstance

type AvsInstance struct {
	// InstanceId is the id of the monitored instance.
	InstanceId string `json:"instanceId"`
	// Name is a name for the instance.
	Name string `json:"name"`
	// OutageReason is the reason this instance is unavailable.
	OutageReason string `json:"outageReason"`
	// Status is the availability status for the instance: 0 = DOWN, 1 = UP.
	Status int `json:"status"`
}

AvsInstance is a status of a single monitored instance.

type AvsRequest

type AvsRequest struct {
	// Timestamp is the timestamp the data was collected. Must be newer than the one in the last request.
	Timestamp int64 `json:"timestamp"`
	// Response time is the time the availability check took.
	ResponseTime int `json:"responseTime"`
	// ResponseStatusCode is the http response code received from the service that is av monitored.
	ResponseStatusCode int `json:"responseStatusCode"`
	// OutageReason is the reason the av monitored service is unavailable.
	OutageReason string `json:"outageReason"`
	// Status is the availability status for the service: 0 = DOWN, 1 = UP.
	Status int `json:"status"`
	// Instances allow to give an av status for multiple instances. If one of the instances is DOWN, the overall status is DOWN.
	Instances []AvsInstance `json:"instances"`
}

AvsRequest contains the structure for a request to avs to push availability information.

type Controller

type Controller struct {
	operation.Operation
	// contains filtered or unexported fields
}

func NewTestActuator

func NewTestActuator(op operation.Operation, logger logging.Logger) *Controller

NewTestActuator creates a new controller for testing purposes.

func (*Controller) Reconcile

func (c *Controller) Reconcile(ctx context.Context, req reconcile.Request) (reconcile.Result, error)

Jump to

Keyboard shortcuts

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