experimental

package
v0.0.0-...-f4a1003 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthMetricsConfigService        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMetricsConfigService          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMetricsConfigService = fmt.Errorf("proto: unexpected end of group")
)

Functions

func RegisterMetricConfigServer

func RegisterMetricConfigServer(s *grpc.Server, srv MetricConfigServer)

Types

type MetricConfigClient

type MetricConfigClient interface {
	GetMetricConfig(ctx context.Context, in *MetricConfigRequest, opts ...grpc.CallOption) (*MetricConfigResponse, error)
}

MetricConfigClient is the client API for MetricConfig service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMetricConfigClient

func NewMetricConfigClient(cc *grpc.ClientConn) MetricConfigClient

type MetricConfigRequest

type MetricConfigRequest struct {
	// Required. The resource for which configuration should be returned.
	Resource *v1.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
	// Optional. The value of MetricConfigResponse.fingerprint for the last
	// configuration that the caller received and successfully applied.
	LastKnownFingerprint []byte `protobuf:"bytes,2,opt,name=last_known_fingerprint,json=lastKnownFingerprint,proto3" json:"last_known_fingerprint,omitempty"`
}

func (*MetricConfigRequest) Descriptor

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

func (*MetricConfigRequest) GetLastKnownFingerprint

func (m *MetricConfigRequest) GetLastKnownFingerprint() []byte

func (*MetricConfigRequest) GetResource

func (m *MetricConfigRequest) GetResource() *v1.Resource

func (*MetricConfigRequest) Marshal

func (m *MetricConfigRequest) Marshal() (dAtA []byte, err error)

func (*MetricConfigRequest) MarshalTo

func (m *MetricConfigRequest) MarshalTo(dAtA []byte) (int, error)

func (*MetricConfigRequest) MarshalToSizedBuffer

func (m *MetricConfigRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MetricConfigRequest) ProtoMessage

func (*MetricConfigRequest) ProtoMessage()

func (*MetricConfigRequest) Reset

func (m *MetricConfigRequest) Reset()

func (*MetricConfigRequest) Size

func (m *MetricConfigRequest) Size() (n int)

func (*MetricConfigRequest) String

func (m *MetricConfigRequest) String() string

func (*MetricConfigRequest) Unmarshal

func (m *MetricConfigRequest) Unmarshal(dAtA []byte) error

func (*MetricConfigRequest) XXX_DiscardUnknown

func (m *MetricConfigRequest) XXX_DiscardUnknown()

func (*MetricConfigRequest) XXX_Marshal

func (m *MetricConfigRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MetricConfigRequest) XXX_Merge

func (m *MetricConfigRequest) XXX_Merge(src proto.Message)

func (*MetricConfigRequest) XXX_Size

func (m *MetricConfigRequest) XXX_Size() int

func (*MetricConfigRequest) XXX_Unmarshal

func (m *MetricConfigRequest) XXX_Unmarshal(b []byte) error

type MetricConfigResponse

type MetricConfigResponse struct {
	// Optional. The fingerprint associated with this MetricConfigResponse. Each
	// change in configs yields a different fingerprint. The resource SHOULD copy
	// this value to MetricConfigRequest.last_known_fingerprint for the next
	// configuration request. If there are no changes between fingerprint and
	// MetricConfigRequest.last_known_fingerprint, then all other fields besides
	// fingerprint in the response are optional, or the same as the last update if
	// present.
	//
	// The exact mechanics of generating the fingerprint is up to the
	// implementation. However, a fingerprint must be deterministically determined
	// by the configurations -- the same configuration will generate the same
	// fingerprint on any instance of an implementation. Hence using a timestamp is
	// unacceptable, but a deterministic hash is fine.
	Fingerprint []byte `protobuf:"bytes,1,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"`
	// A single metric may match multiple schedules. In such cases, the schedule
	// that specifies the smallest period is applied.
	//
	// Note, for optimization purposes, it is recommended to use as few schedules
	// as possible to capture all required metric updates. Where you can be
	// conservative, do take full advantage of the inclusion/exclusion patterns to
	// capture as much of your targeted metrics.
	Schedules []*MetricConfigResponse_Schedule `protobuf:"bytes,2,rep,name=schedules,proto3" json:"schedules,omitempty"`
	// Optional. The client is suggested to wait this long (in seconds) before
	// pinging the configuration service again.
	SuggestedWaitTimeSec int32 `` /* 126-byte string literal not displayed */
}

func (*MetricConfigResponse) Descriptor

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

func (*MetricConfigResponse) GetFingerprint

func (m *MetricConfigResponse) GetFingerprint() []byte

func (*MetricConfigResponse) GetSchedules

func (*MetricConfigResponse) GetSuggestedWaitTimeSec

