slo

package
v0.9.0-rc4 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

Package slo is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	SLOStatusState_name = map[int32]string{
		0: "InProgress",
		1: "Creating",
		2: "NoData",
		3: "Ok",
		4: "Warning",
		5: "Breaching",
		6: "PartialDataOk",
		7: "InternalError",
	}
	SLOStatusState_value = map[string]int32{
		"InProgress":    0,
		"Creating":      1,
		"NoData":        2,
		"Ok":            3,
		"Warning":       4,
		"Breaching":     5,
		"PartialDataOk": 6,
		"InternalError": 7,
	}
)

Enum value maps for SLOStatusState.

View Source
var File_github_com_rancher_opni_pkg_plugins_slo_pkg_apis_slo_slo_proto protoreflect.FileDescriptor
View Source
var SLO_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "slo.SLO",
	HandlerType: (*SLOServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateSLO",
			Handler:    _SLO_CreateSLO_Handler,
		},
		{
			MethodName: "GetSLO",
			Handler:    _SLO_GetSLO_Handler,
		},
		{
			MethodName: "ListSLOs",
			Handler:    _SLO_ListSLOs_Handler,
		},
		{
			MethodName: "UpdateSLO",
			Handler:    _SLO_UpdateSLO_Handler,
		},
		{
			MethodName: "DeleteSLO",
			Handler:    _SLO_DeleteSLO_Handler,
		},
		{
			MethodName: "CloneSLO",
			Handler:    _SLO_CloneSLO_Handler,
		},
		{
			MethodName: "CloneToClusters",
			Handler:    _SLO_CloneToClusters_Handler,
		},
		{
			MethodName: "ListMetrics",
			Handler:    _SLO_ListMetrics_Handler,
		},
		{
			MethodName: "ListServices",
			Handler:    _SLO_ListServices_Handler,
		},
		{
			MethodName: "ListEvents",
			Handler:    _SLO_ListEvents_Handler,
		},
		{
			MethodName: "Status",
			Handler:    _SLO_Status_Handler,
		},
		{
			MethodName: "Preview",
			Handler:    _SLO_Preview_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "github.com/rancher/opni/pkg/plugins/slo/pkg/apis/slo/slo.proto",
}

SLO_ServiceDesc is the grpc.ServiceDesc for SLO service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterSLOHandler

func RegisterSLOHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterSLOHandler registers the http handlers for service SLO to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterSLOHandlerClient

func RegisterSLOHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SLOClient) error

RegisterSLOHandlerClient registers the http handlers for service SLO to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SLOClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SLOClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "SLOClient" to call the correct interceptors.

func RegisterSLOHandlerFromEndpoint

func RegisterSLOHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterSLOHandlerFromEndpoint is same as RegisterSLOHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterSLOHandlerServer

func RegisterSLOHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SLOServer) error

RegisterSLOHandlerServer registers the http handlers for service SLO to "mux". UnaryRPC :call SLOServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSLOHandlerFromEndpoint instead.

func RegisterSLOServer

func RegisterSLOServer(s grpc.ServiceRegistrar, srv SLOServer)

Types

type Alert

type Alert struct {
	Name                    string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	NotificationTarget      string `protobuf:"bytes,2,opt,name=notificationTarget,proto3" json:"notificationTarget,omitempty"` // enum of Slack, PagerDuty, Email, SMS, etc..
	NotificationDescription string `protobuf:"bytes,3,opt,name=notificationDescription,proto3" json:"notificationDescription,omitempty"`
	Description             string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	ConditionType           string `protobuf:"bytes,5,opt,name=conditionType,proto3" json:"conditionType,omitempty"`
	ThresholdType           string `protobuf:"bytes,6,opt,name=thresholdType,proto3" json:"thresholdType,omitempty"`
	OnNoData                bool   `protobuf:"varint,7,opt,name=onNoData,proto3" json:"onNoData,omitempty"`
	OnCreate                bool   `protobuf:"varint,8,opt,name=onCreate,proto3" json:"onCreate,omitempty"`
	OnBreach                bool   `protobuf:"varint,9,opt,name=onBreach,proto3" json:"onBreach,omitempty"`
	OnResolved              bool   `protobuf:"varint,10,opt,name=onResolved,proto3" json:"onResolved,omitempty"`
	// contains filtered or unexported fields
}

func (*Alert) Descriptor deprecated

func (*Alert) Descriptor() ([]byte, []int)

Deprecated: Use Alert.ProtoReflect.Descriptor instead.

func (*Alert) GetConditionType

func (x *Alert) GetConditionType() string

func (*Alert) GetDescription

func (x *Alert) GetDescription() string

func (*Alert) GetName

func (x *Alert) GetName() string

func (*Alert) GetNotificationDescription

func (x *Alert) GetNotificationDescription() string

func (*Alert) GetNotificationTarget

func (x *Alert) GetNotificationTarget() string

func (*Alert) GetOnBreach

func (x *Alert) GetOnBreach() bool

func (*Alert) GetOnCreate

func (x *Alert) GetOnCreate() bool

func (*Alert) GetOnNoData

func (x *Alert) GetOnNoData() bool

func (*Alert) GetOnResolved

func (x *Alert) GetOnResolved() bool

func (*Alert) GetThresholdType

func (x *Alert) GetThresholdType() string

func (*Alert) ProtoMessage

func (*Alert) ProtoMessage()

func (*Alert) ProtoReflect

func (x *Alert) ProtoReflect() protoreflect.Message

func (*Alert) Reset

