Documentation ¶
Index ¶
- Variables
- func NewRemoteCollector(client RemoteCollectorClient) prometheus.Collector
- func RegisterRemoteCollectorServer(s grpc.ServiceRegistrar, srv RemoteCollectorServer)
- type CollectorServer
- type DescriptorList
- type Metric
- type MetricList
- type RemoteCollectorClient
- type RemoteCollectorServer
- type UnimplementedRemoteCollectorServer
- type UnsafeRemoteCollectorServer
Constants ¶
This section is empty.
Variables ¶
var File_pkg_metrics_collector_remote_proto protoreflect.FileDescriptor
var RemoteCollector_ServiceDesc = grpc.ServiceDesc{ ServiceName: "collector.RemoteCollector", HandlerType: (*RemoteCollectorServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Describe", Handler: _RemoteCollector_Describe_Handler, }, { MethodName: "Collect", Handler: _RemoteCollector_Collect_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pkg/metrics/collector/remote.proto", }
RemoteCollector_ServiceDesc is the grpc.ServiceDesc for RemoteCollector service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func NewRemoteCollector ¶
func NewRemoteCollector(client RemoteCollectorClient) prometheus.Collector
func RegisterRemoteCollectorServer ¶
func RegisterRemoteCollectorServer(s grpc.ServiceRegistrar, srv RemoteCollectorServer)
Types ¶
type CollectorServer ¶
type CollectorServer interface { RemoteCollectorServer MustRegister(collectors ...prometheus.Collector) }
func NewCollectorServer ¶
func NewCollectorServer() CollectorServer
type DescriptorList ¶
type DescriptorList struct { Descriptors []*desc.Desc `protobuf:"bytes,1,rep,name=descriptors,proto3" json:"descriptors,omitempty"` // contains filtered or unexported fields }
func (*DescriptorList) Descriptor
deprecated
func (*DescriptorList) Descriptor() ([]byte, []int)
Deprecated: Use DescriptorList.ProtoReflect.Descriptor instead.
func (*DescriptorList) GetDescriptors ¶
func (x *DescriptorList) GetDescriptors() []*desc.Desc
func (*DescriptorList) ProtoMessage ¶
func (*DescriptorList) ProtoMessage()
func (*DescriptorList) ProtoReflect ¶
func (x *DescriptorList) ProtoReflect() protoreflect.Message
func (*DescriptorList) Reset ¶
func (x *DescriptorList) Reset()
func (*DescriptorList) String ¶
func (x *DescriptorList) String() string
type Metric ¶
type Metric struct { Desc *desc.Desc `protobuf:"bytes,1,opt,name=desc,proto3" json:"desc,omitempty"` Metric *_go.Metric `protobuf:"bytes,2,opt,name=metric,proto3" json:"metric,omitempty"` // contains filtered or unexported fields }
func (*Metric) Descriptor
deprecated
func (*Metric) ProtoMessage ¶
func (*Metric) ProtoMessage()
func (*Metric) ProtoReflect ¶
func (x *Metric) ProtoReflect() protoreflect.Message
type MetricList ¶
type MetricList struct { Metrics []*Metric `protobuf:"bytes,1,rep,name=metrics,proto3" json:"metrics,omitempty"` // contains filtered or unexported fields }
func (*MetricList) Descriptor
deprecated
func (*MetricList) Descriptor() ([]byte, []int)
Deprecated: Use MetricList.ProtoReflect.Descriptor instead.
func (*MetricList) GetMetrics ¶
func (x *MetricList) GetMetrics() []*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 RemoteCollectorClient ¶
type RemoteCollectorClient interface { Describe(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*DescriptorList, error) Collect(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*MetricList, error) }
RemoteCollectorClient is the client API for RemoteCollector 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 NewRemoteCollectorClient ¶
func NewRemoteCollectorClient(cc grpc.ClientConnInterface) RemoteCollectorClient
type RemoteCollectorServer ¶
type RemoteCollectorServer interface { Describe(context.Context, *emptypb.Empty) (*DescriptorList, error) Collect(context.Context, *emptypb.Empty) (*MetricList, error) // contains filtered or unexported methods }
RemoteCollectorServer is the server API for RemoteCollector service. All implementations must embed UnimplementedRemoteCollectorServer for forward compatibility
type UnimplementedRemoteCollectorServer ¶
type UnimplementedRemoteCollectorServer struct { }
UnimplementedRemoteCollectorServer must be embedded to have forward compatible implementations.
func (UnimplementedRemoteCollectorServer) Collect ¶
func (UnimplementedRemoteCollectorServer) Collect(context.Context, *emptypb.Empty) (*MetricList, error)
func (UnimplementedRemoteCollectorServer) Describe ¶
func (UnimplementedRemoteCollectorServer) Describe(context.Context, *emptypb.Empty) (*DescriptorList, error)
type UnsafeRemoteCollectorServer ¶
type UnsafeRemoteCollectorServer interface {
// contains filtered or unexported methods
}
UnsafeRemoteCollectorServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RemoteCollectorServer will result in compilation errors.