openslo

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: Apache-2.0 Imports: 1 Imported by: 2

Documentation

Overview

Package openslo defines the OpenSLO specification general definitions. These definitions are shared across all versions of the specification.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Kind

type Kind string

Kind represents all the object kinds defined by OpenSLO specification. Keep in mind not all specification versions support every Kind.

const (
	KindSLO                     Kind = "SLO"
	KindSLI                     Kind = "SLI"
	KindDataSource              Kind = "DataSource"
	KindService                 Kind = "Service"
	KindAlertPolicy             Kind = "AlertPolicy"
	KindAlertCondition          Kind = "AlertCondition"
	KindAlertNotificationTarget Kind = "AlertNotificationTarget"
)

func (Kind) String

func (k Kind) String() string

func (*Kind) UnmarshalText

func (k *Kind) UnmarshalText(text []byte) error

UnmarshalText implements the text encoding.TextUnmarshaler interface.

func (Kind) Validate

func (k Kind) Validate() error

type Object

type Object interface {
	// GetVersion returns the API version of the Object.
	GetVersion() Version
	// GetKind returns the Kind of the Object.
	GetKind() Kind
	// GetName returns the name of the Object.
	GetName() string
	// Validate performs static validation of the Object.
	Validate() error
}

Object represents a generic OpenSLO object definition. All OpenSLO objects implement this interface.

type Version

type Version string

Version represents a version of the OpenSLO specification.

const (
	VersionV1alpha Version = "openslo/v1alpha"
	VersionV1      Version = "openslo/v1"
	VersionV2alpha Version = "openslo.com/v2alpha"
)

func (Version) String

func (v Version) String() string

func (*Version) UnmarshalText

func (v *Version) UnmarshalText(text []byte) error

UnmarshalText implements the text encoding.TextUnmarshaler interface.

func (Version) Validate

func (v Version) Validate() error

Directories

Path Synopsis
Package v1 contains the OpenSLO specification version v1alpha definitions.
Package v1 contains the OpenSLO specification version v1alpha definitions.
Package v1alpha defines the OpenSLO specification version v1alpha definitions.
Package v1alpha defines the OpenSLO specification version v1alpha definitions.
Package v2alpha contains the OpenSLO specification version v2alpha definitions.
Package v2alpha contains the OpenSLO specification version v2alpha definitions.

Jump to

Keyboard shortcuts

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