github.com/InjectiveLabs/sdk-go@v1.53.0/exchange/health_rpc/pb/goadesign_goagen_health_grpc.pb.go (about)

     1  // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
     2  // versions:
     3  // - protoc-gen-go-grpc v1.2.0
     4  // - protoc             v3.19.4
     5  // source: goadesign_goagen_health.proto
     6  
     7  package api_v1pb
     8  
     9  import (
    10  	context "context"
    11  	grpc "google.golang.org/grpc"
    12  	codes "google.golang.org/grpc/codes"
    13  	status "google.golang.org/grpc/status"
    14  )
    15  
    16  // This is a compile-time assertion to ensure that this generated file
    17  // is compatible with the grpc package it is being compiled against.
    18  // Requires gRPC-Go v1.32.0 or later.
    19  const _ = grpc.SupportPackageIsVersion7
    20  
    21  // HealthClient is the client API for Health service.
    22  //
    23  // 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.
    24  type HealthClient interface {
    25  	// Get current backend health status
    26  	GetStatus(ctx context.Context, in *GetStatusRequest, opts ...grpc.CallOption) (*GetStatusResponse, error)
    27  }
    28  
    29  type healthClient struct {
    30  	cc grpc.ClientConnInterface
    31  }
    32  
    33  func NewHealthClient(cc grpc.ClientConnInterface) HealthClient {
    34  	return &healthClient{cc}
    35  }
    36  
    37  func (c *healthClient) GetStatus(ctx context.Context, in *GetStatusRequest, opts ...grpc.CallOption) (*GetStatusResponse, error) {
    38  	out := new(GetStatusResponse)
    39  	err := c.cc.Invoke(ctx, "/api.v1.Health/GetStatus", in, out, opts...)
    40  	if err != nil {
    41  		return nil, err
    42  	}
    43  	return out, nil
    44  }
    45  
    46  // HealthServer is the server API for Health service.
    47  // All implementations must embed UnimplementedHealthServer
    48  // for forward compatibility
    49  type HealthServer interface {
    50  	// Get current backend health status
    51  	GetStatus(context.Context, *GetStatusRequest) (*GetStatusResponse, error)
    52  	mustEmbedUnimplementedHealthServer()
    53  }
    54  
    55  // UnimplementedHealthServer must be embedded to have forward compatible implementations.
    56  type UnimplementedHealthServer struct {
    57  }
    58  
    59  func (UnimplementedHealthServer) GetStatus(context.Context, *GetStatusRequest) (*GetStatusResponse, error) {
    60  	return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented")
    61  }
    62  func (UnimplementedHealthServer) mustEmbedUnimplementedHealthServer() {}
    63  
    64  // UnsafeHealthServer may be embedded to opt out of forward compatibility for this service.
    65  // Use of this interface is not recommended, as added methods to HealthServer will
    66  // result in compilation errors.
    67  type UnsafeHealthServer interface {
    68  	mustEmbedUnimplementedHealthServer()
    69  }
    70  
    71  func RegisterHealthServer(s grpc.ServiceRegistrar, srv HealthServer) {
    72  	s.RegisterService(&Health_ServiceDesc, srv)
    73  }
    74  
    75  func _Health_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    76  	in := new(GetStatusRequest)
    77  	if err := dec(in); err != nil {
    78  		return nil, err
    79  	}
    80  	if interceptor == nil {
    81  		return srv.(HealthServer).GetStatus(ctx, in)
    82  	}
    83  	info := &grpc.UnaryServerInfo{
    84  		Server:     srv,
    85  		FullMethod: "/api.v1.Health/GetStatus",
    86  	}
    87  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
    88  		return srv.(HealthServer).GetStatus(ctx, req.(*GetStatusRequest))
    89  	}
    90  	return interceptor(ctx, in, info, handler)
    91  }
    92  
    93  // Health_ServiceDesc is the grpc.ServiceDesc for Health service.
    94  // It's only intended for direct use with grpc.RegisterService,
    95  // and not to be introspected or modified (even as a copy)
    96  var Health_ServiceDesc = grpc.ServiceDesc{
    97  	ServiceName: "api.v1.Health",
    98  	HandlerType: (*HealthServer)(nil),
    99  	Methods: []grpc.MethodDesc{
   100  		{
   101  			MethodName: "GetStatus",
   102  			Handler:    _Health_GetStatus_Handler,
   103  		},
   104  	},
   105  	Streams:  []grpc.StreamDesc{},
   106  	Metadata: "goadesign_goagen_health.proto",
   107  }