-
Notifications
You must be signed in to change notification settings - Fork 71
/
discoverer_vtproto.pb.go
165 lines (147 loc) · 6.07 KB
/
discoverer_vtproto.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
//
// Copyright (C) 2019-2022 vdaas.org vald team <vald@vdaas.org>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
package discoverer
import (
context "context"
payload "github.com/vdaas/vald/apis/grpc/v1/payload"
codes "github.com/vdaas/vald/internal/net/grpc/codes"
status "github.com/vdaas/vald/internal/net/grpc/status"
grpc "google.golang.org/grpc"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// 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
// DiscovererClient is the client API for Discoverer 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 DiscovererClient interface {
// Represent the RPC to get the agent pods information.
Pods(ctx context.Context, in *payload.Discoverer_Request, opts ...grpc.CallOption) (*payload.Info_Pods, error)
// Represent the RPC to get the node information.
Nodes(ctx context.Context, in *payload.Discoverer_Request, opts ...grpc.CallOption) (*payload.Info_Nodes, error)
}
type discovererClient struct {
cc grpc.ClientConnInterface
}
func NewDiscovererClient(cc grpc.ClientConnInterface) DiscovererClient {
return &discovererClient{cc}
}
func (c *discovererClient) Pods(ctx context.Context, in *payload.Discoverer_Request, opts ...grpc.CallOption) (*payload.Info_Pods, error) {
out := new(payload.Info_Pods)
err := c.cc.Invoke(ctx, "/discoverer.v1.Discoverer/Pods", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *discovererClient) Nodes(ctx context.Context, in *payload.Discoverer_Request, opts ...grpc.CallOption) (*payload.Info_Nodes, error) {
out := new(payload.Info_Nodes)
err := c.cc.Invoke(ctx, "/discoverer.v1.Discoverer/Nodes", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// DiscovererServer is the server API for Discoverer service.
// All implementations must embed UnimplementedDiscovererServer
// for forward compatibility
type DiscovererServer interface {
// Represent the RPC to get the agent pods information.
Pods(context.Context, *payload.Discoverer_Request) (*payload.Info_Pods, error)
// Represent the RPC to get the node information.
Nodes(context.Context, *payload.Discoverer_Request) (*payload.Info_Nodes, error)
mustEmbedUnimplementedDiscovererServer()
}
// UnimplementedDiscovererServer must be embedded to have forward compatible implementations.
type UnimplementedDiscovererServer struct {
}
func (UnimplementedDiscovererServer) Pods(context.Context, *payload.Discoverer_Request) (*payload.Info_Pods, error) {
return nil, status.Errorf(codes.Unimplemented, "method Pods not implemented")
}
func (UnimplementedDiscovererServer) Nodes(context.Context, *payload.Discoverer_Request) (*payload.Info_Nodes, error) {
return nil, status.Errorf(codes.Unimplemented, "method Nodes not implemented")
}
func (UnimplementedDiscovererServer) mustEmbedUnimplementedDiscovererServer() {}
// UnsafeDiscovererServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to DiscovererServer will
// result in compilation errors.
type UnsafeDiscovererServer interface {
mustEmbedUnimplementedDiscovererServer()
}
func RegisterDiscovererServer(s grpc.ServiceRegistrar, srv DiscovererServer) {
s.RegisterService(&Discoverer_ServiceDesc, srv)
}
func _Discoverer_Pods_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(payload.Discoverer_Request)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DiscovererServer).Pods(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/discoverer.v1.Discoverer/Pods",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DiscovererServer).Pods(ctx, req.(*payload.Discoverer_Request))
}
return interceptor(ctx, in, info, handler)
}
func _Discoverer_Nodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(payload.Discoverer_Request)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DiscovererServer).Nodes(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/discoverer.v1.Discoverer/Nodes",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DiscovererServer).Nodes(ctx, req.(*payload.Discoverer_Request))
}
return interceptor(ctx, in, info, handler)
}
// Discoverer_ServiceDesc is the grpc.ServiceDesc for Discoverer service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Discoverer_ServiceDesc = grpc.ServiceDesc{
ServiceName: "discoverer.v1.Discoverer",
HandlerType: (*DiscovererServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Pods",
Handler: _Discoverer_Pods_Handler,
},
{
MethodName: "Nodes",
Handler: _Discoverer_Nodes_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "apis/proto/v1/discoverer/discoverer.proto",
}