Documentation ¶
Index ¶
- Variables
- func MetricsServiceServer(server MetricsServer) pluginsdk.ServiceServer
- func RegisterMetricsServer(s grpc.ServiceRegistrar, srv MetricsServer)
- type AddSampleRequest
- func (*AddSampleRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AddSampleRequest) GetKey() []string
- func (x *AddSampleRequest) GetLabels() []*Label
- func (x *AddSampleRequest) GetVal() float32
- func (*AddSampleRequest) ProtoMessage()
- func (x *AddSampleRequest) ProtoReflect() protoreflect.Message
- func (x *AddSampleRequest) Reset()
- func (x *AddSampleRequest) String() string
- type EmitKeyRequest
- func (*EmitKeyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EmitKeyRequest) GetKey() []string
- func (x *EmitKeyRequest) GetVal() float32
- func (*EmitKeyRequest) ProtoMessage()
- func (x *EmitKeyRequest) ProtoReflect() protoreflect.Message
- func (x *EmitKeyRequest) Reset()
- func (x *EmitKeyRequest) String() string
- type IncrCounterRequest
- func (*IncrCounterRequest) Descriptor() ([]byte, []int)deprecated
- func (x *IncrCounterRequest) GetKey() []string
- func (x *IncrCounterRequest) GetLabels() []*Label
- func (x *IncrCounterRequest) GetVal() float32
- func (*IncrCounterRequest) ProtoMessage()
- func (x *IncrCounterRequest) ProtoReflect() protoreflect.Message
- func (x *IncrCounterRequest) Reset()
- func (x *IncrCounterRequest) String() string
- type Label
- type MeasureSinceRequest
- func (*MeasureSinceRequest) Descriptor() ([]byte, []int)deprecated
- func (x *MeasureSinceRequest) GetKey() []string
- func (x *MeasureSinceRequest) GetLabels() []*Label
- func (x *MeasureSinceRequest) GetTime() int64
- func (*MeasureSinceRequest) ProtoMessage()
- func (x *MeasureSinceRequest) ProtoReflect() protoreflect.Message
- func (x *MeasureSinceRequest) Reset()
- func (x *MeasureSinceRequest) String() string
- type MetricsClient
- type MetricsServer
- type MetricsServiceClient
- type SetGaugeRequest
- func (*SetGaugeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SetGaugeRequest) GetKey() []string
- func (x *SetGaugeRequest) GetLabels() []*Label
- func (x *SetGaugeRequest) GetVal() float32
- func (*SetGaugeRequest) ProtoMessage()
- func (x *SetGaugeRequest) ProtoReflect() protoreflect.Message
- func (x *SetGaugeRequest) Reset()
- func (x *SetGaugeRequest) String() string
- type UnimplementedMetricsServer
- func (UnimplementedMetricsServer) AddSample(context.Context, *AddSampleRequest) (*emptypb.Empty, error)
- func (UnimplementedMetricsServer) EmitKey(context.Context, *EmitKeyRequest) (*emptypb.Empty, error)
- func (UnimplementedMetricsServer) IncrCounter(context.Context, *IncrCounterRequest) (*emptypb.Empty, error)
- func (UnimplementedMetricsServer) MeasureSince(context.Context, *MeasureSinceRequest) (*emptypb.Empty, error)
- func (UnimplementedMetricsServer) SetGauge(context.Context, *SetGaugeRequest) (*emptypb.Empty, error)
- type UnsafeMetricsServer
Constants ¶
This section is empty.
Variables ¶
var File_spire_hostservice_common_metrics_v1_metrics_proto protoreflect.FileDescriptor
var Metrics_ServiceDesc = grpc.ServiceDesc{ ServiceName: "spire.hostservice.common.metrics.v1.Metrics", HandlerType: (*MetricsServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SetGauge", Handler: _Metrics_SetGauge_Handler, }, { MethodName: "EmitKey", Handler: _Metrics_EmitKey_Handler, }, { MethodName: "IncrCounter", Handler: _Metrics_IncrCounter_Handler, }, { MethodName: "AddSample", Handler: _Metrics_AddSample_Handler, }, { MethodName: "MeasureSince", Handler: _Metrics_MeasureSince_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "spire/hostservice/common/metrics/v1/metrics.proto", }
Metrics_ServiceDesc is the grpc.ServiceDesc for Metrics service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func MetricsServiceServer ¶
func MetricsServiceServer(server MetricsServer) pluginsdk.ServiceServer
func RegisterMetricsServer ¶
func RegisterMetricsServer(s grpc.ServiceRegistrar, srv MetricsServer)
Types ¶
type AddSampleRequest ¶
type AddSampleRequest struct { // Required. The sample key. Key []string `protobuf:"bytes,1,rep,name=key,proto3" json:"key,omitempty"` // Required. The sample value. Val float32 `protobuf:"fixed32,2,opt,name=val,proto3" json:"val,omitempty"` // Optional. One or more labels for the sample. Labels []*Label `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty"` // contains filtered or unexported fields }
func (*AddSampleRequest) Descriptor
deprecated
func (*AddSampleRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddSampleRequest.ProtoReflect.Descriptor instead.
func (*AddSampleRequest) GetKey ¶
func (x *AddSampleRequest) GetKey() []string
func (*AddSampleRequest) GetLabels ¶
func (x *AddSampleRequest) GetLabels() []*Label
func (*AddSampleRequest) GetVal ¶
func (x *AddSampleRequest) GetVal() float32
func (*AddSampleRequest) ProtoMessage ¶
func (*AddSampleRequest) ProtoMessage()
func (*AddSampleRequest) ProtoReflect ¶
func (x *AddSampleRequest) ProtoReflect() protoreflect.Message
func (*AddSampleRequest) Reset ¶
func (x *AddSampleRequest) Reset()
func (*AddSampleRequest) String ¶
func (x *AddSampleRequest) String() string
type EmitKeyRequest ¶
type EmitKeyRequest struct { // Required. The key key. Key []string `protobuf:"bytes,1,rep,name=key,proto3" json:"key,omitempty"` // Required. The key value. Val float32 `protobuf:"fixed32,2,opt,name=val,proto3" json:"val,omitempty"` // contains filtered or unexported fields }
func (*EmitKeyRequest) Descriptor
deprecated
func (*EmitKeyRequest) Descriptor() ([]byte, []int)
Deprecated: Use EmitKeyRequest.ProtoReflect.Descriptor instead.
func (*EmitKeyRequest) GetKey ¶
func (x *EmitKeyRequest) GetKey() []string
func (*EmitKeyRequest) GetVal ¶
func (x *EmitKeyRequest) GetVal() float32
func (*EmitKeyRequest) ProtoMessage ¶
func (*EmitKeyRequest) ProtoMessage()
func (*EmitKeyRequest) ProtoReflect ¶
func (x *EmitKeyRequest) ProtoReflect() protoreflect.Message
func (*EmitKeyRequest) Reset ¶
func (x *EmitKeyRequest) Reset()
func (*EmitKeyRequest) String ¶
func (x *EmitKeyRequest) String() string
type IncrCounterRequest ¶
type IncrCounterRequest struct { // Required. The counter key. Key []string `protobuf:"bytes,1,rep,name=key,proto3" json:"key,omitempty"` // Required. The counter value. Val float32 `protobuf:"fixed32,2,opt,name=val,proto3" json:"val,omitempty"` // Optional. One or more labels for the counter. Labels []*Label `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty"` // contains filtered or unexported fields }
func (*IncrCounterRequest) Descriptor
deprecated
func (*IncrCounterRequest) Descriptor() ([]byte, []int)
Deprecated: Use IncrCounterRequest.ProtoReflect.Descriptor instead.
func (*IncrCounterRequest) GetKey ¶
func (x *IncrCounterRequest) GetKey() []string
func (*IncrCounterRequest) GetLabels ¶
func (x *IncrCounterRequest) GetLabels() []*Label
func (*IncrCounterRequest) GetVal ¶
func (x *IncrCounterRequest) GetVal() float32
func (*IncrCounterRequest) ProtoMessage ¶
func (*IncrCounterRequest) ProtoMessage()
func (*IncrCounterRequest) ProtoReflect ¶
func (x *IncrCounterRequest) ProtoReflect() protoreflect.Message
func (*IncrCounterRequest) Reset ¶
func (x *IncrCounterRequest) Reset()
func (*IncrCounterRequest) String ¶
func (x *IncrCounterRequest) String() string
type Label ¶
type Label struct { // Required. The name of the label. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Required. The value of the label. Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*Label) Descriptor
deprecated
func (*Label) ProtoMessage ¶
func (*Label) ProtoMessage()
func (*Label) ProtoReflect ¶
func (x *Label) ProtoReflect() protoreflect.Message
type MeasureSinceRequest ¶
type MeasureSinceRequest struct { // Required. The sample key for the time measurement. Key []string `protobuf:"bytes,1,rep,name=key,proto3" json:"key,omitempty"` // Required. Unix time in nanoseconds. Time int64 `protobuf:"varint,2,opt,name=time,proto3" json:"time,omitempty"` // Optional. One or more labels for the sample. Labels []*Label `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty"` // contains filtered or unexported fields }
func (*MeasureSinceRequest) Descriptor
deprecated
func (*MeasureSinceRequest) Descriptor() ([]byte, []int)
Deprecated: Use MeasureSinceRequest.ProtoReflect.Descriptor instead.
func (*MeasureSinceRequest) GetKey ¶
func (x *MeasureSinceRequest) GetKey() []string
func (*MeasureSinceRequest) GetLabels ¶
func (x *MeasureSinceRequest) GetLabels() []*Label
func (*MeasureSinceRequest) GetTime ¶
func (x *MeasureSinceRequest) GetTime() int64
func (*MeasureSinceRequest) ProtoMessage ¶
func (*MeasureSinceRequest) ProtoMessage()
func (*MeasureSinceRequest) ProtoReflect ¶
func (x *MeasureSinceRequest) ProtoReflect() protoreflect.Message
func (*MeasureSinceRequest) Reset ¶
func (x *MeasureSinceRequest) Reset()
func (*MeasureSinceRequest) String ¶
func (x *MeasureSinceRequest) String() string
type MetricsClient ¶
type MetricsClient interface { // Sets a gauge to the specified value with zero or more labels. SetGauge(ctx context.Context, in *SetGaugeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Emits a key/value pair. EmitKey(ctx context.Context, in *EmitKeyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Increments a counter by the given value with zero or more labels. The // value should be an accumulation of previous values and should only grow. IncrCounter(ctx context.Context, in *IncrCounterRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Adds a sample of the given value with zero or more labels. AddSample(ctx context.Context, in *AddSampleRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Adds a sample for the elapsed time since the given // timestamp with zero or more labels. MeasureSince(ctx context.Context, in *MeasureSinceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) }
MetricsClient is the client API for Metrics 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 NewMetricsClient ¶
func NewMetricsClient(cc grpc.ClientConnInterface) MetricsClient
type MetricsServer ¶
type MetricsServer interface { // Sets a gauge to the specified value with zero or more labels. SetGauge(context.Context, *SetGaugeRequest) (*emptypb.Empty, error) // Emits a key/value pair. EmitKey(context.Context, *EmitKeyRequest) (*emptypb.Empty, error) // Increments a counter by the given value with zero or more labels. The // value should be an accumulation of previous values and should only grow. IncrCounter(context.Context, *IncrCounterRequest) (*emptypb.Empty, error) // Adds a sample of the given value with zero or more labels. AddSample(context.Context, *AddSampleRequest) (*emptypb.Empty, error) // Adds a sample for the elapsed time since the given // timestamp with zero or more labels. MeasureSince(context.Context, *MeasureSinceRequest) (*emptypb.Empty, error) // contains filtered or unexported methods }
MetricsServer is the server API for Metrics service. All implementations must embed UnimplementedMetricsServer for forward compatibility
type MetricsServiceClient ¶
type MetricsServiceClient struct {
MetricsClient
}
func (*MetricsServiceClient) GRPCServiceName ¶
func (c *MetricsServiceClient) GRPCServiceName() string
func (*MetricsServiceClient) InitClient ¶
func (c *MetricsServiceClient) InitClient(conn grpc.ClientConnInterface) interface{}
func (*MetricsServiceClient) IsInitialized ¶
func (c *MetricsServiceClient) IsInitialized() bool
type SetGaugeRequest ¶
type SetGaugeRequest struct { // Required. The gauge key. Key []string `protobuf:"bytes,1,rep,name=key,proto3" json:"key,omitempty"` // Required. The gauge value. Val float32 `protobuf:"fixed32,2,opt,name=val,proto3" json:"val,omitempty"` // Optional. One or more labels for the gauge. Labels []*Label `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty"` // contains filtered or unexported fields }
func (*SetGaugeRequest) Descriptor
deprecated
func (*SetGaugeRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetGaugeRequest.ProtoReflect.Descriptor instead.
func (*SetGaugeRequest) GetKey ¶
func (x *SetGaugeRequest) GetKey() []string
func (*SetGaugeRequest) GetLabels ¶
func (x *SetGaugeRequest) GetLabels() []*Label
func (*SetGaugeRequest) GetVal ¶
func (x *SetGaugeRequest) GetVal() float32
func (*SetGaugeRequest) ProtoMessage ¶
func (*SetGaugeRequest) ProtoMessage()
func (*SetGaugeRequest) ProtoReflect ¶
func (x *SetGaugeRequest) ProtoReflect() protoreflect.Message
func (*SetGaugeRequest) Reset ¶
func (x *SetGaugeRequest) Reset()
func (*SetGaugeRequest) String ¶
func (x *SetGaugeRequest) String() string
type UnimplementedMetricsServer ¶
type UnimplementedMetricsServer struct { }
UnimplementedMetricsServer must be embedded to have forward compatible implementations.
func (UnimplementedMetricsServer) AddSample ¶
func (UnimplementedMetricsServer) AddSample(context.Context, *AddSampleRequest) (*emptypb.Empty, error)
func (UnimplementedMetricsServer) EmitKey ¶
func (UnimplementedMetricsServer) EmitKey(context.Context, *EmitKeyRequest) (*emptypb.Empty, error)
func (UnimplementedMetricsServer) IncrCounter ¶
func (UnimplementedMetricsServer) IncrCounter(context.Context, *IncrCounterRequest) (*emptypb.Empty, error)
func (UnimplementedMetricsServer) MeasureSince ¶
func (UnimplementedMetricsServer) MeasureSince(context.Context, *MeasureSinceRequest) (*emptypb.Empty, error)
func (UnimplementedMetricsServer) SetGauge ¶
func (UnimplementedMetricsServer) SetGauge(context.Context, *SetGaugeRequest) (*emptypb.Empty, error)
type UnsafeMetricsServer ¶
type UnsafeMetricsServer interface {
// contains filtered or unexported methods
}
UnsafeMetricsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MetricsServer will result in compilation errors.