| 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/runtime/v3/rtds.proto |
| 6 |
|
| 7 |
package runtimev3 |
| 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 |
RuntimeDiscoveryService_StreamRuntime_FullMethodName = "/envoy.service.runtime.v3.RuntimeDiscoveryService/StreamRuntime" |
| 24 |
RuntimeDiscoveryService_DeltaRuntime_FullMethodName = "/envoy.service.runtime.v3.RuntimeDiscoveryService/DeltaRuntime" |
| 25 |
RuntimeDiscoveryService_FetchRuntime_FullMethodName = "/envoy.service.runtime.v3.RuntimeDiscoveryService/FetchRuntime" |
| 26 |
) |
| 27 |
|
| 28 |
// RuntimeDiscoveryServiceClient is the client API for RuntimeDiscoveryService 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 RuntimeDiscoveryServiceClient interface { |
| 32 |
StreamRuntime(ctx context.Context, opts ...grpc.CallOption) (RuntimeDiscoveryService_StreamRuntimeClient, error) |
| 33 |
DeltaRuntime(ctx context.Context, opts ...grpc.CallOption) (RuntimeDiscoveryService_DeltaRuntimeClient, error) |
| 34 |
FetchRuntime(ctx context.Context, in *v3.DiscoveryRequest, opts ...grpc.CallOption) (*v3.DiscoveryResponse, error) |
| 35 |
} |
| 36 |
|
| 37 |
type runtimeDiscoveryServiceClient struct { |
| 38 |
cc grpc.ClientConnInterface |
| 39 |
} |
| 40 |
|
| 41 |
func NewRuntimeDiscoveryServiceClient(cc grpc.ClientConnInterface) RuntimeDiscoveryServiceClient { |
| 42 |
return &runtimeDiscoveryServiceClient{cc} |
| 43 |
} |
| 44 |
|
| 45 |
func (c *runtimeDiscoveryServiceClient) StreamRuntime(ctx context.Context, opts ...grpc.CallOption) (RuntimeDiscoveryService_StreamRuntimeClient, error) { |
| 46 |
stream, err := c.cc.NewStream(ctx, &RuntimeDiscoveryService_ServiceDesc.Streams[0], RuntimeDiscoveryService_StreamRuntime_FullMethodName, opts...) |
| 47 |
if err != nil { |
| 48 |
return nil, err |
| 49 |
} |
| 50 |
x := &runtimeDiscoveryServiceStreamRuntimeClient{stream} |
| 51 |
return x, nil |
| 52 |
} |
| 53 |
|
| 54 |
type RuntimeDiscoveryService_StreamRuntimeClient interface { |
| 55 |
Send(*v3.DiscoveryRequest) error |
| 56 |
Recv() (*v3.DiscoveryResponse, error) |
| 57 |
grpc.ClientStream |
| 58 |
} |
| 59 |
|
| 60 |
type runtimeDiscoveryServiceStreamRuntimeClient struct { |
| 61 |
grpc.ClientStream |
| 62 |
} |
| 63 |
|
| 64 |
func (x *runtimeDiscoveryServiceStreamRuntimeClient) Send(m *v3.DiscoveryRequest) error { |
| 65 |
return x.ClientStream.SendMsg(m) |
| 66 |
} |
| 67 |
|
| 68 |
func (x *runtimeDiscoveryServiceStreamRuntimeClient) Recv() (*v3.DiscoveryResponse, error) { |
| 69 |
m := new(v3.DiscoveryResponse) |
| 70 |
if err := x.ClientStream.RecvMsg(m); err != nil { |
| 71 |
return nil, err |
| 72 |
} |
| 73 |
return m, nil |
| 74 |
} |
| 75 |
|
| 76 |
func (c *runtimeDiscoveryServiceClient) DeltaRuntime(ctx context.Context, opts ...grpc.CallOption) (RuntimeDiscoveryService_DeltaRuntimeClient, error) { |
| 77 |
stream, err := c.cc.NewStream(ctx, &RuntimeDiscoveryService_ServiceDesc.Streams[1], RuntimeDiscoveryService_DeltaRuntime_FullMethodName, opts...) |
| 78 |
if err != nil { |
| 79 |
return nil, err |
| 80 |
} |
| 81 |
x := &runtimeDiscoveryServiceDeltaRuntimeClient{stream} |
| 82 |
return x, nil |
| 83 |
} |
| 84 |
|
| 85 |
type RuntimeDiscoveryService_DeltaRuntimeClient interface { |
| 86 |
Send(*v3.DeltaDiscoveryRequest) error |
| 87 |
Recv() (*v3.DeltaDiscoveryResponse, error) |
| 88 |
grpc.ClientStream |
| 89 |
} |
| 90 |
|
| 91 |
type runtimeDiscoveryServiceDeltaRuntimeClient struct { |
| 92 |
grpc.ClientStream |
| 93 |
} |
| 94 |
|
| 95 |
func (x *runtimeDiscoveryServiceDeltaRuntimeClient) Send(m *v3.DeltaDiscoveryRequest) error { |
| 96 |
return x.ClientStream.SendMsg(m) |
| 97 |
} |
| 98 |
|
| 99 |
func (x *runtimeDiscoveryServiceDeltaRuntimeClient) Recv() (*v3.DeltaDiscoveryResponse, error) { |
| 100 |
m := new(v3.DeltaDiscoveryResponse) |
| 101 |
if err := x.ClientStream.RecvMsg(m); err != nil { |
| 102 |
return nil, err |
| 103 |
} |
| 104 |
return m, nil |
| 105 |
} |
| 106 |
|
| 107 |
func (c *runtimeDiscoveryServiceClient) FetchRuntime(ctx context.Context, in *v3.DiscoveryRequest, opts ...grpc.CallOption) (*v3.DiscoveryResponse, error) { |
| 108 |
out := new(v3.DiscoveryResponse) |
| 109 |
err := c.cc.Invoke(ctx, RuntimeDiscoveryService_FetchRuntime_FullMethodName, in, out, opts...) |
| 110 |
if err != nil { |
| 111 |
return nil, err |
| 112 |
} |
| 113 |
return out, nil |
| 114 |
} |
| 115 |
|
| 116 |
// RuntimeDiscoveryServiceServer is the server API for RuntimeDiscoveryService service. |
| 117 |
// All implementations should embed UnimplementedRuntimeDiscoveryServiceServer |
| 118 |
// for forward compatibility |
| 119 |
type RuntimeDiscoveryServiceServer interface { |
| 120 |
StreamRuntime(RuntimeDiscoveryService_StreamRuntimeServer) error |
| 121 |
DeltaRuntime(RuntimeDiscoveryService_DeltaRuntimeServer) error |
| 122 |
FetchRuntime(context.Context, *v3.DiscoveryRequest) (*v3.DiscoveryResponse, error) |
| 123 |
} |
| 124 |
|
| 125 |
// UnimplementedRuntimeDiscoveryServiceServer should be embedded to have forward compatible implementations. |
| 126 |
type UnimplementedRuntimeDiscoveryServiceServer struct { |
| 127 |
} |
| 128 |
|
| 129 |
func (UnimplementedRuntimeDiscoveryServiceServer) StreamRuntime(RuntimeDiscoveryService_StreamRuntimeServer) error { |
| 130 |
return status.Errorf(codes.Unimplemented, "method StreamRuntime not implemented") |
| 131 |
} |
| 132 |
func (UnimplementedRuntimeDiscoveryServiceServer) DeltaRuntime(RuntimeDiscoveryService_DeltaRuntimeServer) error { |
| 133 |
return status.Errorf(codes.Unimplemented, "method DeltaRuntime not implemented") |
| 134 |
} |
| 135 |
func (UnimplementedRuntimeDiscoveryServiceServer) FetchRuntime(context.Context, *v3.DiscoveryRequest) (*v3.DiscoveryResponse, error) { |
| 136 |
return nil, status.Errorf(codes.Unimplemented, "method FetchRuntime not implemented") |
| 137 |
} |
| 138 |
|
| 139 |
// UnsafeRuntimeDiscoveryServiceServer may be embedded to opt out of forward compatibility for this service. |
| 140 |
// Use of this interface is not recommended, as added methods to RuntimeDiscoveryServiceServer will |
| 141 |
// result in compilation errors. |
| 142 |
type UnsafeRuntimeDiscoveryServiceServer interface { |
| 143 |
mustEmbedUnimplementedRuntimeDiscoveryServiceServer() |
| 144 |
} |
| 145 |
|
| 146 |
func RegisterRuntimeDiscoveryServiceServer(s grpc.ServiceRegistrar, srv RuntimeDiscoveryServiceServer) { |
| 147 |
s.RegisterService(&RuntimeDiscoveryService_ServiceDesc, srv) |
| 148 |
} |
| 149 |
|
| 150 |
func _RuntimeDiscoveryService_StreamRuntime_Handler(srv interface{}, stream grpc.ServerStream) error { |
| 151 |
return srv.(RuntimeDiscoveryServiceServer).StreamRuntime(&runtimeDiscoveryServiceStreamRuntimeServer{stream}) |
| 152 |
} |
| 153 |
|
| 154 |
type RuntimeDiscoveryService_StreamRuntimeServer interface { |
| 155 |
Send(*v3.DiscoveryResponse) error |
| 156 |
Recv() (*v3.DiscoveryRequest, error) |
| 157 |
grpc.ServerStream |
| 158 |
} |
| 159 |
|
| 160 |
type runtimeDiscoveryServiceStreamRuntimeServer struct { |
| 161 |
grpc.ServerStream |
| 162 |
} |
| 163 |
|
| 164 |
func (x *runtimeDiscoveryServiceStreamRuntimeServer) Send(m *v3.DiscoveryResponse) error { |
| 165 |
return x.ServerStream.SendMsg(m) |
| 166 |
} |
| 167 |
|
| 168 |
func (x *runtimeDiscoveryServiceStreamRuntimeServer) Recv() (*v3.DiscoveryRequest, error) { |
| 169 |
m := new(v3.DiscoveryRequest) |
| 170 |
if err := x.ServerStream.RecvMsg(m); err != nil { |
| 171 |
return nil, err |
| 172 |
} |
| 173 |
return m, nil |
| 174 |
} |
| 175 |
|
| 176 |
func _RuntimeDiscoveryService_DeltaRuntime_Handler(srv interface{}, stream grpc.ServerStream) error { |
| 177 |
return srv.(RuntimeDiscoveryServiceServer).DeltaRuntime(&runtimeDiscoveryServiceDeltaRuntimeServer{stream}) |
| 178 |
} |
| 179 |
|
| 180 |
type RuntimeDiscoveryService_DeltaRuntimeServer interface { |
| 181 |
Send(*v3.DeltaDiscoveryResponse) error |
| 182 |
Recv() (*v3.DeltaDiscoveryRequest, error) |
| 183 |
grpc.ServerStream |
| 184 |
} |
| 185 |
|
| 186 |
type runtimeDiscoveryServiceDeltaRuntimeServer struct { |
| 187 |
grpc.ServerStream |
| 188 |
} |
| 189 |
|
| 190 |
func (x *runtimeDiscoveryServiceDeltaRuntimeServer) Send(m *v3.DeltaDiscoveryResponse) error { |
| 191 |
return x.ServerStream.SendMsg(m) |
| 192 |
} |
| 193 |
|
| 194 |
func (x *runtimeDiscoveryServiceDeltaRuntimeServer) Recv() (*v3.DeltaDiscoveryRequest, error) { |
| 195 |
m := new(v3.DeltaDiscoveryRequest) |
| 196 |
if err := x.ServerStream.RecvMsg(m); err != nil { |
| 197 |
return nil, err |
| 198 |
} |
| 199 |
return m, nil |
| 200 |
} |
| 201 |
|
| 202 |
func _RuntimeDiscoveryService_FetchRuntime_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 203 |
in := new(v3.DiscoveryRequest) |
| 204 |
if err := dec(in); err != nil { |
| 205 |
return nil, err |
| 206 |
} |
| 207 |
if interceptor == nil { |
| 208 |
return srv.(RuntimeDiscoveryServiceServer).FetchRuntime(ctx, in) |
| 209 |
} |
| 210 |
info := &grpc.UnaryServerInfo{ |
| 211 |
Server: srv, |
| 212 |
FullMethod: RuntimeDiscoveryService_FetchRuntime_FullMethodName, |
| 213 |
} |
| 214 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 215 |
return srv.(RuntimeDiscoveryServiceServer).FetchRuntime(ctx, req.(*v3.DiscoveryRequest)) |
| 216 |
} |
| 217 |
return interceptor(ctx, in, info, handler) |
| 218 |
} |
| 219 |
|
| 220 |
// RuntimeDiscoveryService_ServiceDesc is the grpc.ServiceDesc for RuntimeDiscoveryService service. |
| 221 |
// It's only intended for direct use with grpc.RegisterService, |
| 222 |
// and not to be introspected or modified (even as a copy) |
| 223 |
var RuntimeDiscoveryService_ServiceDesc = grpc.ServiceDesc{ |
| 224 |
ServiceName: "envoy.service.runtime.v3.RuntimeDiscoveryService", |
| 225 |
HandlerType: (*RuntimeDiscoveryServiceServer)(nil), |
| 226 |
Methods: []grpc.MethodDesc{ |
| 227 |
{ |
| 228 |
MethodName: "FetchRuntime", |
| 229 |
Handler: _RuntimeDiscoveryService_FetchRuntime_Handler, |
| 230 |
}, |
| 231 |
}, |
| 232 |
Streams: []grpc.StreamDesc{ |
| 233 |
{ |
| 234 |
StreamName: "StreamRuntime", |
| 235 |
Handler: _RuntimeDiscoveryService_StreamRuntime_Handler, |
| 236 |
ServerStreams: true, |
| 237 |
ClientStreams: true, |
| 238 |
}, |
| 239 |
{ |
| 240 |
StreamName: "DeltaRuntime", |
| 241 |
Handler: _RuntimeDiscoveryService_DeltaRuntime_Handler, |
| 242 |
ServerStreams: true, |
| 243 |
ClientStreams: true, |
| 244 |
}, |
| 245 |
}, |
| 246 |
Metadata: "envoy/service/runtime/v3/rtds.proto", |
| 247 |
} |