v1alpha1

package
v0.0.0-...-f2ca803 Latest Latest
Warning

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

Go to latest
Published: May 21, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the newrelic v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=newrelic.shanestarcher.com

Package v1alpha1 contains API Schema definitions for the newrelic v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=newrelic.shanestarcher.com

Index

Constants

This section is empty.

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "newrelic.shanestarcher.com", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
)
View Source
var DefaultRequeue = reconcile.Result{
	Requeue:      true,
	RequeueAfter: time.Minute * 5,
}

DefaultRequeue is the timing we by default to requeue

View Source
var (
	// L is an alias for the the standard logger.
	L = logf.Log.Logger
)

Functions

func DoReconcile

func DoReconcile(log logr.Logger, instance CRD) reconcile.Result

DoReconcile generic processing loop

func GetLogger

func GetLogger(ctx context.Context) logr.Logger

GetLogger returns the logger from the context

func WithLogger

func WithLogger(ctx context.Context, logger *logr.Logger) context.Context

WithLogger returns a new context with the provided logger.

Types

type AlertChannel

type AlertChannel struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              AlertChannelSpec `json:"spec"`
	Status            Status           `json:"status,omitempty"`
}

AlertChannel is the Schema for the alertchannels API +kubebuilder:subresource:status +kubebuilder:resource:path=alertchannels,scope=Namespaced

func (*AlertChannel) Create

func (s *AlertChannel) Create(ctx context.Context) bool

Create in newrelic

func (*AlertChannel) DeepCopy

func (in *AlertChannel) DeepCopy() *AlertChannel

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertChannel.

func (*AlertChannel) DeepCopyInto

func (in *AlertChannel) DeepCopyInto(out *AlertChannel)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AlertChannel) DeepCopyObject

func (in *AlertChannel) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*AlertChannel) Delete

func (s *AlertChannel) Delete(ctx context.Context) bool

Delete in newrelic

func (*AlertChannel) IsCreated

func (s *AlertChannel) IsCreated() bool

IsCreated specifies if the object has been created in new relic yet

func (*AlertChannel) Update

func (s *AlertChannel) Update(ctx context.Context) bool

Update object in newrelic

type AlertChannelList

type AlertChannelList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []AlertChannel `json:"items"`
}

AlertChannelList contains a list of AlertChannel

func (*AlertChannelList) DeepCopy

func (in *AlertChannelList) DeepCopy() *AlertChannelList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertChannelList.

func (*AlertChannelList) DeepCopyInto

func (in *AlertChannelList) DeepCopyInto(out *AlertChannelList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AlertChannelList) DeepCopyObject

func (in *AlertChannelList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type AlertChannelSpec

type AlertChannelSpec struct {
	// TODO don't require setting of the type
	Type          string   `json:"type,omitempty"`
	Configuration data     `json:"configuration,omitempty"`
	Policies      []string `json:"policies,omitempty"`
}

AlertChannelSpec defines the desired state of AlertChannel

func (*AlertChannelSpec) DeepCopy

func (in *AlertChannelSpec) DeepCopy() *AlertChannelSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertChannelSpec.

func (*AlertChannelSpec) DeepCopyInto

func (in *AlertChannelSpec) DeepCopyInto(out *AlertChannelSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AlertPolicy

type AlertPolicy struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              AlertPolicySpec `json:"spec"`
	Status            Status          `json:"status,omitempty"`
}

AlertPolicy is the Schema for the alertpolicies API +kubebuilder:subresource:status +kubebuilder:resource:path=alertpolicies,scope=Namespaced

func (*AlertPolicy) Create

func (s *AlertPolicy) Create(ctx context.Context) bool

Create in newrelic

func (*AlertPolicy) DeepCopy

func (in *AlertPolicy) DeepCopy() *AlertPolicy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertPolicy.

func (*AlertPolicy) DeepCopyInto

func (in *AlertPolicy) DeepCopyInto(out *AlertPolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AlertPolicy) DeepCopyObject

func (in *AlertPolicy) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*AlertPolicy) Delete

func (s *AlertPolicy) Delete(ctx context.Context) bool

Delete in newrelic

func (*AlertPolicy) IsCreated

func (s *AlertPolicy) IsCreated() bool

IsCreated specifies if the object has been created in new relic yet

func (*AlertPolicy) Update

func (s *AlertPolicy) Update(ctx context.Context) bool

Update object in newrelic

type AlertPolicyList

type AlertPolicyList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []AlertPolicy `json:"items"`
}

AlertPolicyList contains a list of AlertPolicy

