Documentation ¶
Overview ¶
Package v1 is the v1 version of the API.
Index ¶
- Variables
- func ChartTypeToString(ct ChartType) string
- func GetComparatorAbbrev(op ThresholdOperator) string
- func GetComparatorSymbol(op ThresholdOperator) string
- func IndicatorTypeToString(it IndicatorType) string
- func Kind(kind string) schema.GroupKind
- func PopulateDefaults(doc *IndicatorDocument)
- func Resource(resource string) schema.GroupResource
- func ValidateBytesBySchema(docBytes []byte, schemaName string) ([]error, bool)
- type Alert
- type ChartType
- type Indicator
- type IndicatorDocument
- func (id IndicatorDocument) BoshUID() string
- func (in *IndicatorDocument) DeepCopy() *IndicatorDocument
- func (in *IndicatorDocument) DeepCopyInto(out *IndicatorDocument)
- func (in *IndicatorDocument) DeepCopyObject() runtime.Object
- func (id IndicatorDocument) Indicator(name string) *IndicatorSpec
- func (doc *IndicatorDocument) Validate() []error
- type IndicatorDocumentList
- type IndicatorDocumentSpec
- type IndicatorDocumentStatus
- type IndicatorList
- type IndicatorSpec
- type IndicatorStatus
- type IndicatorType
- type Layout
- type Presentation
- type Product
- type Section
- type Threshold
- type ThresholdOperator
Constants ¶
This section is empty.
Variables ¶
var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: indicatordocument.GroupName, Version: "v1"}
SchemeGroupVersion is group version used to register these objects
Functions ¶
func ChartTypeToString ¶ added in v0.9.1
func GetComparatorAbbrev ¶
func GetComparatorAbbrev(op ThresholdOperator) string
func GetComparatorSymbol ¶
func GetComparatorSymbol(op ThresholdOperator) string
func IndicatorTypeToString ¶
func IndicatorTypeToString(it IndicatorType) string
func PopulateDefaults ¶
func PopulateDefaults(doc *IndicatorDocument)
If the given document is missing data, fills it in with sane defaults. Populates the layout as the standard SLI/KLI/Metrics three-row setup. Defaults the title of the layout to "<name> - <version>". Defaults the alert to `[1m]` steps. Ensures that some values, for example chart's labels, are [] instead of nil.
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type Alert ¶
func (*Alert) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Alert.
func (*Alert) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ChartType ¶
type ChartType int
func ChartTypeFromString ¶ added in v0.9.1
func (ChartType) MarshalJSON ¶ added in v0.9.1
func (*ChartType) UnmarshalJSON ¶ added in v0.9.1
type Indicator ¶
type Indicator struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec IndicatorSpec `json:"spec"` Status IndicatorStatus `json:"status,omitempty"` }
+genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*Indicator) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Indicator.
func (*Indicator) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Indicator) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type IndicatorDocument ¶
type IndicatorDocument struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec IndicatorDocumentSpec `json:"spec"` Status IndicatorDocumentStatus `json:"status,omitempty"` }
IndicatorDocument is a specification for a IndicatorDocument resource
func (IndicatorDocument) BoshUID ¶
func (id IndicatorDocument) BoshUID() string
func (*IndicatorDocument) DeepCopy ¶
func (in *IndicatorDocument) DeepCopy() *IndicatorDocument
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IndicatorDocument.
func (*IndicatorDocument) DeepCopyInto ¶
func (in *IndicatorDocument) DeepCopyInto(out *IndicatorDocument)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*IndicatorDocument) DeepCopyObject ¶
func (in *IndicatorDocument) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (IndicatorDocument) Indicator ¶
func (id IndicatorDocument) Indicator(name string) *IndicatorSpec
func (*IndicatorDocument) Validate ¶
func (doc *IndicatorDocument) Validate() []error
type IndicatorDocumentList ¶
type IndicatorDocumentList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []IndicatorDocument `json:"items"` }
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object IndicatorDocumentList is a list of IndicatorDocument resources
func (*IndicatorDocumentList) DeepCopy ¶
func (in *IndicatorDocumentList) DeepCopy() *IndicatorDocumentList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IndicatorDocumentList.
func (*IndicatorDocumentList) DeepCopyInto ¶
func (in *IndicatorDocumentList) DeepCopyInto(out *IndicatorDocumentList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*IndicatorDocumentList) DeepCopyObject ¶
func (in *IndicatorDocumentList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type IndicatorDocumentSpec ¶
type IndicatorDocumentSpec struct { Product Product `json:"product"` Indicators []IndicatorSpec `json:"indicators,omitempty"` Layout Layout `json:"layout,omitempty"` }
IndicatorDocumentSpec is the spec for a IndicatorDocument resource
func (*IndicatorDocumentSpec) DeepCopy ¶
func (in *IndicatorDocumentSpec) DeepCopy() *IndicatorDocumentSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IndicatorDocumentSpec.
func (*IndicatorDocumentSpec) DeepCopyInto ¶
func (in *IndicatorDocumentSpec) DeepCopyInto(out *IndicatorDocumentSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IndicatorDocumentStatus ¶
type IndicatorDocumentStatus map[string]IndicatorStatus
IndicatorDocumentStatus is the status for a IndicatorDocument resource, it maps names of indicators to their statuses.
func (IndicatorDocumentStatus) DeepCopy ¶
func (in IndicatorDocumentStatus) DeepCopy() IndicatorDocumentStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IndicatorDocumentStatus.
func (IndicatorDocumentStatus) DeepCopyInto ¶
func (in IndicatorDocumentStatus) DeepCopyInto(out *IndicatorDocumentStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IndicatorList ¶
type IndicatorList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []Indicator `json:"items"` }
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object IndicatorList is a list of Indicator resources
func (*IndicatorList) DeepCopy ¶
func (in *IndicatorList) DeepCopy() *IndicatorList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IndicatorList.
func (*IndicatorList) DeepCopyInto ¶
func (in *IndicatorList) DeepCopyInto(out *IndicatorList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*IndicatorList) DeepCopyObject ¶
func (in *IndicatorList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type IndicatorSpec ¶
type IndicatorSpec struct { // Product duplicated between here and indicator documents for the `kubectl get indicators` display Product string `json:"product,omitempty"` Name string `json:"name"` Type IndicatorType `json:"type"` PromQL string `json:"promql"` Thresholds []Threshold `json:"thresholds,omitempty"` Documentation map[string]string `json:"documentation,omitempty"` Presentation Presentation `json:"presentation,omitempty"` }
func (*IndicatorSpec) DeepCopy ¶
func (in *IndicatorSpec) DeepCopy() *IndicatorSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IndicatorSpec.
func (*IndicatorSpec) DeepCopyInto ¶
func (in *IndicatorSpec) DeepCopyInto(out *IndicatorSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IndicatorStatus ¶
type IndicatorStatus struct { Phase string `json:"phase"` UpdatedAt metav1.Time `json:"updatedAt"` }
func (*IndicatorStatus) DeepCopy ¶
func (in *IndicatorStatus) DeepCopy() *IndicatorStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IndicatorStatus.
func (*IndicatorStatus) DeepCopyInto ¶
func (in *IndicatorStatus) DeepCopyInto(out *IndicatorStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IndicatorType ¶
type IndicatorType int
const ( DefaultIndicator IndicatorType = iota ServiceLevelIndicator KeyPerformanceIndicator UndefinedType )
func IndicatorTypeFromString ¶
func IndicatorTypeFromString(s string) IndicatorType
func (IndicatorType) MarshalJSON ¶
func (it IndicatorType) MarshalJSON() ([]byte, error)
func (*IndicatorType) UnmarshalJSON ¶
func (it *IndicatorType) UnmarshalJSON(data []byte) error
type Layout ¶
type Layout struct { Owner string `json:"owner,omitempty"` Title string `json:"title,omitempty"` Description string `json:"description,omitempty"` Sections []Section `json:"sections,omitempty"` }
func (*Layout) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Layout.
func (*Layout) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Presentation ¶
type Presentation struct { ChartType ChartType `json:"chartType,omitempty"` CurrentValue bool `json:"currentValue,omitempty"` Frequency int64 `json:"frequency,omitempty"` Labels []string `json:"labels,omitempty"` Units string `json:"units,omitempty"` }
func (*Presentation) DeepCopy ¶
func (in *Presentation) DeepCopy() *Presentation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Presentation.
func (*Presentation) DeepCopyInto ¶
func (in *Presentation) DeepCopyInto(out *Presentation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Product ¶
func (*Product) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Product.
func (*Product) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Section ¶
type Section struct { Title string `json:"title,omitempty"` Description string `json:"description,omitempty"` Indicators []string `json:"indicators,omitempty"` }
func (*Section) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Section.
func (*Section) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Threshold ¶
type Threshold struct { Level string `json:"level"` Operator ThresholdOperator `json:"operator"` Value float64 `json:"value"` Alert Alert `json:"alert,omitempty"` }
func (*Threshold) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Threshold.
func (*Threshold) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ThresholdOperator ¶
type ThresholdOperator int
const ( UndefinedOperator ThresholdOperator = iota LessThan LessThanOrEqualTo EqualTo NotEqualTo GreaterThanOrEqualTo GreaterThan )
func GetComparatorFromString ¶
func GetComparatorFromString(operator string) ThresholdOperator
func (ThresholdOperator) MarshalJSON ¶
func (ot ThresholdOperator) MarshalJSON() ([]byte, error)
func (*ThresholdOperator) UnmarshalJSON ¶
func (ot *ThresholdOperator) UnmarshalJSON(data []byte) error