Documentation
¶
Index ¶
- func RegisterMetricConfigServer(s *grpc.Server, srv MetricConfigServer)
- type MetricConfigClient
- type MetricConfigRequest
- func (*MetricConfigRequest) Descriptor() ([]byte, []int)
- func (m *MetricConfigRequest) GetLastKnownFingerprint() []byte
- func (m *MetricConfigRequest) GetResource() *v1.Resource
- func (*MetricConfigRequest) ProtoMessage()
- func (m *MetricConfigRequest) Reset()
- func (m *MetricConfigRequest) String() string
- func (m *MetricConfigRequest) XXX_DiscardUnknown()
- func (m *MetricConfigRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MetricConfigRequest) XXX_Merge(src proto.Message)
- func (m *MetricConfigRequest) XXX_Size() int
- func (m *MetricConfigRequest) XXX_Unmarshal(b []byte) error
- type MetricConfigResponse
- func (*MetricConfigResponse) Descriptor() ([]byte, []int)
- func (m *MetricConfigResponse) GetFingerprint() []byte
- func (m *MetricConfigResponse) GetSchedules() []*MetricConfigResponse_Schedule
- func (m *MetricConfigResponse) GetSuggestedWaitTimeSec() int32
- func (*MetricConfigResponse) ProtoMessage()
- func (m *MetricConfigResponse) Reset()
- func (m *MetricConfigResponse) String() string
- func (m *MetricConfigResponse) XXX_DiscardUnknown()
- func (m *MetricConfigResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MetricConfigResponse) XXX_Merge(src proto.Message)
- func (m *MetricConfigResponse) XXX_Size() int
- func (m *MetricConfigResponse) XXX_Unmarshal(b []byte) error
- type MetricConfigResponse_Schedule
- func (*MetricConfigResponse_Schedule) Descriptor() ([]byte, []int)
- func (m *MetricConfigResponse_Schedule) GetExclusionPatterns() []*MetricConfigResponse_Schedule_Pattern
- func (m *MetricConfigResponse_Schedule) GetInclusionPatterns() []*MetricConfigResponse_Schedule_Pattern
- func (m *MetricConfigResponse_Schedule) GetPeriodSec() int32
- func (*MetricConfigResponse_Schedule) ProtoMessage()
- func (m *MetricConfigResponse_Schedule) Reset()
- func (m *MetricConfigResponse_Schedule) String() string
- func (m *MetricConfigResponse_Schedule) XXX_DiscardUnknown()
- func (m *MetricConfigResponse_Schedule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MetricConfigResponse_Schedule) XXX_Merge(src proto.Message)
- func (m *MetricConfigResponse_Schedule) XXX_Size() int
- func (m *MetricConfigResponse_Schedule) XXX_Unmarshal(b []byte) error
- type MetricConfigResponse_Schedule_Pattern
- func (*MetricConfigResponse_Schedule_Pattern) Descriptor() ([]byte, []int)
- func (m *MetricConfigResponse_Schedule_Pattern) GetEquals() string
- func (m *MetricConfigResponse_Schedule_Pattern) GetMatch() isMetricConfigResponse_Schedule_Pattern_Match
- func (m *MetricConfigResponse_Schedule_Pattern) GetStartsWith() string
- func (*MetricConfigResponse_Schedule_Pattern) ProtoMessage()
- func (m *MetricConfigResponse_Schedule_Pattern) Reset()
- func (m *MetricConfigResponse_Schedule_Pattern) String() string
- func (m *MetricConfigResponse_Schedule_Pattern) XXX_DiscardUnknown()
- func (m *MetricConfigResponse_Schedule_Pattern) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MetricConfigResponse_Schedule_Pattern) XXX_Merge(src proto.Message)
- func (*MetricConfigResponse_Schedule_Pattern) XXX_OneofWrappers() []interface{}
- func (m *MetricConfigResponse_Schedule_Pattern) XXX_Size() int
- func (m *MetricConfigResponse_Schedule_Pattern) XXX_Unmarshal(b []byte) error
- type MetricConfigResponse_Schedule_Pattern_Equals
- type MetricConfigResponse_Schedule_Pattern_StartsWith
- type MetricConfigServer
- type UnimplementedMetricConfigServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
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) ProtoMessage ¶
func (*MetricConfigRequest) ProtoMessage()
func (*MetricConfigRequest) Reset ¶
func (m *MetricConfigRequest) Reset()
func (*MetricConfigRequest) String ¶
func (m *MetricConfigRequest) String() string
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 */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*MetricConfigResponse) Descriptor ¶
func (*MetricConfigResponse) Descriptor() ([]byte, []int)
func (*MetricConfigResponse) GetFingerprint ¶
func (m *MetricConfigResponse) GetFingerprint() []byte
func (*MetricConfigResponse) GetSchedules ¶
func (m *MetricConfigResponse) GetSchedules() []*MetricConfigResponse_Schedule
func (*MetricConfigResponse) GetSuggestedWaitTimeSec ¶
func (m *MetricConfigResponse) GetSuggestedWaitTimeSec() int32
func (*MetricConfigResponse) ProtoMessage ¶
func (*MetricConfigResponse) ProtoMessage()
func (*MetricConfigResponse) Reset ¶
func (m *MetricConfigResponse) Reset()
func (*MetricConfigResponse) String ¶
func (m *MetricConfigResponse) String() string
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
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 (m *MetricConfigResponse_Schedule) GetExclusionPatterns() []*MetricConfigResponse_Schedule_Pattern
func (*MetricConfigResponse_Schedule) GetInclusionPatterns ¶
func (m *MetricConfigResponse_Schedule) GetInclusionPatterns() []*MetricConfigResponse_Schedule_Pattern
func (*MetricConfigResponse_Schedule) GetPeriodSec ¶
func (m *MetricConfigResponse_Schedule) GetPeriodSec() int32
func (*MetricConfigResponse_Schedule) ProtoMessage ¶
func (*MetricConfigResponse_Schedule) ProtoMessage()
func (*MetricConfigResponse_Schedule) Reset ¶
func (m *MetricConfigResponse_Schedule) Reset()
func (*MetricConfigResponse_Schedule) String ¶
func (m *MetricConfigResponse_Schedule) String() string
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
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 (m *MetricConfigResponse_Schedule_Pattern) GetEquals() string
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) ProtoMessage ¶
func (*MetricConfigResponse_Schedule_Pattern) ProtoMessage()
func (*MetricConfigResponse_Schedule_Pattern) Reset ¶
func (m *MetricConfigResponse_Schedule_Pattern) Reset()
func (*MetricConfigResponse_Schedule_Pattern) String ¶
func (m *MetricConfigResponse_Schedule_Pattern) String() string
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 (m *MetricConfigResponse_Schedule_Pattern) XXX_Merge(src proto.Message)
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 (m *MetricConfigResponse_Schedule_Pattern) XXX_Size() int
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"`
}
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"`
}
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 ¶
func (*UnimplementedMetricConfigServer) GetMetricConfig(ctx context.Context, req *MetricConfigRequest) (*MetricConfigResponse, error)