Debian Codegraph @

envoy/service/ext_proc/v3/external_processor_grpc.pb.go

raw
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/ext_proc/v3/external_processor.proto
6
7 package ext_procv3
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 ExternalProcessor_Process_FullMethodName = "/envoy.service.ext_proc.v3.ExternalProcessor/Process"
23 )
24
25 // ExternalProcessorClient is the client API for ExternalProcessor 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 ExternalProcessorClient interface {
29 // This begins the bidirectional stream that Envoy will use to
30 // give the server control over what the filter does. The actual
31 // protocol is described by the ProcessingRequest and ProcessingResponse
32 // messages below.
33 Process(ctx context.Context, opts ...grpc.CallOption) (ExternalProcessor_ProcessClient, error)
34 }
35
36 type externalProcessorClient struct {
37 cc grpc.ClientConnInterface
38 }
39
40 func NewExternalProcessorClient(cc grpc.ClientConnInterface) ExternalProcessorClient {
41 return &externalProcessorClient{cc}
42 }
43
44 func (c *externalProcessorClient) Process(ctx context.Context, opts ...grpc.CallOption) (ExternalProcessor_ProcessClient, error) {
45 stream, err := c.cc.NewStream(ctx, &ExternalProcessor_ServiceDesc.Streams[0], ExternalProcessor_Process_FullMethodName, opts...)
46 if err != nil {
47 return nil, err
48 }
49 x := &externalProcessorProcessClient{stream}
50 return x, nil
51 }
52
53 type ExternalProcessor_ProcessClient interface {
54 Send(*ProcessingRequest) error
55 Recv() (*ProcessingResponse, error)
56 grpc.ClientStream
57 }
58
59 type externalProcessorProcessClient struct {
60 grpc.ClientStream
61 }
62
63 func (x *externalProcessorProcessClient) Send(m *ProcessingRequest) error {
64 return x.ClientStream.SendMsg(m)
65 }
66
67 func (x *externalProcessorProcessClient) Recv() (*ProcessingResponse, error) {
68 m := new(ProcessingResponse)
69 if err := x.ClientStream.RecvMsg(m); err != nil {
70 return nil, err
71 }
72 return m, nil
73 }
74
75 // ExternalProcessorServer is the server API for ExternalProcessor service.
76 // All implementations should embed UnimplementedExternalProcessorServer
77 // for forward compatibility
78 type ExternalProcessorServer interface {
79 // This begins the bidirectional stream that Envoy will use to
80 // give the server control over what the filter does. The actual
81 // protocol is described by the ProcessingRequest and ProcessingResponse
82 // messages below.
83 Process(ExternalProcessor_ProcessServer) error
84 }
85
86 // UnimplementedExternalProcessorServer should be embedded to have forward compatible implementations.
87 type UnimplementedExternalProcessorServer struct {
88 }
89
90 func (UnimplementedExternalProcessorServer) Process(ExternalProcessor_ProcessServer) error {
91 return status.Errorf(codes.Unimplemented, "method Process not implemented")
92 }
93
94 // UnsafeExternalProcessorServer may be embedded to opt out of forward compatibility for this service.
95 // Use of this interface is not recommended, as added methods to ExternalProcessorServer will
96 // result in compilation errors.
97 type UnsafeExternalProcessorServer interface {
98 mustEmbedUnimplementedExternalProcessorServer()
99 }
100
101 func RegisterExternalProcessorServer(s grpc.ServiceRegistrar, srv ExternalProcessorServer) {
102 s.RegisterService(&ExternalProcessor_ServiceDesc, srv)
103 }
104
105 func _ExternalProcessor_Process_Handler(srv interface{}, stream grpc.ServerStream) error {
106 return srv.(ExternalProcessorServer).Process(&externalProcessorProcessServer{stream})
107 }
108
109 type ExternalProcessor_ProcessServer interface {
110 Send(*ProcessingResponse) error
111 Recv() (*ProcessingRequest, error)
112 grpc.ServerStream
113 }
114
115 type externalProcessorProcessServer struct {
116 grpc.ServerStream
117 }
118
119 func (x *externalProcessorProcessServer) Send(m *ProcessingResponse) error {
120 return x.ServerStream.SendMsg(m)
121 }
122
123 func (x *externalProcessorProcessServer) Recv() (*ProcessingRequest, error) {
124 m := new(ProcessingRequest)
125 if err := x.ServerStream.RecvMsg(m); err != nil {
126 return nil, err
127 }
128 return m, nil
129 }
130
131 // ExternalProcessor_ServiceDesc is the grpc.ServiceDesc for ExternalProcessor service.
132 // It's only intended for direct use with grpc.RegisterService,
133 // and not to be introspected or modified (even as a copy)
134 var ExternalProcessor_ServiceDesc = grpc.ServiceDesc{
135 ServiceName: "envoy.service.ext_proc.v3.ExternalProcessor",
136 HandlerType: (*ExternalProcessorServer)(nil),
137 Methods: []grpc.MethodDesc{},
138 Streams: []grpc.StreamDesc{
139 {
140 StreamName: "Process",
141 Handler: _ExternalProcessor_Process_Handler,
142 ServerStreams: true,
143 ClientStreams: true,
144 },
145 },
146 Metadata: "envoy/service/ext_proc/v3/external_processor.proto",
147 }