// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.1.0 // - protoc v3.21.6 // source: opentelemetry/proto/collector/metrics/v1/metrics_service.proto package v1 import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 // 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. 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) } type metricsServiceClient struct { cc grpc.ClientConnInterface } func NewMetricsServiceClient(cc grpc.ClientConnInterface) MetricsServiceClient { return &metricsServiceClient{cc} } func (c *metricsServiceClient) Export(ctx context.Context, in *ExportMetricsServiceRequest, opts ...grpc.CallOption) (*ExportMetricsServiceResponse, error) { out := new(ExportMetricsServiceResponse) err := c.cc.Invoke(ctx, "/opentelemetry.proto.collector.metrics.v1.MetricsService/Export", in, out, opts...) if err != nil { return nil, err } return out, nil } // MetricsServiceServer is the server API for MetricsService service. // All implementations must embed UnimplementedMetricsServiceServer // for forward compatibility 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) mustEmbedUnimplementedMetricsServiceServer() } // UnimplementedMetricsServiceServer must be embedded to have forward compatible implementations. type UnimplementedMetricsServiceServer struct { } func (UnimplementedMetricsServiceServer) Export(context.Context, *ExportMetricsServiceRequest) (*ExportMetricsServiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Export not implemented") } func (UnimplementedMetricsServiceServer) mustEmbedUnimplementedMetricsServiceServer() {} // 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. type UnsafeMetricsServiceServer interface { mustEmbedUnimplementedMetricsServiceServer() } func RegisterMetricsServiceServer(s grpc.ServiceRegistrar, srv MetricsServiceServer) { s.RegisterService(&MetricsService_ServiceDesc, srv) } func _MetricsService_Export_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ExportMetricsServiceRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MetricsServiceServer).Export(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/opentelemetry.proto.collector.metrics.v1.MetricsService/Export", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MetricsServiceServer).Export(ctx, req.(*ExportMetricsServiceRequest)) } return interceptor(ctx, in, info, handler) } // 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) 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", }