func (m *MetricConfigResponse) GetSuggestedWaitTimeSec() int32

func (*MetricConfigResponse) Marshal

func (m *MetricConfigResponse) Marshal() (dAtA []byte, err error)

func (*MetricConfigResponse) MarshalTo

func (m *MetricConfigResponse) MarshalTo(dAtA []byte) (int, error)

func (*MetricConfigResponse) MarshalToSizedBuffer

func (m *MetricConfigResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MetricConfigResponse) ProtoMessage

func (*MetricConfigResponse) ProtoMessage()

func (*MetricConfigResponse) Reset

func (m *MetricConfigResponse) Reset()

func (*MetricConfigResponse) Size

func (m *MetricConfigResponse) Size() (n int)

func (*MetricConfigResponse) String

func (m *MetricConfigResponse) String() string

func (*MetricConfigResponse) Unmarshal

func (m *MetricConfigResponse) Unmarshal(dAtA []byte) error

func (*MetricConfigResponse) XXX_DiscardUnknown

func (m *MetricConfigResponse) XXX_DiscardUnknown()

func (*MetricConfigResponse) XXX_Marshal

func (m *MetricConfigResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MetricConfigResponse) XXX_Merge

func (m *MetricConfigResponse) XXX_Merge(src proto.Message)

func (*MetricConfigResponse) XXX_Size

func (m *MetricConfigResponse) XXX_Size() int

func (*MetricConfigResponse) XXX_Unmarshal

func (m *MetricConfigResponse) XXX_Unmarshal(b []byte) error

type MetricConfigResponse_Schedule

type MetricConfigResponse_Schedule struct {
	// Metrics with names that match a rule in the inclusion_patterns are
	// targeted by this schedule. Metrics that match the exclusion_patterns
	// are not targeted for this schedule, even if they match an inclusion
	// pattern.
	ExclusionPatterns []*MetricConfigResponse_Schedule_Pattern `protobuf:"bytes,1,rep,name=exclusion_patterns,json=exclusionPatterns,proto3" json:"exclusion_patterns,omitempty"`
	InclusionPatterns []*MetricConfigResponse_Schedule_Pattern `protobuf:"bytes,2,rep,name=inclusion_patterns,json=inclusionPatterns,proto3" json:"inclusion_patterns,omitempty"`
	// Describes the collection period for each metric in seconds.
	// A period of 0 means to not export.
	PeriodSec int32 `protobuf:"varint,3,opt,name=period_sec,json=periodSec,proto3" json:"period_sec,omitempty"`
}

A Schedule is used to apply a particular scheduling configuration to a metric. If a metric name matches a schedule's patterns, then the metric adopts the configuration specified by the schedule.

func (*MetricConfigResponse_Schedule) Descriptor

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

func (*MetricConfigResponse_Schedule) GetExclusionPatterns

func (*MetricConfigResponse_Schedule) GetInclusionPatterns

func (*MetricConfigResponse_Schedule) GetPeriodSec

func (m *MetricConfigResponse_Schedule) GetPeriodSec() int32

func (*MetricConfigResponse_Schedule) Marshal

func (m *MetricConfigResponse_Schedule) Marshal() (dAtA []byte, err error)

func (*MetricConfigResponse_Schedule) MarshalTo

func (m *MetricConfigResponse_Schedule) MarshalTo(dAtA []byte) (int, error)

func (*MetricConfigResponse_Schedule) MarshalToSizedBuffer

func (m *MetricConfigResponse_Schedule) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MetricConfigResponse_Schedule) ProtoMessage

func (*MetricConfigResponse_Schedule) ProtoMessage()

func (*MetricConfigResponse_Schedule) Reset

func (m *MetricConfigResponse_Schedule) Reset()

func (*MetricConfigResponse_Schedule) Size

func (m *MetricConfigResponse_Schedule) Size() (n int)

func (*MetricConfigResponse_Schedule) String

func (*MetricConfigResponse_Schedule) Unmarshal

func (m *MetricConfigResponse_Schedule) Unmarshal(dAtA []byte) error

func (*MetricConfigResponse_Schedule) XXX_DiscardUnknown

func (m *MetricConfigResponse_Schedule) XXX_DiscardUnknown()

func (*MetricConfigResponse_Schedule) XXX_Marshal

func (m *MetricConfigResponse_Schedule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MetricConfigResponse_Schedule) XXX_Merge

func (m *MetricConfigResponse_Schedule) XXX_Merge(src proto.Message)

func (*MetricConfigResponse_Schedule) XXX_Size

func (m *MetricConfigResponse_Schedule) XXX_Size() int

func (*MetricConfigResponse_Schedule) XXX_Unmarshal

