Documentation ¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterMetricsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterMetricsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MetricsServiceClient) error
- func RegisterMetricsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterMetricsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MetricsServiceServer) error
- func RegisterMetricsServiceServer(s grpc.ServiceRegistrar, srv MetricsServiceServer)
- type ExportMetricsServiceRequest
- func (*ExportMetricsServiceRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ExportMetricsServiceRequest) GetResourceMetrics() []*v1.ResourceMetrics
- func (*ExportMetricsServiceRequest) ProtoMessage()
- func (x *ExportMetricsServiceRequest) ProtoReflect() protoreflect.Message
- func (x *ExportMetricsServiceRequest) Reset()
- func (x *ExportMetricsServiceRequest) String() string
- type ExportMetricsServiceResponse
- func (*ExportMetricsServiceResponse) Descriptor() ([]byte, []int)deprecated
- func (*ExportMetricsServiceResponse) ProtoMessage()
- func (x *ExportMetricsServiceResponse) ProtoReflect() protoreflect.Message
- func (x *ExportMetricsServiceResponse) Reset()
- func (x *ExportMetricsServiceResponse) String() string
- type MetricsServiceClient
- type MetricsServiceServer
- type UnimplementedMetricsServiceServer
- type UnsafeMetricsServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_opentelemetry_proto_collector_metrics_v1_metrics_service_proto protoreflect.FileDescriptor
var MetricsService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "opentelemetry.proto.collector.metrics.v1.MetricsService", HandlerType: (*MetricsServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Export", Handler: _MetricsService_Export_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "opentelemetry/proto/collector/metrics/v1/metrics_service.proto", }
MetricsService_ServiceDesc is the grpc.ServiceDesc for MetricsService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterMetricsServiceHandler ¶
func RegisterMetricsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterMetricsServiceHandler registers the http handlers for service MetricsService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterMetricsServiceHandlerClient ¶
func RegisterMetricsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MetricsServiceClient) error
RegisterMetricsServiceHandlerClient registers the http handlers for service MetricsService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MetricsServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MetricsServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MetricsServiceClient" to call the correct interceptors.
func RegisterMetricsServiceHandlerFromEndpoint ¶
func RegisterMetricsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterMetricsServiceHandlerFromEndpoint is same as RegisterMetricsServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterMetricsServiceHandlerServer ¶
func RegisterMetricsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MetricsServiceServer) error
RegisterMetricsServiceHandlerServer registers the http handlers for service MetricsService to "mux". UnaryRPC :call MetricsServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMetricsServiceHandlerFromEndpoint instead.
func RegisterMetricsServiceServer ¶
func RegisterMetricsServiceServer(s grpc.ServiceRegistrar, srv MetricsServiceServer)
Types ¶
type ExportMetricsServiceRequest ¶
type ExportMetricsServiceRequest struct { // An array of ResourceMetrics. // For data coming from a single resource this array will typically contain one // element. Intermediary nodes (such as OpenTelemetry Collector) that receive // data from multiple origins typically batch the data before forwarding further and // in that case this array will contain multiple elements. ResourceMetrics []*v1.ResourceMetrics `protobuf:"bytes,1,rep,name=resource_metrics,json=resourceMetrics,proto3" json:"resource_metrics,omitempty"` // contains filtered or unexported fields }
func (*ExportMetricsServiceRequest) Descriptor
deprecated
func (*ExportMetricsServiceRequest) Descriptor() ([]byte, []int)
Deprecated: Use ExportMetricsServiceRequest.ProtoReflect.Descriptor instead.
func (*ExportMetricsServiceRequest) GetResourceMetrics ¶
func (x *ExportMetricsServiceRequest) GetResourceMetrics() []*v1.ResourceMetrics
func (*ExportMetricsServiceRequest) ProtoMessage ¶
func (*ExportMetricsServiceRequest) ProtoMessage()
func (*ExportMetricsServiceRequest) ProtoReflect ¶
func (x *ExportMetricsServiceRequest) ProtoReflect() protoreflect.Message
func (*ExportMetricsServiceRequest) Reset ¶
func (x *ExportMetricsServiceRequest) Reset()
func (*ExportMetricsServiceRequest) String ¶
func (x *ExportMetricsServiceRequest) String() string
type ExportMetricsServiceResponse ¶
type ExportMetricsServiceResponse struct {
// contains filtered or unexported fields
}
func (*ExportMetricsServiceResponse) Descriptor
deprecated
func (*ExportMetricsServiceResponse) Descriptor() ([]byte, []int)
Deprecated: Use ExportMetricsServiceResponse.ProtoReflect.Descriptor instead.
func (*ExportMetricsServiceResponse) ProtoMessage ¶
func (*ExportMetricsServiceResponse) ProtoMessage()
func (*ExportMetricsServiceResponse) ProtoReflect ¶
func (x *ExportMetricsServiceResponse) ProtoReflect() protoreflect.Message
func (*ExportMetricsServiceResponse) Reset ¶
func (x *ExportMetricsServiceResponse) Reset()
func (*ExportMetricsServiceResponse) String ¶
func (x *ExportMetricsServiceResponse) String() string
type MetricsServiceClient ¶
type MetricsServiceClient interface { // For performance reasons, it is recommended to keep this RPC // alive for the entire life of the application. Export(ctx context.Context, in *ExportMetricsServiceRequest, opts ...grpc.CallOption) (*ExportMetricsServiceResponse, error) }
MetricsServiceClient is the client API for MetricsService 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 NewMetricsServiceClient ¶
func NewMetricsServiceClient(cc grpc.ClientConnInterface) MetricsServiceClient
type MetricsServiceServer ¶
type MetricsServiceServer interface { // For performance reasons, it is recommended to keep this RPC // alive for the entire life of the application. Export(context.Context, *ExportMetricsServiceRequest) (*ExportMetricsServiceResponse, error) // contains filtered or unexported methods }
MetricsServiceServer is the server API for MetricsService service. All implementations must embed UnimplementedMetricsServiceServer for forward compatibility
type UnimplementedMetricsServiceServer ¶
type UnimplementedMetricsServiceServer struct { }
UnimplementedMetricsServiceServer must be embedded to have forward compatible implementations.
type UnsafeMetricsServiceServer ¶
type UnsafeMetricsServiceServer interface {
// contains filtered or unexported methods
}
UnsafeMetricsServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MetricsServiceServer will result in compilation errors.