// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 // - protoc v5.29.1 // source: envoy/service/endpoint/v3/eds.proto package endpointv3 import ( context "context" v3 "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3" 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. // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 const ( EndpointDiscoveryService_StreamEndpoints_FullMethodName = "/envoy.service.endpoint.v3.EndpointDiscoveryService/StreamEndpoints" EndpointDiscoveryService_DeltaEndpoints_FullMethodName = "/envoy.service.endpoint.v3.EndpointDiscoveryService/DeltaEndpoints" EndpointDiscoveryService_FetchEndpoints_FullMethodName = "/envoy.service.endpoint.v3.EndpointDiscoveryService/FetchEndpoints" ) // EndpointDiscoveryServiceClient is the client API for EndpointDiscoveryService 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 EndpointDiscoveryServiceClient interface { // The resource_names field in DiscoveryRequest specifies a list of clusters // to subscribe to updates for. StreamEndpoints(ctx context.Context, opts ...grpc.CallOption) (EndpointDiscoveryService_StreamEndpointsClient, error) DeltaEndpoints(ctx context.Context, opts ...grpc.CallOption) (EndpointDiscoveryService_DeltaEndpointsClient, error) FetchEndpoints(ctx context.Context, in *v3.DiscoveryRequest, opts ...grpc.CallOption) (*v3.DiscoveryResponse, error) } type endpointDiscoveryServiceClient struct { cc grpc.ClientConnInterface } func NewEndpointDiscoveryServiceClient(cc grpc.ClientConnInterface) EndpointDiscoveryServiceClient { return &endpointDiscoveryServiceClient{cc} } func (c *endpointDiscoveryServiceClient) StreamEndpoints(ctx context.Context, opts ...grpc.CallOption) (EndpointDiscoveryService_StreamEndpointsClient, error) { stream, err := c.cc.NewStream(ctx, &EndpointDiscoveryService_ServiceDesc.Streams[0], EndpointDiscoveryService_StreamEndpoints_FullMethodName, opts...) if err != nil { return nil, err } x := &endpointDiscoveryServiceStreamEndpointsClient{stream} return x, nil } type EndpointDiscoveryService_StreamEndpointsClient interface { Send(*v3.DiscoveryRequest) error Recv() (*v3.DiscoveryResponse, error) grpc.ClientStream } type endpointDiscoveryServiceStreamEndpointsClient struct { grpc.ClientStream } func (x *endpointDiscoveryServiceStreamEndpointsClient) Send(m *v3.DiscoveryRequest) error { return x.ClientStream.SendMsg(m) } func (x *endpointDiscoveryServiceStreamEndpointsClient) Recv() (*v3.DiscoveryResponse, error) { m := new(v3.DiscoveryResponse) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func (c *endpointDiscoveryServiceClient) DeltaEndpoints(ctx context.Context, opts ...grpc.CallOption) (EndpointDiscoveryService_DeltaEndpointsClient, error) { stream, err := c.cc.NewStream(ctx, &EndpointDiscoveryService_ServiceDesc.Streams[1], EndpointDiscoveryService_DeltaEndpoints_FullMethodName, opts...) if err != nil { return nil, err } x := &endpointDiscoveryServiceDeltaEndpointsClient{stream} return x, nil } type EndpointDiscoveryService_DeltaEndpointsClient interface { Send(*v3.DeltaDiscoveryRequest) error Recv() (*v3.DeltaDiscoveryResponse, error) grpc.ClientStream } type endpointDiscoveryServiceDeltaEndpointsClient struct { grpc.ClientStream } func (x *endpointDiscoveryServiceDeltaEndpointsClient) Send(m *v3.DeltaDiscoveryRequest) error { return x.ClientStream.SendMsg(m) } func (x *endpointDiscoveryServiceDeltaEndpointsClient) Recv() (*v3.DeltaDiscoveryResponse, error) { m := new(v3.DeltaDiscoveryResponse) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func (c *endpointDiscoveryServiceClient) FetchEndpoints(ctx context.Context, in *v3.DiscoveryRequest, opts ...grpc.CallOption) (*v3.DiscoveryResponse, error) { out := new(v3.DiscoveryResponse) err := c.cc.Invoke(ctx, EndpointDiscoveryService_FetchEndpoints_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // EndpointDiscoveryServiceServer is the server API for EndpointDiscoveryService service. // All implementations should embed UnimplementedEndpointDiscoveryServiceServer // for forward compatibility type EndpointDiscoveryServiceServer interface { // The resource_names field in DiscoveryRequest specifies a list of clusters // to subscribe to updates for. StreamEndpoints(EndpointDiscoveryService_StreamEndpointsServer) error DeltaEndpoints(EndpointDiscoveryService_DeltaEndpointsServer) error FetchEndpoints(context.Context, *v3.DiscoveryRequest) (*v3.DiscoveryResponse, error) } // UnimplementedEndpointDiscoveryServiceServer should be embedded to have forward compatible implementations. type UnimplementedEndpointDiscoveryServiceServer struct { } func (UnimplementedEndpointDiscoveryServiceServer) StreamEndpoints(EndpointDiscoveryService_StreamEndpointsServer) error { return status.Errorf(codes.Unimplemented, "method StreamEndpoints not implemented") } func (UnimplementedEndpointDiscoveryServiceServer) DeltaEndpoints(EndpointDiscoveryService_DeltaEndpointsServer) error { return status.Errorf(codes.Unimplemented, "method DeltaEndpoints not implemented") } func (UnimplementedEndpointDiscoveryServiceServer) FetchEndpoints(context.Context, *v3.DiscoveryRequest) (*v3.DiscoveryResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method FetchEndpoints not implemented") } // UnsafeEndpointDiscoveryServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to EndpointDiscoveryServiceServer will // result in compilation errors. type UnsafeEndpointDiscoveryServiceServer interface { mustEmbedUnimplementedEndpointDiscoveryServiceServer() } func RegisterEndpointDiscoveryServiceServer(s grpc.ServiceRegistrar, srv EndpointDiscoveryServiceServer) { s.RegisterService(&EndpointDiscoveryService_ServiceDesc, srv) } func _EndpointDiscoveryService_StreamEndpoints_Handler(srv interface{}, stream grpc.ServerStream) error { return srv.(EndpointDiscoveryServiceServer).StreamEndpoints(&endpointDiscoveryServiceStreamEndpointsServer{stream}) } type EndpointDiscoveryService_StreamEndpointsServer interface { Send(*v3.DiscoveryResponse) error Recv() (*v3.DiscoveryRequest, error) grpc.ServerStream } type endpointDiscoveryServiceStreamEndpointsServer struct { grpc.ServerStream } func (x *endpointDiscoveryServiceStreamEndpointsServer) Send(m *v3.DiscoveryResponse) error { return x.ServerStream.SendMsg(m) } func (x *endpointDiscoveryServiceStreamEndpointsServer) Recv() (*v3.DiscoveryRequest, error) { m := new(v3.DiscoveryRequest) if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func _EndpointDiscoveryService_DeltaEndpoints_Handler(srv interface{}, stream grpc.ServerStream) error { return srv.(EndpointDiscoveryServiceServer).DeltaEndpoints(&endpointDiscoveryServiceDeltaEndpointsServer{stream}) } type EndpointDiscoveryService_DeltaEndpointsServer interface { Send(*v3.DeltaDiscoveryResponse) error Recv() (*v3.DeltaDiscoveryRequest, error) grpc.ServerStream } type endpointDiscoveryServiceDeltaEndpointsServer struct { grpc.ServerStream } func (x *endpointDiscoveryServiceDeltaEndpointsServer) Send(m *v3.DeltaDiscoveryResponse) error { return x.ServerStream.SendMsg(m) } func (x *endpointDiscoveryServiceDeltaEndpointsServer) Recv() (*v3.DeltaDiscoveryRequest, error) { m := new(v3.DeltaDiscoveryRequest) if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func _EndpointDiscoveryService_FetchEndpoints_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(v3.DiscoveryRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(EndpointDiscoveryServiceServer).FetchEndpoints(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: EndpointDiscoveryService_FetchEndpoints_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EndpointDiscoveryServiceServer).FetchEndpoints(ctx, req.(*v3.DiscoveryRequest)) } return interceptor(ctx, in, info, handler) } // EndpointDiscoveryService_ServiceDesc is the grpc.ServiceDesc for EndpointDiscoveryService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var EndpointDiscoveryService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "envoy.service.endpoint.v3.EndpointDiscoveryService", HandlerType: (*EndpointDiscoveryServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "FetchEndpoints", Handler: _EndpointDiscoveryService_FetchEndpoints_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "StreamEndpoints", Handler: _EndpointDiscoveryService_StreamEndpoints_Handler, ServerStreams: true, ClientStreams: true, }, { StreamName: "DeltaEndpoints", Handler: _EndpointDiscoveryService_DeltaEndpoints_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "envoy/service/endpoint/v3/eds.proto", }