// Code generated by protoc-gen-go-grpc. DO NOT EDIT. package service 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. const _ = grpc.SupportPackageIsVersion6 // LoggerClient is the client API for Logger 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 LoggerClient interface { Log(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Empty, error) } type loggerClient struct { cc grpc.ClientConnInterface } func NewLoggerClient(cc grpc.ClientConnInterface) LoggerClient { return &loggerClient{cc} } func (c *loggerClient) Log(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Empty, error) { out := new(Empty) err := c.cc.Invoke(ctx, "/service.Logger/Log", in, out, opts...) if err != nil { return nil, err } return out, nil } // LoggerServer is the server API for Logger service. // All implementations must embed UnimplementedLoggerServer // for forward compatibility type LoggerServer interface { Log(context.Context, *Message) (*Empty, error) mustEmbedUnimplementedLoggerServer() } // UnimplementedLoggerServer must be embedded to have forward compatible implementations. type UnimplementedLoggerServer struct { } func (*UnimplementedLoggerServer) Log(context.Context, *Message) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Log not implemented") } func (*UnimplementedLoggerServer) mustEmbedUnimplementedLoggerServer() {} func RegisterLoggerServer(s *grpc.Server, srv LoggerServer) { s.RegisterService(&_Logger_serviceDesc, srv) } func _Logger_Log_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Message) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(LoggerServer).Log(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/service.Logger/Log", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(LoggerServer).Log(ctx, req.(*Message)) } return interceptor(ctx, in, info, handler) } var _Logger_serviceDesc = grpc.ServiceDesc{ ServiceName: "service.Logger", HandlerType: (*LoggerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Log", Handler: _Logger_Log_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "service.proto", }