| 1 |
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. |
| 2 |
// versions: |
| 3 |
// - protoc-gen-go-grpc v1.3.0 |
| 4 |
// - protoc v5.29.1 |
| 5 |
// source: envoy/service/endpoint/v3/eds.proto |
| 6 |
|
| 7 |
package endpointv3 |
| 8 |
|
| 9 |
import ( |
| 10 |
context "context" |
| 11 |
v3 "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3" |
| 12 |
grpc "google.golang.org/grpc" |
| 13 |
codes "google.golang.org/grpc/codes" |
| 14 |
status "google.golang.org/grpc/status" |
| 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.32.0 or later. |
| 20 |
const _ = grpc.SupportPackageIsVersion7 |
| 21 |
|
| 22 |
const ( |
| 23 |
EndpointDiscoveryService_StreamEndpoints_FullMethodName = "/envoy.service.endpoint.v3.EndpointDiscoveryService/StreamEndpoints" |
| 24 |
EndpointDiscoveryService_DeltaEndpoints_FullMethodName = "/envoy.service.endpoint.v3.EndpointDiscoveryService/DeltaEndpoints" |
| 25 |
EndpointDiscoveryService_FetchEndpoints_FullMethodName = "/envoy.service.endpoint.v3.EndpointDiscoveryService/FetchEndpoints" |
| 26 |
) |
| 27 |
|
| 28 |
// EndpointDiscoveryServiceClient is the client API for EndpointDiscoveryService service. |
| 29 |
// |
| 30 |
// 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. |
| 31 |
type EndpointDiscoveryServiceClient interface { |
| 32 |
// The resource_names field in DiscoveryRequest specifies a list of clusters |
| 33 |
// to subscribe to updates for. |
| 34 |
StreamEndpoints(ctx context.Context, opts ...grpc.CallOption) (EndpointDiscoveryService_StreamEndpointsClient, error) |
| 35 |
DeltaEndpoints(ctx context.Context, opts ...grpc.CallOption) (EndpointDiscoveryService_DeltaEndpointsClient, error) |
| 36 |
FetchEndpoints(ctx context.Context, in *v3.DiscoveryRequest, opts ...grpc.CallOption) (*v3.DiscoveryResponse, error) |
| 37 |
} |
| 38 |
|
| 39 |
type endpointDiscoveryServiceClient struct { |
| 40 |
cc grpc.ClientConnInterface |
| 41 |
} |
| 42 |
|
| 43 |
func NewEndpointDiscoveryServiceClient(cc grpc.ClientConnInterface) EndpointDiscoveryServiceClient { |
| 44 |
return &endpointDiscoveryServiceClient{cc} |
| 45 |
} |
| 46 |
|
| 47 |
func (c *endpointDiscoveryServiceClient) StreamEndpoints(ctx context.Context, opts ...grpc.CallOption) (EndpointDiscoveryService_StreamEndpointsClient, error) { |
| 48 |
stream, err := c.cc.NewStream(ctx, &EndpointDiscoveryService_ServiceDesc.Streams[0], EndpointDiscoveryService_StreamEndpoints_FullMethodName, opts...) |
| 49 |
if err != nil { |
| 50 |
return nil, err |
| 51 |
} |
| 52 |
x := &endpointDiscoveryServiceStreamEndpointsClient{stream} |
| 53 |
return x, nil |
| 54 |
} |
| 55 |
|
| 56 |
type EndpointDiscoveryService_StreamEndpointsClient interface { |
| 57 |
Send(*v3.DiscoveryRequest) error |
| 58 |
Recv() (*v3.DiscoveryResponse, error) |
| 59 |
grpc.ClientStream |
| 60 |
} |
| 61 |
|
| 62 |
type endpointDiscoveryServiceStreamEndpointsClient struct { |
| 63 |
grpc.ClientStream |
| 64 |
} |
| 65 |
|
| 66 |
func (x *endpointDiscoveryServiceStreamEndpointsClient) Send(m *v3.DiscoveryRequest) error { |
| 67 |
return x.ClientStream.SendMsg(m) |
| 68 |
} |
| 69 |
|
| 70 |
func (x *endpointDiscoveryServiceStreamEndpointsClient) Recv() (*v3.DiscoveryResponse, error) { |
| 71 |
m := new(v3.DiscoveryResponse) |
| 72 |
if err := x.ClientStream.RecvMsg(m); err != nil { |
| 73 |
return nil, err |
| 74 |
} |
| 75 |
return m, nil |
| 76 |
} |
| 77 |
|
| 78 |
func (c *endpointDiscoveryServiceClient) DeltaEndpoints(ctx context.Context, opts ...grpc.CallOption) (EndpointDiscoveryService_DeltaEndpointsClient, error) { |
| 79 |
stream, err := c.cc.NewStream(ctx, &EndpointDiscoveryService_ServiceDesc.Streams[1], EndpointDiscoveryService_DeltaEndpoints_FullMethodName, opts...) |
| 80 |
if err != nil { |
| 81 |
return nil, err |
| 82 |
} |
| 83 |
x := &endpointDiscoveryServiceDeltaEndpointsClient{stream} |
| 84 |
return x, nil |
| 85 |
} |
| 86 |
|
| 87 |
type EndpointDiscoveryService_DeltaEndpointsClient interface { |
| 88 |
Send(*v3.DeltaDiscoveryRequest) error |
| 89 |
Recv() (*v3.DeltaDiscoveryResponse, error) |
| 90 |
grpc.ClientStream |
| 91 |
} |
| 92 |
|
| 93 |
type endpointDiscoveryServiceDeltaEndpointsClient struct { |
| 94 |
grpc.ClientStream |
| 95 |
} |
| 96 |
|
| 97 |
func (x *endpointDiscoveryServiceDeltaEndpointsClient) Send(m *v3.DeltaDiscoveryRequest) error { |
| 98 |
return x.ClientStream.SendMsg(m) |
| 99 |
} |
| 100 |
|
| 101 |
func (x *endpointDiscoveryServiceDeltaEndpointsClient) Recv() (*v3.DeltaDiscoveryResponse, error) { |
| 102 |
m := new(v3.DeltaDiscoveryResponse) |
| 103 |
if err := x.ClientStream.RecvMsg(m); err != nil { |
| 104 |
return nil, err |
| 105 |
} |
| 106 |
return m, nil |
| 107 |
} |
| 108 |
|
| 109 |
func (c *endpointDiscoveryServiceClient) FetchEndpoints(ctx context.Context, in *v3.DiscoveryRequest, opts ...grpc.CallOption) (*v3.DiscoveryResponse, error) { |
| 110 |
out := new(v3.DiscoveryResponse) |
| 111 |
err := c.cc.Invoke(ctx, EndpointDiscoveryService_FetchEndpoints_FullMethodName, in, out, opts...) |
| 112 |
if err != nil { |
| 113 |
return nil, err |
| 114 |
} |
| 115 |
return out, nil |
| 116 |
} |
| 117 |
|
| 118 |
// EndpointDiscoveryServiceServer is the server API for EndpointDiscoveryService service. |
| 119 |
// All implementations should embed UnimplementedEndpointDiscoveryServiceServer |
| 120 |
// for forward compatibility |
| 121 |
type EndpointDiscoveryServiceServer interface { |
| 122 |
// The resource_names field in DiscoveryRequest specifies a list of clusters |
| 123 |
// to subscribe to updates for. |
| 124 |
StreamEndpoints(EndpointDiscoveryService_StreamEndpointsServer) error |
| 125 |
DeltaEndpoints(EndpointDiscoveryService_DeltaEndpointsServer) error |
| 126 |
FetchEndpoints(context.Context, *v3.DiscoveryRequest) (*v3.DiscoveryResponse, error) |
| 127 |
} |
| 128 |
|
| 129 |
// UnimplementedEndpointDiscoveryServiceServer should be embedded to have forward compatible implementations. |
| 130 |
type UnimplementedEndpointDiscoveryServiceServer struct { |
| 131 |
} |
| 132 |
|
| 133 |
func (UnimplementedEndpointDiscoveryServiceServer) StreamEndpoints(EndpointDiscoveryService_StreamEndpointsServer) error { |
| 134 |
return status.Errorf(codes.Unimplemented, "method StreamEndpoints not implemented") |
| 135 |
} |
| 136 |
func (UnimplementedEndpointDiscoveryServiceServer) DeltaEndpoints(EndpointDiscoveryService_DeltaEndpointsServer) error { |
| 137 |
return status.Errorf(codes.Unimplemented, "method DeltaEndpoints not implemented") |
| 138 |
} |
| 139 |
func (UnimplementedEndpointDiscoveryServiceServer) FetchEndpoints(context.Context, *v3.DiscoveryRequest) (*v3.DiscoveryResponse, error) { |
| 140 |
return nil, status.Errorf(codes.Unimplemented, "method FetchEndpoints not implemented") |
| 141 |
} |
| 142 |
|
| 143 |
// UnsafeEndpointDiscoveryServiceServer may be embedded to opt out of forward compatibility for this service. |
| 144 |
// Use of this interface is not recommended, as added methods to EndpointDiscoveryServiceServer will |
| 145 |
// result in compilation errors. |
| 146 |
type UnsafeEndpointDiscoveryServiceServer interface { |
| 147 |
mustEmbedUnimplementedEndpointDiscoveryServiceServer() |
| 148 |
} |
| 149 |
|
| 150 |
func RegisterEndpointDiscoveryServiceServer(s grpc.ServiceRegistrar, srv EndpointDiscoveryServiceServer) { |
| 151 |
s.RegisterService(&EndpointDiscoveryService_ServiceDesc, srv) |
| 152 |
} |
| 153 |
|
| 154 |
func _EndpointDiscoveryService_StreamEndpoints_Handler(srv interface{}, stream grpc.ServerStream) error { |
| 155 |
return srv.(EndpointDiscoveryServiceServer).StreamEndpoints(&endpointDiscoveryServiceStreamEndpointsServer{stream}) |
| 156 |
} |
| 157 |
|
| 158 |
type EndpointDiscoveryService_StreamEndpointsServer interface { |
| 159 |
Send(*v3.DiscoveryResponse) error |
| 160 |
Recv() (*v3.DiscoveryRequest, error) |
| 161 |
grpc.ServerStream |
| 162 |
} |
| 163 |
|
| 164 |
type endpointDiscoveryServiceStreamEndpointsServer struct { |
| 165 |
grpc.ServerStream |
| 166 |
} |
| 167 |
|
| 168 |
func (x *endpointDiscoveryServiceStreamEndpointsServer) Send(m *v3.DiscoveryResponse) error { |
| 169 |
return x.ServerStream.SendMsg(m) |
| 170 |
} |
| 171 |
|
| 172 |
func (x *endpointDiscoveryServiceStreamEndpointsServer) Recv() (*v3.DiscoveryRequest, error) { |
| 173 |
m := new(v3.DiscoveryRequest) |
| 174 |
if err := x.ServerStream.RecvMsg(m); err != nil { |
| 175 |
return nil, err |
| 176 |
} |
| 177 |
return m, nil |
| 178 |
} |
| 179 |
|
| 180 |
func _EndpointDiscoveryService_DeltaEndpoints_Handler(srv interface{}, stream grpc.ServerStream) error { |
| 181 |
return srv.(EndpointDiscoveryServiceServer).DeltaEndpoints(&endpointDiscoveryServiceDeltaEndpointsServer{stream}) |
| 182 |
} |
| 183 |
|
| 184 |
type EndpointDiscoveryService_DeltaEndpointsServer interface { |
| 185 |
Send(*v3.DeltaDiscoveryResponse) error |
| 186 |
Recv() (*v3.DeltaDiscoveryRequest, error) |
| 187 |
grpc.ServerStream |
| 188 |
} |
| 189 |
|
| 190 |
type endpointDiscoveryServiceDeltaEndpointsServer struct { |
| 191 |
grpc.ServerStream |
| 192 |
} |
| 193 |
|
| 194 |
func (x *endpointDiscoveryServiceDeltaEndpointsServer) Send(m *v3.DeltaDiscoveryResponse) error { |
| 195 |
return x.ServerStream.SendMsg(m) |
| 196 |
} |
| 197 |
|
| 198 |
func (x *endpointDiscoveryServiceDeltaEndpointsServer) Recv() (*v3.DeltaDiscoveryRequest, error) { |
| 199 |
m := new(v3.DeltaDiscoveryRequest) |
| 200 |
if err := x.ServerStream.RecvMsg(m); err != nil { |
| 201 |
return nil, err |
| 202 |
} |
| 203 |
return m, nil |
| 204 |
} |
| 205 |
|
| 206 |
func _EndpointDiscoveryService_FetchEndpoints_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 207 |
in := new(v3.DiscoveryRequest) |
| 208 |
if err := dec(in); err != nil { |
| 209 |
return nil, err |
| 210 |
} |
| 211 |
if interceptor == nil { |
| 212 |
return srv.(EndpointDiscoveryServiceServer).FetchEndpoints(ctx, in) |
| 213 |
} |
| 214 |
info := &grpc.UnaryServerInfo{ |
| 215 |
Server: srv, |
| 216 |
FullMethod: EndpointDiscoveryService_FetchEndpoints_FullMethodName, |
| 217 |
} |
| 218 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 219 |
return srv.(EndpointDiscoveryServiceServer).FetchEndpoints(ctx, req.(*v3.DiscoveryRequest)) |
| 220 |
} |
| 221 |
return interceptor(ctx, in, info, handler) |
| 222 |
} |
| 223 |
|
| 224 |
// EndpointDiscoveryService_ServiceDesc is the grpc.ServiceDesc for EndpointDiscoveryService service. |
| 225 |
// It's only intended for direct use with grpc.RegisterService, |
| 226 |
// and not to be introspected or modified (even as a copy) |
| 227 |
var EndpointDiscoveryService_ServiceDesc = grpc.ServiceDesc{ |
| 228 |
ServiceName: "envoy.service.endpoint.v3.EndpointDiscoveryService", |
| 229 |
HandlerType: (*EndpointDiscoveryServiceServer)(nil), |
| 230 |
Methods: []grpc.MethodDesc{ |
| 231 |
{ |
| 232 |
MethodName: "FetchEndpoints", |
| 233 |
Handler: _EndpointDiscoveryService_FetchEndpoints_Handler, |
| 234 |
}, |
| 235 |
}, |
| 236 |
Streams: []grpc.StreamDesc{ |
| 237 |
{ |
| 238 |
StreamName: "StreamEndpoints", |
| 239 |
Handler: _EndpointDiscoveryService_StreamEndpoints_Handler, |
| 240 |
ServerStreams: true, |
| 241 |
ClientStreams: true, |
| 242 |
}, |
| 243 |
{ |
| 244 |
StreamName: "DeltaEndpoints", |
| 245 |
Handler: _EndpointDiscoveryService_DeltaEndpoints_Handler, |
| 246 |
ServerStreams: true, |
| 247 |
ClientStreams: true, |
| 248 |
}, |
| 249 |
}, |
| 250 |
Metadata: "envoy/service/endpoint/v3/eds.proto", |
| 251 |
} |