func (x *Alert) Reset()

func (*Alert) String

func (x *Alert) String() string

type AlertFiringWindows added in v0.6.0

type AlertFiringWindows struct {
	Start    *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"`
	End      *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"`
	Severity string                 `protobuf:"bytes,3,opt,name=severity,proto3" json:"severity,omitempty"`
	// contains filtered or unexported fields
}

func (*AlertFiringWindows) Descriptor deprecated added in v0.6.0

func (*AlertFiringWindows) Descriptor() ([]byte, []int)

Deprecated: Use AlertFiringWindows.ProtoReflect.Descriptor instead.

func (*AlertFiringWindows) GetEnd added in v0.6.0

func (*AlertFiringWindows) GetSeverity added in v0.6.0

func (x *AlertFiringWindows) GetSeverity() string

func (*AlertFiringWindows) GetStart added in v0.6.0

func (x *AlertFiringWindows) GetStart() *timestamppb.Timestamp

func (*AlertFiringWindows) ProtoMessage added in v0.6.0

func (*AlertFiringWindows) ProtoMessage()

func (*AlertFiringWindows) ProtoReflect added in v0.6.0

func (x *AlertFiringWindows) ProtoReflect() protoreflect.Message

func (*AlertFiringWindows) Reset added in v0.6.0

func (x *AlertFiringWindows) Reset()

func (*AlertFiringWindows) String added in v0.6.0

func (x *AlertFiringWindows) String() string

type CreateSLORequest

type CreateSLORequest struct {
	Slo *ServiceLevelObjective `protobuf:"bytes,1,opt,name=slo,proto3" json:"slo,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateSLORequest) Descriptor deprecated

func (*CreateSLORequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateSLORequest.ProtoReflect.Descriptor instead.

func (*CreateSLORequest) GetSlo added in v0.6.0

func (*CreateSLORequest) ProtoMessage

func (*CreateSLORequest) ProtoMessage()

func (*CreateSLORequest) ProtoReflect

func (x *CreateSLORequest) ProtoReflect() protoreflect.Message

func (*CreateSLORequest) Reset

func (x *CreateSLORequest) Reset()

func (*CreateSLORequest) String

func (x *CreateSLORequest) String() string

func (*CreateSLORequest) Validate added in v0.6.0

func (c *CreateSLORequest) Validate() error

type DataPoint added in v0.6.0

type DataPoint struct {
	Sli       float64                `protobuf:"fixed64,1,opt,name=sli,proto3" json:"sli,omitempty"`
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*DataPoint) Descriptor deprecated added in v0.6.0

func (*DataPoint) Descriptor() ([]byte, []int)

Deprecated: Use DataPoint.ProtoReflect.Descriptor instead.

func (*DataPoint) GetSli added in v0.6.0

func (x *DataPoint) GetSli() float64

func (*DataPoint) GetTimestamp added in v0.6.0

func (x *DataPoint) GetTimestamp() *timestamppb.Timestamp

func (*DataPoint) ProtoMessage added in v0.6.0

func (*DataPoint) ProtoMessage()

func (*DataPoint) ProtoReflect added in v0.6.0

func (x *DataPoint) ProtoReflect() protoreflect.Message

func (*DataPoint) Reset added in v0.6.0

func (x *DataPoint) Reset()

func (*DataPoint) String added in v0.6.0

func (x *DataPoint) String() string

type Event added in v0.6.0

type Event struct {
	Key  string   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Vals []string `protobuf:"bytes,2,rep,name=vals,proto3" json:"vals,omitempty"`
	// contains filtered or unexported fields
}

func (*Event) Descriptor deprecated added in v0.6.0

func (*Event) Descriptor() ([]byte, []int)

Deprecated: Use Event.ProtoReflect.Descriptor instead.

func (*Event) GetKey added in v0.6.0

func (x *Event) GetKey() string

func (*Event) GetVals added in v0.6.0

func (x *Event) GetVals() []string

func (*Event) ProtoMessage added in v0.6.0

func (*Event) ProtoMessage()

func (*Event) ProtoReflect added in v0.6.0

func (x *Event) ProtoReflect() protoreflect.Message

func (*Event) Reset added in v0.6.0

func (x *Event) Reset()

func (*Event) String added in v0.6.0

func (x *Event) String() string

type EventList added in v0.6.0

type EventList struct {
	Items []*Event `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*EventList) Descriptor deprecated added in v0.6.0

func (*EventList) Descriptor() ([]byte, []int)

Deprecated: Use EventList.ProtoReflect.Descriptor instead.

func (*EventList) GetItems added in v0.6.0

func (x *EventList) GetItems() []*Event

func (*EventList) ProtoMessage added in v0.6.0

func (*EventList) ProtoMessage()

func (*EventList) ProtoReflect added in v0.6.0

func (x *EventList) ProtoReflect() protoreflect.Message

func (*EventList) Reset added in v0.6.0

func (x *EventList) Reset()

func (*EventList) String added in v0.6.0

func (x *EventList) String() string

type EventPair added in v0.6.0

type EventPair struct {
	Key  string   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Vals []string `protobuf:"bytes,2,rep,name=vals,proto3" json:"vals,omitempty"`
	// contains filtered or unexported fields
}

func (*EventPair) Descriptor deprecated added in v0.6.0

func (*EventPair) Descriptor() ([]byte, []int)

Deprecated: Use EventPair.ProtoReflect.Descriptor instead.

func (*EventPair) GetKey added in v0.6.0