func (*AlertPolicyList) DeepCopy

func (in *AlertPolicyList) DeepCopy() *AlertPolicyList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertPolicyList.

func (*AlertPolicyList) DeepCopyInto

func (in *AlertPolicyList) DeepCopyInto(out *AlertPolicyList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AlertPolicyList) DeepCopyObject

func (in *AlertPolicyList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type AlertPolicySpec

type AlertPolicySpec struct {
	IncidentPreference string   `json:"incident_preference,omitempty"`
	Channels           []string `json:"channels,omitempty"`
}

AlertPolicySpec defines the desired state of AlertPolicy

func (*AlertPolicySpec) DeepCopy

func (in *AlertPolicySpec) DeepCopy() *AlertPolicySpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertPolicySpec.

func (*AlertPolicySpec) DeepCopyInto

func (in *AlertPolicySpec) DeepCopyInto(out *AlertPolicySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CRD

type CRD interface {
	Create(context.Context) bool
	Update(context.Context) bool
	Delete(context.Context) bool
	IsCreated() bool
	GetDeletionTimestamp() *metav1.Time
	SetFinalizers([]string)
}

type Conditions

type Conditions struct {
	PolicyName string  `json:"policyName,omitempty"`
	RunbookURL *string `json:"runbookURL,omitempty"`
}

func (*Conditions) DeepCopy

func (in *Conditions) DeepCopy() *Conditions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Conditions.

func (*Conditions) DeepCopyInto

func (in *Conditions) DeepCopyInto(out *Conditions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Dashboard

type Dashboard struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              DashboardSpec `json:"spec"`
	Status            Status        `json:"status,omitempty"`
}

Dashboard is the Schema for the dashboards API +kubebuilder:subresource:status +kubebuilder:resource:path=dashboards,scope=Namespaced

func (*Dashboard) Create

func (s *Dashboard) Create(ctx context.Context) bool

Create in newrelic

func (*Dashboard) DeepCopy

func (in *Dashboard) DeepCopy() *Dashboard

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Dashboard.

func (*Dashboard) DeepCopyInto

func (in *Dashboard) DeepCopyInto(out *Dashboard)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Dashboard) DeepCopyObject

func (in *Dashboard) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Dashboard) Delete

func (s *Dashboard) Delete(ctx context.Context) bool

Delete in newrelic

func (*Dashboard) IsCreated

func (s *Dashboard) IsCreated() bool

IsCreated specifies if the object has been created in new relic yet

func (*Dashboard) Update

func (s *Dashboard) Update(ctx context.Context) bool

Update object in newrelic

type DashboardList

type DashboardList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []Dashboard `json:"items"`
}

DashboardList contains a list of Dashboard

func (*DashboardList) DeepCopy

func (in *DashboardList) DeepCopy() *DashboardList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DashboardList.

func (*DashboardList) DeepCopyInto

func (in *DashboardList) DeepCopyInto(out *DashboardList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DashboardList) DeepCopyObject

func (in *DashboardList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type DashboardSpec

type DashboardSpec struct {
	Icon string `json:"icon,omitempty"`
	// TODO
	// Widgets    []dashboards.DashboardWidget `json:"widgets,omitempty"`
	Visibility string `json:"visibility,omitempty"`
	Editable   string `json:"editable,omitempty"`
}

DashboardSpec defines the structure of the dashboard for new relic

func (*DashboardSpec) DeepCopy

func (in *DashboardSpec) DeepCopy() *DashboardSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DashboardSpec.

func (*DashboardSpec) DeepCopyInto

func (in *DashboardSpec) DeepCopyInto(out *DashboardSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Data

type Data struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              Spec   `json:"spec"`
	Status            Status `json:"status,omitempty"`
}

func (*Data) DeepCopy

func (in *Data) DeepCopy() *Data

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Data.

func (*Data) DeepCopyInto

func (in *Data) DeepCopyInto(out *Data)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Monitor

type Monitor struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              MonitorSpec `json:"spec"`
	Status            Status      `json:"status,omitempty"`
}

Monitor is the Schema for the monitors API +kubebuilder:subresource:status +kubebuilder:resource:path=monitors,scope=Namespaced

func (*Monitor) Create

func (s *Monitor) Create(ctx context.Context) bool

Create in newrelic

func (*Monitor) DeepCopy

func (in *Monitor) DeepCopy() *Monitor

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Monitor.

func (*Monitor) DeepCopyInto

func (in *Monitor) DeepCopyInto(out *Monitor)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Monitor) DeepCopyObject

