collector

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Deprecated: Use Metric.ProtoReflect.Descriptor instead.

func (*Metric) GetDesc

func (x *Metric) GetDesc() *desc.Desc

func (*Metric) GetMetric

func (x *Metric) GetMetric() *_go.Metric

func (*Metric) ProtoMessage

func (*Metric) ProtoMessage()

func (*Metric) ProtoReflect

func (x *Metric) ProtoReflect() protoreflect.Message

func (*Metric) Reset

func (x *Metric) Reset()

func (*Metric) String

func (x *Metric) String() string

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.

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) Describe

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.

Jump to

Keyboard shortcuts

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