func (m *MetricConfigResponse_Schedule) XXX_Unmarshal(b []byte) error

type MetricConfigResponse_Schedule_Pattern

type MetricConfigResponse_Schedule_Pattern struct {
	// Types that are valid to be assigned to Match:
	//	*MetricConfigResponse_Schedule_Pattern_Equals
	//	*MetricConfigResponse_Schedule_Pattern_StartsWith
	Match isMetricConfigResponse_Schedule_Pattern_Match `protobuf_oneof:"match"`
}

A light-weight pattern that can match 1 or more metrics, for which this schedule will apply. The string is used to match against metric names. It should not exceed 100k characters.

func (*MetricConfigResponse_Schedule_Pattern) Descriptor

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

func (*MetricConfigResponse_Schedule_Pattern) GetEquals

func (*MetricConfigResponse_Schedule_Pattern) GetMatch

func (m *MetricConfigResponse_Schedule_Pattern) GetMatch() isMetricConfigResponse_Schedule_Pattern_Match

func (*MetricConfigResponse_Schedule_Pattern) GetStartsWith

func (m *MetricConfigResponse_Schedule_Pattern) GetStartsWith() string

func (*MetricConfigResponse_Schedule_Pattern) Marshal

func (m *MetricConfigResponse_Schedule_Pattern) Marshal() (dAtA []byte, err error)

func (*MetricConfigResponse_Schedule_Pattern) MarshalTo

func (m *MetricConfigResponse_Schedule_Pattern) MarshalTo(dAtA []byte) (int, error)

func (*MetricConfigResponse_Schedule_Pattern) MarshalToSizedBuffer

func (m *MetricConfigResponse_Schedule_Pattern) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MetricConfigResponse_Schedule_Pattern) ProtoMessage

func (*MetricConfigResponse_Schedule_Pattern) ProtoMessage()

func (*MetricConfigResponse_Schedule_Pattern) Reset

func (*MetricConfigResponse_Schedule_Pattern) Size

func (*MetricConfigResponse_Schedule_Pattern) String

func (*MetricConfigResponse_Schedule_Pattern) Unmarshal

func (m *MetricConfigResponse_Schedule_Pattern) Unmarshal(dAtA []byte) error

func (*MetricConfigResponse_Schedule_Pattern) XXX_DiscardUnknown

func (m *MetricConfigResponse_Schedule_Pattern) XXX_DiscardUnknown()

func (*MetricConfigResponse_Schedule_Pattern) XXX_Marshal

func (m *MetricConfigResponse_Schedule_Pattern) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MetricConfigResponse_Schedule_Pattern) XXX_Merge

func (*MetricConfigResponse_Schedule_Pattern) XXX_OneofWrappers

func (*MetricConfigResponse_Schedule_Pattern) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*MetricConfigResponse_Schedule_Pattern) XXX_Size

func (*MetricConfigResponse_Schedule_Pattern) XXX_Unmarshal

func (m *MetricConfigResponse_Schedule_Pattern) XXX_Unmarshal(b []byte) error

type MetricConfigResponse_Schedule_Pattern_Equals

type MetricConfigResponse_Schedule_Pattern_Equals struct {
	Equals string `protobuf:"bytes,1,opt,name=equals,proto3,oneof" json:"equals,omitempty"`
}

func (*MetricConfigResponse_Schedule_Pattern_Equals) MarshalTo

func (*MetricConfigResponse_Schedule_Pattern_Equals) MarshalToSizedBuffer

func (m *MetricConfigResponse_Schedule_Pattern_Equals) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MetricConfigResponse_Schedule_Pattern_Equals) Size

type MetricConfigResponse_Schedule_Pattern_StartsWith

type MetricConfigResponse_Schedule_Pattern_StartsWith struct {
	StartsWith string `protobuf:"bytes,2,opt,name=starts_with,json=startsWith,proto3,oneof" json:"starts_with,omitempty"`
}

func (*MetricConfigResponse_Schedule_Pattern_StartsWith) MarshalTo

func (*MetricConfigResponse_Schedule_Pattern_StartsWith) MarshalToSizedBuffer

func (m *MetricConfigResponse_Schedule_Pattern_StartsWith) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MetricConfigResponse_Schedule_Pattern_StartsWith) Size

type MetricConfigServer

type MetricConfigServer interface {
	GetMetricConfig(context.Context, *MetricConfigRequest) (*MetricConfigResponse, error)
}

MetricConfigServer is the server API for MetricConfig service.

type UnimplementedMetricConfigServer

type UnimplementedMetricConfigServer struct {
}

UnimplementedMetricConfigServer can be embedded to have forward compatible implementations.

func (*UnimplementedMetricConfigServer) GetMetricConfig

Jump to

Keyboard shortcuts

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