blob: d4b6f899ad5f499bffb1429c55bc570ce9640603 [file] [log] [blame]
Abhay Kumar03713392025-12-30 05:20:58 +00001// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
2// versions:
3// - protoc-gen-go-grpc v1.6.0
4// - protoc v4.25.8
5// source: voltha_protos/health.proto
6
7package health
8
9import (
10 context "context"
11 grpc "google.golang.org/grpc"
12 codes "google.golang.org/grpc/codes"
13 status "google.golang.org/grpc/status"
14 emptypb "google.golang.org/protobuf/types/known/emptypb"
15)
16
17// This is a compile-time assertion to ensure that this generated file
18// is compatible with the grpc package it is being compiled against.
19// Requires gRPC-Go v1.64.0 or later.
20const _ = grpc.SupportPackageIsVersion9
21
22const (
23 HealthService_GetHealthStatus_FullMethodName = "/health.HealthService/GetHealthStatus"
24)
25
26// HealthServiceClient is the client API for HealthService service.
27//
28// 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.
29//
30// Health related services
31type HealthServiceClient interface {
32 // Return current health status of a Voltha instance
33 GetHealthStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*HealthStatus, error)
34}
35
36type healthServiceClient struct {
37 cc grpc.ClientConnInterface
38}
39
40func NewHealthServiceClient(cc grpc.ClientConnInterface) HealthServiceClient {
41 return &healthServiceClient{cc}
42}
43
44func (c *healthServiceClient) GetHealthStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*HealthStatus, error) {
45 cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
46 out := new(HealthStatus)
47 err := c.cc.Invoke(ctx, HealthService_GetHealthStatus_FullMethodName, in, out, cOpts...)
48 if err != nil {
49 return nil, err
50 }
51 return out, nil
52}
53
54// HealthServiceServer is the server API for HealthService service.
55// All implementations must embed UnimplementedHealthServiceServer
56// for forward compatibility.
57//
58// Health related services
59type HealthServiceServer interface {
60 // Return current health status of a Voltha instance
61 GetHealthStatus(context.Context, *emptypb.Empty) (*HealthStatus, error)
62 mustEmbedUnimplementedHealthServiceServer()
63}
64
65// UnimplementedHealthServiceServer must be embedded to have
66// forward compatible implementations.
67//
68// NOTE: this should be embedded by value instead of pointer to avoid a nil
69// pointer dereference when methods are called.
70type UnimplementedHealthServiceServer struct{}
71
72func (UnimplementedHealthServiceServer) GetHealthStatus(context.Context, *emptypb.Empty) (*HealthStatus, error) {
73 return nil, status.Error(codes.Unimplemented, "method GetHealthStatus not implemented")
74}
75func (UnimplementedHealthServiceServer) mustEmbedUnimplementedHealthServiceServer() {}
76func (UnimplementedHealthServiceServer) testEmbeddedByValue() {}
77
78// UnsafeHealthServiceServer may be embedded to opt out of forward compatibility for this service.
79// Use of this interface is not recommended, as added methods to HealthServiceServer will
80// result in compilation errors.
81type UnsafeHealthServiceServer interface {
82 mustEmbedUnimplementedHealthServiceServer()
83}
84
85func RegisterHealthServiceServer(s grpc.ServiceRegistrar, srv HealthServiceServer) {
86 // If the following call panics, it indicates UnimplementedHealthServiceServer was
87 // embedded by pointer and is nil. This will cause panics if an
88 // unimplemented method is ever invoked, so we test this at initialization
89 // time to prevent it from happening at runtime later due to I/O.
90 if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
91 t.testEmbeddedByValue()
92 }
93 s.RegisterService(&HealthService_ServiceDesc, srv)
94}
95
96func _HealthService_GetHealthStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
97 in := new(emptypb.Empty)
98 if err := dec(in); err != nil {
99 return nil, err
100 }
101 if interceptor == nil {
102 return srv.(HealthServiceServer).GetHealthStatus(ctx, in)
103 }
104 info := &grpc.UnaryServerInfo{
105 Server: srv,
106 FullMethod: HealthService_GetHealthStatus_FullMethodName,
107 }
108 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
109 return srv.(HealthServiceServer).GetHealthStatus(ctx, req.(*emptypb.Empty))
110 }
111 return interceptor(ctx, in, info, handler)
112}
113
114// HealthService_ServiceDesc is the grpc.ServiceDesc for HealthService service.
115// It's only intended for direct use with grpc.RegisterService,
116// and not to be introspected or modified (even as a copy)
117var HealthService_ServiceDesc = grpc.ServiceDesc{
118 ServiceName: "health.HealthService",
119 HandlerType: (*HealthServiceServer)(nil),
120 Methods: []grpc.MethodDesc{
121 {
122 MethodName: "GetHealthStatus",
123 Handler: _HealthService_GetHealthStatus_Handler,
124 },
125 },
126 Streams: []grpc.StreamDesc{},
127 Metadata: "voltha_protos/health.proto",
128}