func (x *EventPair) GetKey() string

func (*EventPair) GetVals added in v0.6.0

func (x *EventPair) GetVals() []string

func (*EventPair) ProtoMessage added in v0.6.0

func (*EventPair) ProtoMessage()

func (*EventPair) ProtoReflect added in v0.6.0

func (x *EventPair) ProtoReflect() protoreflect.Message

func (*EventPair) Reset added in v0.6.0

func (x *EventPair) Reset()

func (*EventPair) String added in v0.6.0

func (x *EventPair) String() string

type EventPairList added in v0.6.0

type EventPairList struct {
	Items []*EventPair `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*EventPairList) Descriptor deprecated added in v0.6.0

func (*EventPairList) Descriptor() ([]byte, []int)

Deprecated: Use EventPairList.ProtoReflect.Descriptor instead.

func (*EventPairList) GetItems added in v0.6.0

func (x *EventPairList) GetItems() []*EventPair

func (*EventPairList) ProtoMessage added in v0.6.0

func (*EventPairList) ProtoMessage()

func (*EventPairList) ProtoReflect added in v0.6.0

func (x *EventPairList) ProtoReflect() protoreflect.Message

func (*EventPairList) Reset added in v0.6.0

func (x *EventPairList) Reset()

func (*EventPairList) String added in v0.6.0

func (x *EventPairList) String() string

type Label

type Label struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*Label) Descriptor deprecated

func (*Label) Descriptor() ([]byte, []int)

Deprecated: Use Label.ProtoReflect.Descriptor instead.

func (*Label) GetName

func (x *Label) GetName() string

func (*Label) ProtoMessage

func (*Label) ProtoMessage()

func (*Label) ProtoReflect

func (x *Label) ProtoReflect() protoreflect.Message

func (*Label) Reset

func (x *Label) Reset()

func (*Label) String

func (x *Label) String() string

type ListEventsRequest added in v0.6.0

type ListEventsRequest struct {
	Datasource string `protobuf:"bytes,1,opt,name=datasource,proto3" json:"datasource,omitempty"`
	ServiceId  string `protobuf:"bytes,2,opt,name=serviceId,proto3" json:"serviceId,omitempty"`
	ClusterId  string `protobuf:"bytes,3,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
	MetricId   string `protobuf:"bytes,4,opt,name=metricId,proto3" json:"metricId,omitempty"`
	// contains filtered or unexported fields
}

func (*ListEventsRequest) Descriptor deprecated added in v0.6.0

