alert

package
v0.0.0-...-5d42de7 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CRDResources = "ALERT"
	PVCResources = "PVC"
)

Constants for each unit of a deployment of Alert

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert

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

Alert is used to handle Alerts in the cluster

func NewAlert

func NewAlert(config *protoform.Config, kubeConfig *rest.Config) *Alert

NewAlert will return an Alert type

func (*Alert) Delete

func (a *Alert) Delete(name string) error

Delete will delete the Alert from the cluster (all Alerts are deleted the same way)

func (*Alert) Ensure

func (a *Alert) Ensure(alt *alertapi.Alert) error

Ensure will get the necessary Creater and make sure the instance is correctly deployed or deploy it if needed

func (*Alert) GetComponents

func (a *Alert) GetComponents(alt *alertapi.Alert, compType string) (*api.ComponentList, error)

GetComponents gets the necessary creater and returns the Alert's components

func (*Alert) Versions

func (a *Alert) Versions() []string

Versions returns the versions that the operator supports for Alert

type Creater

type Creater interface {
	Versions() []string
	Ensure(alert *alertapi.Alert) error
	GetComponents(alert *alertapi.Alert) (*api.ComponentList, error)
	GetPVC(alert *alertapi.Alert) ([]*components.PersistentVolumeClaim, error)
}

Creater interface for Alert An Alert can have multiple Creaters where each Creater supports different versions of Alert

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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