| 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/tap/v3/tap.proto |
| 6 |
|
| 7 |
package tapv3 |
| 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 |
const ( |
| 22 |
TapSinkService_StreamTaps_FullMethodName = "/envoy.service.tap.v3.TapSinkService/StreamTaps" |
| 23 |
) |
| 24 |
|
| 25 |
// TapSinkServiceClient is the client API for TapSinkService service. |
| 26 |
// |
| 27 |
// 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. |
| 28 |
type TapSinkServiceClient interface { |
| 29 |
// Envoy will connect and send StreamTapsRequest messages forever. It does not expect any |
| 30 |
// response to be sent as nothing would be done in the case of failure. The server should |
| 31 |
// disconnect if it expects Envoy to reconnect. |
| 32 |
StreamTaps(ctx context.Context, opts ...grpc.CallOption) (TapSinkService_StreamTapsClient, error) |
| 33 |
} |
| 34 |
|
| 35 |
type tapSinkServiceClient struct { |
| 36 |
cc grpc.ClientConnInterface |
| 37 |
} |
| 38 |
|
| 39 |
func NewTapSinkServiceClient(cc grpc.ClientConnInterface) TapSinkServiceClient { |
| 40 |
return &tapSinkServiceClient{cc} |
| 41 |
} |
| 42 |
|
| 43 |
func (c *tapSinkServiceClient) StreamTaps(ctx context.Context, opts ...grpc.CallOption) (TapSinkService_StreamTapsClient, error) { |
| 44 |
stream, err := c.cc.NewStream(ctx, &TapSinkService_ServiceDesc.Streams[0], TapSinkService_StreamTaps_FullMethodName, opts...) |
| 45 |
if err != nil { |
| 46 |
return nil, err |
| 47 |
} |
| 48 |
x := &tapSinkServiceStreamTapsClient{stream} |
| 49 |
return x, nil |
| 50 |
} |
| 51 |
|
| 52 |
type TapSinkService_StreamTapsClient interface { |
| 53 |
Send(*StreamTapsRequest) error |
| 54 |
CloseAndRecv() (*StreamTapsResponse, error) |
| 55 |
grpc.ClientStream |
| 56 |
} |
| 57 |
|
| 58 |
type tapSinkServiceStreamTapsClient struct { |
| 59 |
grpc.ClientStream |
| 60 |
} |
| 61 |
|
| 62 |
func (x *tapSinkServiceStreamTapsClient) Send(m *StreamTapsRequest) error { |
| 63 |
return x.ClientStream.SendMsg(m) |
| 64 |
} |
| 65 |
|
| 66 |
func (x *tapSinkServiceStreamTapsClient) CloseAndRecv() (*StreamTapsResponse, error) { |
| 67 |
if err := x.ClientStream.CloseSend(); err != nil { |
| 68 |
return nil, err |
| 69 |
} |
| 70 |
m := new(StreamTapsResponse) |
| 71 |
if err := x.ClientStream.RecvMsg(m); err != nil { |
| 72 |
return nil, err |
| 73 |
} |
| 74 |
return m, nil |
| 75 |
} |
| 76 |
|
| 77 |
// TapSinkServiceServer is the server API for TapSinkService service. |
| 78 |
// All implementations should embed UnimplementedTapSinkServiceServer |
| 79 |
// for forward compatibility |
| 80 |
type TapSinkServiceServer interface { |
| 81 |
// Envoy will connect and send StreamTapsRequest messages forever. It does not expect any |
| 82 |
// response to be sent as nothing would be done in the case of failure. The server should |
| 83 |
// disconnect if it expects Envoy to reconnect. |
| 84 |
StreamTaps(TapSinkService_StreamTapsServer) error |
| 85 |
} |
| 86 |
|
| 87 |
// UnimplementedTapSinkServiceServer should be embedded to have forward compatible implementations. |
| 88 |
type UnimplementedTapSinkServiceServer struct { |
| 89 |
} |
| 90 |
|
| 91 |
func (UnimplementedTapSinkServiceServer) StreamTaps(TapSinkService_StreamTapsServer) error { |
| 92 |
return status.Errorf(codes.Unimplemented, "method StreamTaps not implemented") |
| 93 |
} |
| 94 |
|
| 95 |
// UnsafeTapSinkServiceServer may be embedded to opt out of forward compatibility for this service. |
| 96 |
// Use of this interface is not recommended, as added methods to TapSinkServiceServer will |
| 97 |
// result in compilation errors. |
| 98 |
type UnsafeTapSinkServiceServer interface { |
| 99 |
mustEmbedUnimplementedTapSinkServiceServer() |
| 100 |
} |
| 101 |
|
| 102 |
func RegisterTapSinkServiceServer(s grpc.ServiceRegistrar, srv TapSinkServiceServer) { |
| 103 |
s.RegisterService(&TapSinkService_ServiceDesc, srv) |
| 104 |
} |
| 105 |
|
| 106 |
func _TapSinkService_StreamTaps_Handler(srv interface{}, stream grpc.ServerStream) error { |
| 107 |
return srv.(TapSinkServiceServer).StreamTaps(&tapSinkServiceStreamTapsServer{stream}) |
| 108 |
} |
| 109 |
|
| 110 |
type TapSinkService_StreamTapsServer interface { |
| 111 |
SendAndClose(*StreamTapsResponse) error |
| 112 |
Recv() (*StreamTapsRequest, error) |
| 113 |
grpc.ServerStream |
| 114 |
} |
| 115 |
|
| 116 |
type tapSinkServiceStreamTapsServer struct { |
| 117 |
grpc.ServerStream |
| 118 |
} |
| 119 |
|
| 120 |
func (x *tapSinkServiceStreamTapsServer) SendAndClose(m *StreamTapsResponse) error { |
| 121 |
return x.ServerStream.SendMsg(m) |
| 122 |
} |
| 123 |
|
| 124 |
func (x *tapSinkServiceStreamTapsServer) Recv() (*StreamTapsRequest, error) { |
| 125 |
m := new(StreamTapsRequest) |
| 126 |
if err := x.ServerStream.RecvMsg(m); err != nil { |
| 127 |
return nil, err |
| 128 |
} |
| 129 |
return m, nil |
| 130 |
} |
| 131 |
|
| 132 |
// TapSinkService_ServiceDesc is the grpc.ServiceDesc for TapSinkService service. |
| 133 |
// It's only intended for direct use with grpc.RegisterService, |
| 134 |
// and not to be introspected or modified (even as a copy) |
| 135 |
var TapSinkService_ServiceDesc = grpc.ServiceDesc{ |
| 136 |
ServiceName: "envoy.service.tap.v3.TapSinkService", |
| 137 |
HandlerType: (*TapSinkServiceServer)(nil), |
| 138 |
Methods: []grpc.MethodDesc{}, |
| 139 |
Streams: []grpc.StreamDesc{ |
| 140 |
{ |
| 141 |
StreamName: "StreamTaps", |
| 142 |
Handler: _TapSinkService_StreamTaps_Handler, |
| 143 |
ClientStreams: true, |
| 144 |
}, |
| 145 |
}, |
| 146 |
Metadata: "envoy/service/tap/v3/tap.proto", |
| 147 |
} |