unos/watchdog-go/watchdog/push_metrics_grpc.pb.go

107 lines
3.8 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v4.25.3
// source: watchdog/push_metrics.proto
package watchdog
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// 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
// PushMetricsServiceClient is the client API for PushMetricsService 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 PushMetricsServiceClient interface {
Push(ctx context.Context, in *Metric, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
type pushMetricsServiceClient struct {
cc grpc.ClientConnInterface
}
func NewPushMetricsServiceClient(cc grpc.ClientConnInterface) PushMetricsServiceClient {
return &pushMetricsServiceClient{cc}
}
func (c *pushMetricsServiceClient) Push(ctx context.Context, in *Metric, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/watchdog.PushMetricsService/Push", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// PushMetricsServiceServer is the server API for PushMetricsService service.
// All implementations must embed UnimplementedPushMetricsServiceServer
// for forward compatibility
type PushMetricsServiceServer interface {
Push(context.Context, *Metric) (*emptypb.Empty, error)
mustEmbedUnimplementedPushMetricsServiceServer()
}
// UnimplementedPushMetricsServiceServer must be embedded to have forward compatible implementations.
type UnimplementedPushMetricsServiceServer struct {
}
func (UnimplementedPushMetricsServiceServer) Push(context.Context, *Metric) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Push not implemented")
}
func (UnimplementedPushMetricsServiceServer) mustEmbedUnimplementedPushMetricsServiceServer() {}
// UnsafePushMetricsServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PushMetricsServiceServer will
// result in compilation errors.
type UnsafePushMetricsServiceServer interface {
mustEmbedUnimplementedPushMetricsServiceServer()
}
func RegisterPushMetricsServiceServer(s grpc.ServiceRegistrar, srv PushMetricsServiceServer) {
s.RegisterService(&PushMetricsService_ServiceDesc, srv)
}
func _PushMetricsService_Push_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Metric)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PushMetricsServiceServer).Push(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/watchdog.PushMetricsService/Push",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PushMetricsServiceServer).Push(ctx, req.(*Metric))
}
return interceptor(ctx, in, info, handler)
}
// PushMetricsService_ServiceDesc is the grpc.ServiceDesc for PushMetricsService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PushMetricsService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "watchdog.PushMetricsService",
HandlerType: (*PushMetricsServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Push",
Handler: _PushMetricsService_Push_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "watchdog/push_metrics.proto",
}