func (in *Monitor) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Monitor) Delete

func (s *Monitor) Delete(ctx context.Context) bool

Delete in newrelic

func (*Monitor) IsCreated

func (s *Monitor) IsCreated() bool

IsCreated specifies if the object has been created in new relic yet

func (*Monitor) Update

func (s *Monitor) Update(ctx context.Context) bool

Update object in newrelic

type MonitorList

type MonitorList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []Monitor `json:"items"`
}

MonitorList contains a list of Monitor

func (*MonitorList) DeepCopy

func (in *MonitorList) DeepCopy() *MonitorList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MonitorList.

func (*MonitorList) DeepCopyInto

func (in *MonitorList) DeepCopyInto(out *MonitorList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*MonitorList) DeepCopyObject

func (in *MonitorList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type MonitorOptions

type MonitorOptions struct {
	ValidationString       *string `json:"validationString,omitempty"`
	VerifySSL              bool    `json:"verifySSL,omitempty"`
	BypassHEADRequest      bool    `json:"bypassHEADRequest,omitempty"`
	TreatRedirectAsFailure bool    `json:"treatRedirectAsFailure,omitempty"`
}

func (*MonitorOptions) DeepCopy

func (in *MonitorOptions) DeepCopy() *MonitorOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MonitorOptions.

func (*MonitorOptions) DeepCopyInto

func (in *MonitorOptions) DeepCopyInto(out *MonitorOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MonitorSpec

type MonitorSpec struct {
	Type          *string              `json:"type,omitempty"`
	Frequency     *int64               `json:"frequency,omitempty"`
	URI           *string              `json:"uri,omitempty"`
	Locations     []*string            `json:"locations,omitempty"`
	Status        *MonitorStatusString `json:"status,omitempty"`
	SLAThreshold  *float64             `json:"slaThreshold,omitempty"`
	ManageUpdates *bool                `json:"manageUpdates,omitempty"`
	Options       MonitorOptions       `json:"options,omitempty"`
	Script        *Script              `json:"script,omitempty"`
	Conditions    []Conditions         `json:"conditions,omitempty"`
}

MonitorSpec defines the desired state of Monitor

func (*MonitorSpec) DeepCopy

func (in *MonitorSpec) DeepCopy() *MonitorSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MonitorSpec.

func (*MonitorSpec) DeepCopyInto

func (in *MonitorSpec) DeepCopyInto(out *MonitorSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MonitorStatusString

type MonitorStatusString string
const (
	Enabled  MonitorStatusString = "enabled"
	Disabled MonitorStatusString = "disabled"
	Muted    MonitorStatusString = "muted"
)

func (MonitorStatusString) String

func (s MonitorStatusString) String() string

type MonitorType

type MonitorType string

MonitorType defines the available types for monitors

type Script

type Script struct {
	ScriptText *string `json:"scriptText,omitempty"`
}

TODO flatten this structure out

func (*Script) DeepCopy

func (in *Script) DeepCopy() *Script

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Script.

func (*Script) DeepCopyInto

func (in *Script) DeepCopyInto(out *Script)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Spec

type Spec struct {
	Data string `json:"data,omitempty"`
}

func (*Spec) DeepCopy

func (in *Spec) DeepCopy() *Spec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Spec.

func (*Spec) DeepCopyInto

func (in *Spec) DeepCopyInto(out *Spec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SpecInterface

type SpecInterface interface {
}

type Status

type Status struct {
	ID   *string `json:"id,omitempty"`
	Info string  `json:"info,omitempty"`
	Hash []byte  `json:"hash,omitempty"`
}

func (*Status) DeepCopy

func (in *Status) DeepCopy() *Status

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Status.

func (*Status) DeepCopyInto

func (in *Status) DeepCopyInto(out *Status)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Status) GetID

func (s *Status) GetID() *int

func (*Status) HandleOnError

func (s *Status) HandleOnError(ctx context.Context, err error) bool

HandleOnError returns true if an error had occured

func (*Status) HandleOnErrorMessage

func (s *Status) HandleOnErrorMessage(ctx context.Context, err error, msg string) bool

HandleOnErrorMessage returns true if an error had occured

func (*Status) IsCreated

func (s *Status) IsCreated() bool

IsCreated let us know if the dashboard exists

func (*Status) SetID

func (s *Status) SetID(id int)

type StatusInterface

type StatusInterface interface {
	HandleOnErrorMessage(context.Context, error, string) bool
	HandleOnError(context.Context, error) bool
}

Jump to

Keyboard shortcuts

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