func (*ListEventsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListEventsRequest.ProtoReflect.Descriptor instead.

func (*ListEventsRequest) GetClusterId added in v0.6.0

func (x *ListEventsRequest) GetClusterId() string

func (*ListEventsRequest) GetDatasource added in v0.6.0

func (x *ListEventsRequest) GetDatasource() string

func (*ListEventsRequest) GetMetricId added in v0.6.0

func (x *ListEventsRequest) GetMetricId() string

func (*ListEventsRequest) GetServiceId added in v0.6.0

func (x *ListEventsRequest) GetServiceId() string

func (*ListEventsRequest) ProtoMessage added in v0.6.0

func (*ListEventsRequest) ProtoMessage()

func (*ListEventsRequest) ProtoReflect added in v0.6.0

func (x *ListEventsRequest) ProtoReflect() protoreflect.Message

func (*ListEventsRequest) Reset added in v0.6.0

func (x *ListEventsRequest) Reset()

func (*ListEventsRequest) String added in v0.6.0

func (x *ListEventsRequest) String() string

func (*ListEventsRequest) Validate added in v0.6.0

func (l *ListEventsRequest) Validate() error

type ListMetricsRequest added in v0.6.0

type ListMetricsRequest struct {
	Datasource string `protobuf:"bytes,1,opt,name=datasource,proto3" json:"datasource,omitempty"`
	ClusterId  string `protobuf:"bytes,2,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
	ServiceId  string `protobuf:"bytes,3,opt,name=serviceId,proto3" json:"serviceId,omitempty"`
	// contains filtered or unexported fields
}

func (*ListMetricsRequest) Descriptor deprecated added in v0.6.0

func (*ListMetricsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListMetricsRequest.ProtoReflect.Descriptor instead.

func (*ListMetricsRequest) GetClusterId added in v0.6.0

func (x *ListMetricsRequest) GetClusterId() string

func (*ListMetricsRequest) GetDatasource added in v0.6.0

func (x *ListMetricsRequest) GetDatasource() string

func (*ListMetricsRequest) GetServiceId added in v0.6.0

func (x *ListMetricsRequest) GetServiceId() string

func (*ListMetricsRequest) ProtoMessage added in v0.6.0

func (*ListMetricsRequest) ProtoMessage()

func (*ListMetricsRequest) ProtoReflect added in v0.6.0

func (x *ListMetricsRequest) ProtoReflect() protoreflect.Message

func (*ListMetricsRequest) Reset added in v0.6.0

func (x *ListMetricsRequest) Reset()

func (*ListMetricsRequest) String added in v0.6.0

func (x *ListMetricsRequest) String() string

func (*ListMetricsRequest) Validate added in v0.6.0

func (l *ListMetricsRequest) Validate() error

type ListServiceRequest added in v0.6.0

type ListServiceRequest struct {
	Datasource string `protobuf:"bytes,1,opt,name=datasource,proto3" json:"datasource,omitempty"`
	// contains filtered or unexported fields
}

func (*ListServiceRequest) Descriptor deprecated added in v0.6.0

func (*ListServiceRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListServiceRequest.ProtoReflect.Descriptor instead.

func (*ListServiceRequest) GetDatasource added in v0.6.0

func (x *ListServiceRequest) GetDatasource() string

func (*ListServiceRequest) ProtoMessage added in v0.6.0

func (*ListServiceRequest) ProtoMessage()

func (*ListServiceRequest) ProtoReflect added in v0.6.0

func (x *ListServiceRequest) ProtoReflect() protoreflect.Message

func (*ListServiceRequest) Reset added in v0.6.0

func (x *ListServiceRequest) Reset()

func (*ListServiceRequest) String added in v0.6.0

func (x *ListServiceRequest) String() string

type ListServicesRequest added in v0.6.0

type ListServicesRequest struct {
	Datasource string `protobuf:"bytes,1,opt,name=datasource,proto3" json:"datasource,omitempty"`
	ClusterId  string `protobuf:"bytes,2,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
	// contains filtered or unexported fields
}

func (*ListServicesRequest) Descriptor deprecated added in v0.6.0

func (*ListServicesRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListServicesRequest.ProtoReflect.Descriptor instead.

func (*ListServicesRequest) GetClusterId added in v0.6.0

func (x *ListServicesRequest) GetClusterId() string

func (*ListServicesRequest) GetDatasource added in v0.6.0

func (x *ListServicesRequest) GetDatasource() string

func (*ListServicesRequest) ProtoMessage added in v0.6.0

func (*ListServicesRequest) ProtoMessage()

func (*ListServicesRequest) ProtoReflect added in v0.6.0

func (x *ListServicesRequest) ProtoReflect() protoreflect.Message

func (*ListServicesRequest) Reset added in v0.6.0

func (x *ListServicesRequest) Reset()

func (*ListServicesRequest) String added in v0.6.0

func (x *ListServicesRequest) String() string

func (*ListServicesRequest) Validate added in v0.6.0

func (l *ListServicesRequest) Validate() error

type Metric

type Metric struct {
	Id       string          `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Metadata *MetricMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

func (*Metric) Descriptor deprecated

func (*Metric) Descriptor() ([]byte, []int)

Deprecated: Use Metric.ProtoReflect.Descriptor instead.

func (*Metric) GetId added in v0.6.0

func (x *Metric) GetId() string

func (*Metric) GetMetadata added in v0.6.0

func (x *Metric) GetMetadata() *MetricMetadata

func (*Metric) ProtoMessage

func (*Metric) ProtoMessage()

func (*Metric) ProtoReflect

func (x *Metric) ProtoReflect() protoreflect.Message

func (*Metric) Reset

func (x *Metric) Reset()

func (*Metric) String

func (x *Metric) String() string

type MetricGroupList added in v0.6.0

type MetricGroupList struct {
	GroupNameToMetrics map[string]*MetricList `` /* 177-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*MetricGroupList) ContainsId added in v0.6.0

func (m *MetricGroupList) ContainsId(id string) bool

func (*MetricGroupList) Descriptor deprecated added in v0.6.0

func (*MetricGroupList) Descriptor() ([]byte, []int)

Deprecated: Use MetricGroupList.ProtoReflect.Descriptor instead.

func (*MetricGroupList) GetGroupNameToMetrics added in v0.6.0

func (x *MetricGroupList) GetGroupNameToMetrics() map[string]*MetricList

func (*MetricGroupList) ProtoMessage added in v0.6.0

func (*MetricGroupList) ProtoMessage()

func (*MetricGroupList) ProtoReflect added in v0.6.0

func (x *MetricGroupList) ProtoReflect() protoreflect.Message

func (*MetricGroupList) Reset added in v0.6.0

func (x *MetricGroupList) Reset()

func (*MetricGroupList) String added in v0.6.0

func (x *MetricGroupList) String() string

type MetricList

type MetricList struct {
	Items []*Metric `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*MetricList) Descriptor deprecated

func (*MetricList) Descriptor() ([]byte, []int)

Deprecated: Use MetricList.ProtoReflect.Descriptor instead.

func (*MetricList) GetItems

func (x *MetricList) GetItems() []*Metric

func (*MetricList) ProtoMessage

func (*MetricList) ProtoMessage()

func (*MetricList) ProtoReflect

func (x *MetricList) ProtoReflect() protoreflect.Message

func (*MetricList) Reset

func (x *MetricList) Reset()

func (*MetricList) String

func (x *MetricList) String() string

type MetricMetadata added in v0.6.0

type MetricMetadata struct {
	Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
	Type        string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	Unit        string `protobuf:"bytes,3,opt,name=unit,proto3" json:"unit,omitempty"`
	// contains filtered or unexported fields
}

func (*MetricMetadata) Descriptor deprecated added in v0.6.0

func (*MetricMetadata) Descriptor() ([]byte, []int)

Deprecated: Use MetricMetadata.ProtoReflect.Descriptor instead.

func (*MetricMetadata) GetDescription added in v0.6.0

func (x *MetricMetadata) GetDescription() string

func (*MetricMetadata) GetType added in v0.6.0

func (x *MetricMetadata) GetType() string

func (*MetricMetadata) GetUnit added in v0.6.0

func (x *MetricMetadata) GetUnit() string

func (*MetricMetadata) ProtoMessage added in v0.6.0

func (*MetricMetadata) ProtoMessage()

func (*MetricMetadata) ProtoReflect added in v0.6.0

func (x *MetricMetadata) ProtoReflect() protoreflect.Message

func (*MetricMetadata) Reset added in v0.6.0

func (x *MetricMetadata) Reset()

func (*MetricMetadata) String added in v0.6.0

func (x *MetricMetadata) String() string

type MultiClusterFailures added in v0.6.0

type MultiClusterFailures struct {
	Failures []string `protobuf:"bytes,1,rep,name=failures,proto3" json:"failures,omitempty"`
	// contains filtered or unexported fields
}

func (*MultiClusterFailures) Descriptor deprecated added in v0.6.0

func (*MultiClusterFailures) Descriptor() ([]byte, []int)

Deprecated: Use MultiClusterFailures.ProtoReflect.Descriptor instead.

func (*MultiClusterFailures) GetFailures added in v0.6.0

func (x *MultiClusterFailures) GetFailures() []string

func (*MultiClusterFailures) ProtoMessage added in v0.6.0

func (*MultiClusterFailures) ProtoMessage()

func (*MultiClusterFailures) ProtoReflect added in v0.6.0

func (x *MultiClusterFailures) ProtoReflect() protoreflect.Message

func (*MultiClusterFailures) Reset added in v0.6.0

func (x *MultiClusterFailures) Reset()

func (*MultiClusterFailures) String added in v0.6.0

func (x *MultiClusterFailures) String() string

type MultiClusterSLO added in v0.6.0

type MultiClusterSLO struct {
	CloneId  *v1.Reference   `protobuf:"bytes,1,opt,name=cloneId,proto3" json:"cloneId,omitempty"`
	Clusters []*v1.Reference `protobuf:"bytes,2,rep,name=clusters,proto3" json:"clusters,omitempty"`
	// contains filtered or unexported fields
}

func (*MultiClusterSLO) Descriptor deprecated added in v0.6.0

func (*MultiClusterSLO) Descriptor() ([]byte, []int)

Deprecated: Use MultiClusterSLO.ProtoReflect.Descriptor instead.

func (*MultiClusterSLO) GetCloneId added in v0.6.0

func (x *MultiClusterSLO) GetCloneId() *v1.Reference

func (*MultiClusterSLO) GetClusters added in v0.6.0

func (x *MultiClusterSLO) GetClusters() []*v1.Reference

func (*MultiClusterSLO) ProtoMessage added in v0.6.0

func (*MultiClusterSLO) ProtoMessage()

func (*MultiClusterSLO) ProtoReflect added in v0.6.0

func (x *MultiClusterSLO) ProtoReflect() protoreflect.Message

func (*MultiClusterSLO) Reset added in v0.6.0

func (x *MultiClusterSLO) Reset()

func (*MultiClusterSLO) String added in v0.6.0

func (x *MultiClusterSLO) String() string

type PlotVector added in v0.6.0

type PlotVector struct {
	Objective float64               `protobuf:"fixed64,1,opt,name=objective,proto3" json:"objective,omitempty"`
	Items     []*DataPoint          `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"`
	Windows   []*AlertFiringWindows `protobuf:"bytes,3,rep,name=windows,proto3" json:"windows,omitempty"`
	// contains filtered or unexported fields
}

func (*PlotVector) Descriptor deprecated added in v0.6.0

func (*PlotVector) Descriptor() ([]byte, []int)

Deprecated: Use PlotVector.ProtoReflect.Descriptor instead.

func (*PlotVector) GetItems added in v0.6.0

func (x *PlotVector) GetItems() []*DataPoint

func (*PlotVector) GetObjective added in v0.6.0

func (x *PlotVector) GetObjective() float64

func (*PlotVector) GetWindows added in v0.6.0

func (x *PlotVector) GetWindows() []*AlertFiringWindows

func (*PlotVector) ProtoMessage added in v0.6.0

func (*PlotVector) ProtoMessage()

func (*PlotVector) ProtoReflect added in v0.6.0

func (x *PlotVector) ProtoReflect() protoreflect.Message

func (*PlotVector) Reset added in v0.6.0

func (x *PlotVector) Reset()

func (*PlotVector) String added in v0.6.0

func (x *PlotVector) String() string

type SLOClient

type SLOClient interface {
	CreateSLO(ctx context.Context, in *CreateSLORequest, opts ...grpc.CallOption) (*v1.Reference, error)
	GetSLO(ctx context.Context, in *v1.Reference, opts ...grpc.CallOption) (*SLOData, error)
	ListSLOs(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ServiceLevelObjectiveList, error)
	UpdateSLO(ctx context.Context, in *SLOData, opts ...grpc.CallOption) (*emptypb.Empty, error)
	DeleteSLO(ctx context.Context, in *v1.Reference, opts ...grpc.CallOption) (*emptypb.Empty, error)
	CloneSLO(ctx context.Context, in *v1.Reference, opts ...grpc.CallOption) (*SLOData, error)
	CloneToClusters(ctx context.Context, in *MultiClusterSLO, opts ...grpc.CallOption) (*MultiClusterFailures, error)
	// Returns a set of metrics with compatible implementations for
	// a set of services
	ListMetrics(ctx context.Context, in *ListMetricsRequest, opts ...grpc.CallOption) (*MetricGroupList, error)
	// Returns the list of services discovered by the Service Discovery backend
	ListServices(ctx context.Context, in *ListServicesRequest, opts ...grpc.CallOption) (*ServiceList, error)
	ListEvents(ctx context.Context, in *ListEventsRequest, opts ...grpc.CallOption) (*EventList, error)
	// Returns a status enum badge for a given SLO
	Status(ctx context.Context, in *v1.Reference, opts ...grpc.CallOption) (*SLOStatus, error)
	Preview(ctx context.Context, in *CreateSLORequest, opts ...grpc.CallOption) (*SLOPreviewResponse, error)
}

SLOClient is the client API for SLO service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewSLOClient

func NewSLOClient(cc grpc.ClientConnInterface) SLOClient

type SLOData

type SLOData struct {
	Id        string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	SLO       *ServiceLevelObjective `protobuf:"bytes,2,opt,name=SLO,proto3" json:"SLO,omitempty"`
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
	// contains filtered or unexported fields
}

func (*SLOData) Descriptor deprecated

func (*SLOData) Descriptor() ([]byte, []int)

Deprecated: Use SLOData.ProtoReflect.Descriptor instead.

func (*SLOData) GetCreatedAt added in v0.6.0

func (x *SLOData) GetCreatedAt() *timestamppb.Timestamp

func (*SLOData) GetId

func (x *SLOData) GetId() string

func (*SLOData) GetSLO

func (x *SLOData) GetSLO() *ServiceLevelObjective

func (*SLOData) ProtoMessage

func (*SLOData) ProtoMessage()

func (*SLOData) ProtoReflect

func (x *SLOData) ProtoReflect() protoreflect.Message

func (*SLOData) Reset

func (x *SLOData) Reset()

func (*SLOData) String

func (x *SLOData) String() string

func (*SLOData) Validate added in v0.6.0

func (s *SLOData) Validate() error

type SLOPreviewResponse added in v0.6.0

type SLOPreviewResponse struct {
	PlotVector *PlotVector `protobuf:"bytes,1,opt,name=plotVector,proto3" json:"plotVector,omitempty"`
	// contains filtered or unexported fields
}

func (*SLOPreviewResponse) Descriptor deprecated added in v0.6.0

func (*SLOPreviewResponse) Descriptor() ([]byte, []int)

Deprecated: Use SLOPreviewResponse.ProtoReflect.Descriptor instead.

func (*SLOPreviewResponse) GetPlotVector added in v0.6.0

func (x *SLOPreviewResponse) GetPlotVector() *PlotVector

func (*SLOPreviewResponse) ProtoMessage added in v0.6.0

func (*SLOPreviewResponse) ProtoMessage()

func (*SLOPreviewResponse) ProtoReflect added in v0.6.0

func (x *SLOPreviewResponse) ProtoReflect() protoreflect.Message

func (*SLOPreviewResponse) Reset added in v0.6.0

func (x *SLOPreviewResponse) Reset()

func (*SLOPreviewResponse) String added in v0.6.0

func (x *SLOPreviewResponse) String() string

type SLOServer

type SLOServer interface {
	CreateSLO(context.Context, *CreateSLORequest) (*v1.Reference, error)
	GetSLO(context.Context, *v1.Reference) (*SLOData, error)
	ListSLOs(context.Context, *emptypb.Empty) (*ServiceLevelObjectiveList, error)
	UpdateSLO(context.Context, *SLOData) (*emptypb.Empty, error)
	DeleteSLO(context.Context, *v1.Reference) (*emptypb.Empty, error)
	CloneSLO(context.Context, *v1.Reference) (*SLOData, error)
	CloneToClusters(context.Context, *MultiClusterSLO) (*MultiClusterFailures, error)
	// Returns a set of metrics with compatible implementations for
	// a set of services
	ListMetrics(context.Context, *ListMetricsRequest) (*MetricGroupList, error)
	// Returns the list of services discovered by the Service Discovery backend
	ListServices(context.Context, *ListServicesRequest) (*ServiceList, error)
	ListEvents(context.Context, *ListEventsRequest) (*EventList, error)
	// Returns a status enum badge for a given SLO
	Status(context.Context, *v1.Reference) (*SLOStatus, error)
	Preview(context.Context, *CreateSLORequest) (*SLOPreviewResponse, error)
	// contains filtered or unexported methods
}

SLOServer is the server API for SLO service. All implementations must embed UnimplementedSLOServer for forward compatibility

type SLOStatus

type SLOStatus struct {
	State SLOStatusState `protobuf:"varint,1,opt,name=state,proto3,enum=slo.SLOStatusState" json:"state,omitempty"`
	// contains filtered or unexported fields
}

func (*SLOStatus) Descriptor deprecated

func (*SLOStatus) Descriptor() ([]byte, []int)

Deprecated: Use SLOStatus.ProtoReflect.Descriptor instead.

func (*SLOStatus) GetState

func (x *SLOStatus) GetState() SLOStatusState

func (*SLOStatus) ProtoMessage

func (*SLOStatus) ProtoMessage()

func (*SLOStatus) ProtoReflect

func (x *SLOStatus) ProtoReflect() protoreflect.Message

func (*SLOStatus) Reset

func (x *SLOStatus) Reset()

func (*SLOStatus) String

func (x *SLOStatus) String() string

type SLOStatusState

type SLOStatusState int32
const (
	SLOStatusState_InProgress SLOStatusState = 0
	SLOStatusState_Creating   SLOStatusState = 1
	SLOStatusState_NoData     SLOStatusState = 2
	SLOStatusState_Ok         SLOStatusState = 3
	SLOStatusState_Warning    SLOStatusState = 4
	SLOStatusState_Breaching  SLOStatusState = 5
	// When budgeting or alerting rules have no data, but the rule has data
	SLOStatusState_PartialDataOk SLOStatusState = 6
	SLOStatusState_InternalError SLOStatusState = 7
)

func (SLOStatusState) Descriptor

func (SLOStatusState) Enum

func (x SLOStatusState) Enum() *SLOStatusState

func (SLOStatusState) EnumDescriptor deprecated

func (SLOStatusState) EnumDescriptor() ([]byte, []int)

Deprecated: Use SLOStatusState.Descriptor instead.

func (SLOStatusState) Number

func (SLOStatusState) String

func (x SLOStatusState) String() string

func (SLOStatusState) Type

type Service

type Service struct {
	ServiceId string `protobuf:"bytes,1,opt,name=serviceId,proto3" json:"serviceId,omitempty"`
	ClusterId string `protobuf:"bytes,2,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
	// contains filtered or unexported fields
}

func (*Service) Descriptor deprecated

func (*Service) Descriptor() ([]byte, []int)

Deprecated: Use Service.ProtoReflect.Descriptor instead.

func (*Service) GetClusterId

func (x *Service) GetClusterId() string

func (*Service) GetServiceId added in v0.6.0

func (x *Service) GetServiceId() string

func (*Service) ProtoMessage

func (*Service) ProtoMessage()

func (*Service) ProtoReflect

func (x *Service) ProtoReflect() protoreflect.Message

func (*Service) Reset

func (x *Service) Reset()

func (*Service) String

func (x *Service) String() string

type ServiceInfo added in v0.6.0

type ServiceInfo struct {
	JobId         string `protobuf:"bytes,1,opt,name=jobId,proto3" json:"jobId,omitempty"`
	ClusterId     string `protobuf:"bytes,5,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
	MetricName    string `protobuf:"bytes,2,opt,name=metricName,proto3" json:"metricName,omitempty"`
	MetricIdGood  string `protobuf:"bytes,3,opt,name=metricIdGood,proto3" json:"metricIdGood,omitempty"`
	MetricIdTotal string `protobuf:"bytes,4,opt,name=metricIdTotal,proto3" json:"metricIdTotal,omitempty"`
	// contains filtered or unexported fields
}

func (*ServiceInfo) Descriptor deprecated added in v0.6.0

func (*ServiceInfo) Descriptor() ([]byte, []int)

Deprecated: Use ServiceInfo.ProtoReflect.Descriptor instead.

func (*ServiceInfo) GetClusterId added in v0.6.0

func (x *ServiceInfo) GetClusterId() string

func (*ServiceInfo) GetJobId added in v0.6.0

func (x *ServiceInfo) GetJobId() string

func (*ServiceInfo) GetMetricIdGood added in v0.6.0

func (x *ServiceInfo) GetMetricIdGood() string

func (*ServiceInfo) GetMetricIdTotal added in v0.6.0

func (x *ServiceInfo) GetMetricIdTotal() string

func (*ServiceInfo) GetMetricName added in v0.6.0

func (x *ServiceInfo) GetMetricName() string

func (*ServiceInfo) ProtoMessage added in v0.6.0

func (*ServiceInfo) ProtoMessage()

func (*ServiceInfo) ProtoReflect added in v0.6.0

func (x *ServiceInfo) ProtoReflect() protoreflect.Message

func (*ServiceInfo) Reset added in v0.6.0

func (x *ServiceInfo) Reset()

func (*ServiceInfo) String added in v0.6.0

func (x *ServiceInfo) String() string

type ServiceLevelObjective

type ServiceLevelObjective struct {
	Name              string                 `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Datasource        string                 `protobuf:"bytes,2,opt,name=datasource,proto3" json:"datasource,omitempty"`
	ClusterId         string                 `protobuf:"bytes,3,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
	ServiceId         string                 `protobuf:"bytes,4,opt,name=serviceId,proto3" json:"serviceId,omitempty"`
	GoodMetricName    string                 `protobuf:"bytes,5,opt,name=goodMetricName,proto3" json:"goodMetricName,omitempty"`
	TotalMetricName   string                 `protobuf:"bytes,6,opt,name=totalMetricName,proto3" json:"totalMetricName,omitempty"`
	GoodEvents        []*Event               `protobuf:"bytes,7,rep,name=goodEvents,proto3" json:"goodEvents,omitempty"`
	TotalEvents       []*Event               `protobuf:"bytes,8,rep,name=totalEvents,proto3" json:"totalEvents,omitempty"`
	SloPeriod         string                 `protobuf:"bytes,9,opt,name=sloPeriod,proto3" json:"sloPeriod,omitempty"`                  // 7d, 28d or 30d
	BudgetingInterval *durationpb.Duration   `protobuf:"bytes,10,opt,name=budgetingInterval,proto3" json:"budgetingInterval,omitempty"` // budgeting interval should be between 1m and 60m
	Target            *Target                `protobuf:"bytes,11,opt,name=target,proto3" json:"target,omitempty"`
	Labels            []*Label               `protobuf:"bytes,12,rep,name=labels,proto3" json:"labels,omitempty"`
	AttachedEndpoints *v11.AttachedEndpoints `protobuf:"bytes,13,opt,name=attachedEndpoints,proto3" json:"attachedEndpoints,omitempty"`
	// contains filtered or unexported fields
}

func (*ServiceLevelObjective) Descriptor deprecated

func (*ServiceLevelObjective) Descriptor() ([]byte, []int)

Deprecated: Use ServiceLevelObjective.ProtoReflect.Descriptor instead.

func (*ServiceLevelObjective) GetAttachedEndpoints added in v0.6.1

func (x *ServiceLevelObjective) GetAttachedEndpoints() *v11.AttachedEndpoints

func (*ServiceLevelObjective) GetBudgetingInterval

func (x *ServiceLevelObjective) GetBudgetingInterval() *durationpb.Duration

func (*ServiceLevelObjective) GetClusterId added in v0.6.0

func (x *ServiceLevelObjective) GetClusterId() string

func (*ServiceLevelObjective) GetDatasource

func (x *ServiceLevelObjective) GetDatasource() string

func (*ServiceLevelObjective) GetGoodEvents added in v0.6.0

func (x *ServiceLevelObjective) GetGoodEvents() []*Event

func (*ServiceLevelObjective) GetGoodMetricName added in v0.6.0

func (x *ServiceLevelObjective) GetGoodMetricName() string

func (*ServiceLevelObjective) GetLabels

func (x *ServiceLevelObjective) GetLabels() []*Label

func (*ServiceLevelObjective) GetName

func (x *ServiceLevelObjective) GetName() string

func (*ServiceLevelObjective) GetServiceId added in v0.6.0

func (x *ServiceLevelObjective) GetServiceId() string

func (*ServiceLevelObjective) GetSloPeriod added in v0.6.0

func (x *ServiceLevelObjective) GetSloPeriod() string

func (*ServiceLevelObjective) GetTarget

func (x *ServiceLevelObjective) GetTarget() *Target

func (*ServiceLevelObjective) GetTotalEvents added in v0.6.0

func (x *ServiceLevelObjective) GetTotalEvents() []*Event

func (*ServiceLevelObjective) GetTotalMetricName added in v0.6.0

func (x *ServiceLevelObjective) GetTotalMetricName() string

func (*ServiceLevelObjective) ProtoMessage

func (*ServiceLevelObjective) ProtoMessage()

func (*ServiceLevelObjective) ProtoReflect

func (x *ServiceLevelObjective) ProtoReflect() protoreflect.Message

func (*ServiceLevelObjective) Reset

func (x *ServiceLevelObjective) Reset()

func (*ServiceLevelObjective) String

func (x *ServiceLevelObjective) String() string

func (*ServiceLevelObjective) Validate added in v0.6.0

func (slo *ServiceLevelObjective) Validate() error

type ServiceLevelObjectiveList

type ServiceLevelObjectiveList struct {
	Items []*SLOData `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*ServiceLevelObjectiveList) Descriptor deprecated

func (*ServiceLevelObjectiveList) Descriptor() ([]byte, []int)

Deprecated: Use ServiceLevelObjectiveList.ProtoReflect.Descriptor instead.

func (*ServiceLevelObjectiveList) GetItems

func (x *ServiceLevelObjectiveList) GetItems() []*SLOData

func (*ServiceLevelObjectiveList) ProtoMessage

func (*ServiceLevelObjectiveList) ProtoMessage()

func (*ServiceLevelObjectiveList) ProtoReflect

func (*ServiceLevelObjectiveList) Reset

func (x *ServiceLevelObjectiveList) Reset()

func (*ServiceLevelObjectiveList) String

func (x *ServiceLevelObjectiveList) String() string

type ServiceList

type ServiceList struct {
	Items []*Service `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*ServiceList) ContainsId added in v0.6.0

func (s *ServiceList) ContainsId(id string) bool

func (*ServiceList) Descriptor deprecated

func (*ServiceList) Descriptor() ([]byte, []int)

Deprecated: Use ServiceList.ProtoReflect.Descriptor instead.

func (*ServiceList) GetItems

func (x *ServiceList) GetItems() []*Service

func (*ServiceList) ProtoMessage

func (*ServiceList) ProtoMessage()

func (*ServiceList) ProtoReflect

func (x *ServiceList) ProtoReflect() protoreflect.Message

func (*ServiceList) Reset

func (x *ServiceList) Reset()

func (*ServiceList) String

func (x *ServiceList) String() string

type Target

type Target struct {
	Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Target) Descriptor deprecated

func (*Target) Descriptor() ([]byte, []int)

Deprecated: Use Target.ProtoReflect.Descriptor instead.

func (*Target) GetValue added in v0.6.0

func (x *Target) GetValue() float64

func (*Target) ProtoMessage

func (*Target) ProtoMessage()

func (*Target) ProtoReflect

func (x *Target) ProtoReflect() protoreflect.Message

func (*Target) Reset

func (x *Target) Reset()

func (*Target) String

func (x *Target) String() string

type UnimplementedSLOServer

type UnimplementedSLOServer struct {
}

UnimplementedSLOServer must be embedded to have forward compatible implementations.

func (UnimplementedSLOServer) CloneSLO

func (UnimplementedSLOServer) CloneToClusters added in v0.6.0

func (UnimplementedSLOServer) CreateSLO

func (UnimplementedSLOServer) DeleteSLO

func (UnimplementedSLOServer) GetSLO

func (UnimplementedSLOServer) ListEvents added in v0.6.0

func (UnimplementedSLOServer) ListMetrics

func (UnimplementedSLOServer) ListSLOs

func (UnimplementedSLOServer) ListServices

func (UnimplementedSLOServer) Preview added in v0.6.0

func (UnimplementedSLOServer) Status

func (UnimplementedSLOServer) UpdateSLO

type UnsafeSLOServer

type UnsafeSLOServer interface {
	// contains filtered or unexported methods
}

UnsafeSLOServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SLOServer will result in compilation errors.

Jump to

Keyboard shortcuts

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