metricsv1

package
v1.5.5 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2022 License: Apache-2.0 Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_spire_hostservice_common_metrics_v1_metrics_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Label.ProtoReflect.Descriptor instead.

func (*Label) GetName

func (x *Label) GetName() string

func (*Label) GetValue

func (x *Label) GetValue() 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 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) EmitKey

func (UnimplementedMetricsServer) IncrCounter

func (UnimplementedMetricsServer) MeasureSince

func (UnimplementedMetricsServer) SetGauge

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.

Jump to

Keyboard shortcuts

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