github.com/hxx258456/ccgo@v0.0.5-0.20230213014102-48b35f46f66f/go-control-plane/envoy/service/cluster/v3/cds.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // versions: 3 // protoc-gen-go v1.25.0 4 // protoc v3.16.0 5 // source: envoy/service/cluster/v3/cds.proto 6 7 package envoy_service_cluster_v3 8 9 import ( 10 context "context" 11 _ "github.com/cncf/xds/go/udpa/annotations" 12 _ "github.com/hxx258456/ccgo/go-control-plane/envoy/annotations" 13 v3 "github.com/hxx258456/ccgo/go-control-plane/envoy/service/discovery/v3" 14 proto "github.com/golang/protobuf/proto" 15 _ "google.golang.org/genproto/googleapis/api/annotations" 16 grpc "github.com/hxx258456/ccgo/grpc" 17 codes "github.com/hxx258456/ccgo/grpc/codes" 18 status "github.com/hxx258456/ccgo/grpc/status" 19 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 20 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 21 reflect "reflect" 22 sync "sync" 23 ) 24 25 const ( 26 // Verify that this generated code is sufficiently up-to-date. 27 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 28 // Verify that runtime/protoimpl is sufficiently up-to-date. 29 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 30 ) 31 32 // This is a compile-time assertion that a sufficiently up-to-date version 33 // of the legacy proto package is being used. 34 const _ = proto.ProtoPackageIsVersion4 35 36 // [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing 37 // services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file. 38 type CdsDummy struct { 39 state protoimpl.MessageState 40 sizeCache protoimpl.SizeCache 41 unknownFields protoimpl.UnknownFields 42 } 43 44 func (x *CdsDummy) Reset() { 45 *x = CdsDummy{} 46 if protoimpl.UnsafeEnabled { 47 mi := &file_envoy_service_cluster_v3_cds_proto_msgTypes[0] 48 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 49 ms.StoreMessageInfo(mi) 50 } 51 } 52 53 func (x *CdsDummy) String() string { 54 return protoimpl.X.MessageStringOf(x) 55 } 56 57 func (*CdsDummy) ProtoMessage() {} 58 59 func (x *CdsDummy) ProtoReflect() protoreflect.Message { 60 mi := &file_envoy_service_cluster_v3_cds_proto_msgTypes[0] 61 if protoimpl.UnsafeEnabled && x != nil { 62 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 63 if ms.LoadMessageInfo() == nil { 64 ms.StoreMessageInfo(mi) 65 } 66 return ms 67 } 68 return mi.MessageOf(x) 69 } 70 71 // Deprecated: Use CdsDummy.ProtoReflect.Descriptor instead. 72 func (*CdsDummy) Descriptor() ([]byte, []int) { 73 return file_envoy_service_cluster_v3_cds_proto_rawDescGZIP(), []int{0} 74 } 75 76 var File_envoy_service_cluster_v3_cds_proto protoreflect.FileDescriptor 77 78 var file_envoy_service_cluster_v3_cds_proto_rawDesc = []byte{ 79 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 80 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x64, 0x73, 0x2e, 0x70, 81 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 82 0x69, 0x63, 0x65, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x2a, 83 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, 0x69, 84 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 85 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 86 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 87 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 88 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 89 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 90 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 91 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 92 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 93 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, 0x08, 94 0x43, 0x64, 0x73, 0x44, 0x75, 0x6d, 0x6d, 0x79, 0x3a, 0x1c, 0x9a, 0xc5, 0x88, 0x1e, 0x17, 0x0a, 95 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x64, 96 0x73, 0x44, 0x75, 0x6d, 0x6d, 0x79, 0x32, 0xcd, 0x03, 0x0a, 0x17, 0x43, 0x6c, 0x75, 0x73, 0x74, 97 0x65, 0x72, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 98 0x63, 0x65, 0x12, 0x73, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6c, 0x75, 0x73, 99 0x74, 0x65, 0x72, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 100 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 101 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 102 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 103 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 104 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 105 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x7c, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x74, 0x61, 106 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 107 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 108 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 109 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x65, 0x6e, 110 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 111 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 112 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 113 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x95, 0x01, 0x0a, 0x0d, 0x46, 0x65, 0x74, 0x63, 0x68, 0x43, 114 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 115 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 116 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 117 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 118 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 119 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 120 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x22, 0x16, 0x2f, 0x76, 121 0x33, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x3a, 0x63, 0x6c, 0x75, 0x73, 122 0x74, 0x65, 0x72, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x03, 0x3a, 0x01, 0x2a, 0x1a, 0x27, 0x8a, 123 0xa4, 0x96, 0xf3, 0x07, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 124 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 125 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x3f, 0x0a, 0x26, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 126 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 127 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 128 0x42, 0x08, 0x43, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xba, 129 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 130 } 131 132 var ( 133 file_envoy_service_cluster_v3_cds_proto_rawDescOnce sync.Once 134 file_envoy_service_cluster_v3_cds_proto_rawDescData = file_envoy_service_cluster_v3_cds_proto_rawDesc 135 ) 136 137 func file_envoy_service_cluster_v3_cds_proto_rawDescGZIP() []byte { 138 file_envoy_service_cluster_v3_cds_proto_rawDescOnce.Do(func() { 139 file_envoy_service_cluster_v3_cds_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_cluster_v3_cds_proto_rawDescData) 140 }) 141 return file_envoy_service_cluster_v3_cds_proto_rawDescData 142 } 143 144 var file_envoy_service_cluster_v3_cds_proto_msgTypes = make([]protoimpl.MessageInfo, 1) 145 var file_envoy_service_cluster_v3_cds_proto_goTypes = []interface{}{ 146 (*CdsDummy)(nil), // 0: envoy.service.cluster.v3.CdsDummy 147 (*v3.DiscoveryRequest)(nil), // 1: envoy.service.discovery.v3.DiscoveryRequest 148 (*v3.DeltaDiscoveryRequest)(nil), // 2: envoy.service.discovery.v3.DeltaDiscoveryRequest 149 (*v3.DiscoveryResponse)(nil), // 3: envoy.service.discovery.v3.DiscoveryResponse 150 (*v3.DeltaDiscoveryResponse)(nil), // 4: envoy.service.discovery.v3.DeltaDiscoveryResponse 151 } 152 var file_envoy_service_cluster_v3_cds_proto_depIdxs = []int32{ 153 1, // 0: envoy.service.cluster.v3.ClusterDiscoveryService.StreamClusters:input_type -> envoy.service.discovery.v3.DiscoveryRequest 154 2, // 1: envoy.service.cluster.v3.ClusterDiscoveryService.DeltaClusters:input_type -> envoy.service.discovery.v3.DeltaDiscoveryRequest 155 1, // 2: envoy.service.cluster.v3.ClusterDiscoveryService.FetchClusters:input_type -> envoy.service.discovery.v3.DiscoveryRequest 156 3, // 3: envoy.service.cluster.v3.ClusterDiscoveryService.StreamClusters:output_type -> envoy.service.discovery.v3.DiscoveryResponse 157 4, // 4: envoy.service.cluster.v3.ClusterDiscoveryService.DeltaClusters:output_type -> envoy.service.discovery.v3.DeltaDiscoveryResponse 158 3, // 5: envoy.service.cluster.v3.ClusterDiscoveryService.FetchClusters:output_type -> envoy.service.discovery.v3.DiscoveryResponse 159 3, // [3:6] is the sub-list for method output_type 160 0, // [0:3] is the sub-list for method input_type 161 0, // [0:0] is the sub-list for extension type_name 162 0, // [0:0] is the sub-list for extension extendee 163 0, // [0:0] is the sub-list for field type_name 164 } 165 166 func init() { file_envoy_service_cluster_v3_cds_proto_init() } 167 func file_envoy_service_cluster_v3_cds_proto_init() { 168 if File_envoy_service_cluster_v3_cds_proto != nil { 169 return 170 } 171 if !protoimpl.UnsafeEnabled { 172 file_envoy_service_cluster_v3_cds_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 173 switch v := v.(*CdsDummy); i { 174 case 0: 175 return &v.state 176 case 1: 177 return &v.sizeCache 178 case 2: 179 return &v.unknownFields 180 default: 181 return nil 182 } 183 } 184 } 185 type x struct{} 186 out := protoimpl.TypeBuilder{ 187 File: protoimpl.DescBuilder{ 188 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 189 RawDescriptor: file_envoy_service_cluster_v3_cds_proto_rawDesc, 190 NumEnums: 0, 191 NumMessages: 1, 192 NumExtensions: 0, 193 NumServices: 1, 194 }, 195 GoTypes: file_envoy_service_cluster_v3_cds_proto_goTypes, 196 DependencyIndexes: file_envoy_service_cluster_v3_cds_proto_depIdxs, 197 MessageInfos: file_envoy_service_cluster_v3_cds_proto_msgTypes, 198 }.Build() 199 File_envoy_service_cluster_v3_cds_proto = out.File 200 file_envoy_service_cluster_v3_cds_proto_rawDesc = nil 201 file_envoy_service_cluster_v3_cds_proto_goTypes = nil 202 file_envoy_service_cluster_v3_cds_proto_depIdxs = nil 203 } 204 205 // Reference imports to suppress errors if they are not otherwise used. 206 var _ context.Context 207 var _ grpc.ClientConnInterface 208 209 // This is a compile-time assertion to ensure that this generated file 210 // is compatible with the grpc package it is being compiled against. 211 const _ = grpc.SupportPackageIsVersion6 212 213 // ClusterDiscoveryServiceClient is the client API for ClusterDiscoveryService service. 214 // 215 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 216 type ClusterDiscoveryServiceClient interface { 217 StreamClusters(ctx context.Context, opts ...grpc.CallOption) (ClusterDiscoveryService_StreamClustersClient, error) 218 DeltaClusters(ctx context.Context, opts ...grpc.CallOption) (ClusterDiscoveryService_DeltaClustersClient, error) 219 FetchClusters(ctx context.Context, in *v3.DiscoveryRequest, opts ...grpc.CallOption) (*v3.DiscoveryResponse, error) 220 } 221 222 type clusterDiscoveryServiceClient struct { 223 cc grpc.ClientConnInterface 224 } 225 226 func NewClusterDiscoveryServiceClient(cc grpc.ClientConnInterface) ClusterDiscoveryServiceClient { 227 return &clusterDiscoveryServiceClient{cc} 228 } 229 230 func (c *clusterDiscoveryServiceClient) StreamClusters(ctx context.Context, opts ...grpc.CallOption) (ClusterDiscoveryService_StreamClustersClient, error) { 231 stream, err := c.cc.NewStream(ctx, &_ClusterDiscoveryService_serviceDesc.Streams[0], "/envoy.service.cluster.v3.ClusterDiscoveryService/StreamClusters", opts...) 232 if err != nil { 233 return nil, err 234 } 235 x := &clusterDiscoveryServiceStreamClustersClient{stream} 236 return x, nil 237 } 238 239 type ClusterDiscoveryService_StreamClustersClient interface { 240 Send(*v3.DiscoveryRequest) error 241 Recv() (*v3.DiscoveryResponse, error) 242 grpc.ClientStream 243 } 244 245 type clusterDiscoveryServiceStreamClustersClient struct { 246 grpc.ClientStream 247 } 248 249 func (x *clusterDiscoveryServiceStreamClustersClient) Send(m *v3.DiscoveryRequest) error { 250 return x.ClientStream.SendMsg(m) 251 } 252 253 func (x *clusterDiscoveryServiceStreamClustersClient) Recv() (*v3.DiscoveryResponse, error) { 254 m := new(v3.DiscoveryResponse) 255 if err := x.ClientStream.RecvMsg(m); err != nil { 256 return nil, err 257 } 258 return m, nil 259 } 260 261 func (c *clusterDiscoveryServiceClient) DeltaClusters(ctx context.Context, opts ...grpc.CallOption) (ClusterDiscoveryService_DeltaClustersClient, error) { 262 stream, err := c.cc.NewStream(ctx, &_ClusterDiscoveryService_serviceDesc.Streams[1], "/envoy.service.cluster.v3.ClusterDiscoveryService/DeltaClusters", opts...) 263 if err != nil { 264 return nil, err 265 } 266 x := &clusterDiscoveryServiceDeltaClustersClient{stream} 267 return x, nil 268 } 269 270 type ClusterDiscoveryService_DeltaClustersClient interface { 271 Send(*v3.DeltaDiscoveryRequest) error 272 Recv() (*v3.DeltaDiscoveryResponse, error) 273 grpc.ClientStream 274 } 275 276 type clusterDiscoveryServiceDeltaClustersClient struct { 277 grpc.ClientStream 278 } 279 280 func (x *clusterDiscoveryServiceDeltaClustersClient) Send(m *v3.DeltaDiscoveryRequest) error { 281 return x.ClientStream.SendMsg(m) 282 } 283 284 func (x *clusterDiscoveryServiceDeltaClustersClient) Recv() (*v3.DeltaDiscoveryResponse, error) { 285 m := new(v3.DeltaDiscoveryResponse) 286 if err := x.ClientStream.RecvMsg(m); err != nil { 287 return nil, err 288 } 289 return m, nil 290 } 291 292 func (c *clusterDiscoveryServiceClient) FetchClusters(ctx context.Context, in *v3.DiscoveryRequest, opts ...grpc.CallOption) (*v3.DiscoveryResponse, error) { 293 out := new(v3.DiscoveryResponse) 294 err := c.cc.Invoke(ctx, "/envoy.service.cluster.v3.ClusterDiscoveryService/FetchClusters", in, out, opts...) 295 if err != nil { 296 return nil, err 297 } 298 return out, nil 299 } 300 301 // ClusterDiscoveryServiceServer is the server API for ClusterDiscoveryService service. 302 type ClusterDiscoveryServiceServer interface { 303 StreamClusters(ClusterDiscoveryService_StreamClustersServer) error 304 DeltaClusters(ClusterDiscoveryService_DeltaClustersServer) error 305 FetchClusters(context.Context, *v3.DiscoveryRequest) (*v3.DiscoveryResponse, error) 306 } 307 308 // UnimplementedClusterDiscoveryServiceServer can be embedded to have forward compatible implementations. 309 type UnimplementedClusterDiscoveryServiceServer struct { 310 } 311 312 func (*UnimplementedClusterDiscoveryServiceServer) StreamClusters(ClusterDiscoveryService_StreamClustersServer) error { 313 return status.Errorf(codes.Unimplemented, "method StreamClusters not implemented") 314 } 315 func (*UnimplementedClusterDiscoveryServiceServer) DeltaClusters(ClusterDiscoveryService_DeltaClustersServer) error { 316 return status.Errorf(codes.Unimplemented, "method DeltaClusters not implemented") 317 } 318 func (*UnimplementedClusterDiscoveryServiceServer) FetchClusters(context.Context, *v3.DiscoveryRequest) (*v3.DiscoveryResponse, error) { 319 return nil, status.Errorf(codes.Unimplemented, "method FetchClusters not implemented") 320 } 321 322 func RegisterClusterDiscoveryServiceServer(s *grpc.Server, srv ClusterDiscoveryServiceServer) { 323 s.RegisterService(&_ClusterDiscoveryService_serviceDesc, srv) 324 } 325 326 func _ClusterDiscoveryService_StreamClusters_Handler(srv interface{}, stream grpc.ServerStream) error { 327 return srv.(ClusterDiscoveryServiceServer).StreamClusters(&clusterDiscoveryServiceStreamClustersServer{stream}) 328 } 329 330 type ClusterDiscoveryService_StreamClustersServer interface { 331 Send(*v3.DiscoveryResponse) error 332 Recv() (*v3.DiscoveryRequest, error) 333 grpc.ServerStream 334 } 335 336 type clusterDiscoveryServiceStreamClustersServer struct { 337 grpc.ServerStream 338 } 339 340 func (x *clusterDiscoveryServiceStreamClustersServer) Send(m *v3.DiscoveryResponse) error { 341 return x.ServerStream.SendMsg(m) 342 } 343 344 func (x *clusterDiscoveryServiceStreamClustersServer) Recv() (*v3.DiscoveryRequest, error) { 345 m := new(v3.DiscoveryRequest) 346 if err := x.ServerStream.RecvMsg(m); err != nil { 347 return nil, err 348 } 349 return m, nil 350 } 351 352 func _ClusterDiscoveryService_DeltaClusters_Handler(srv interface{}, stream grpc.ServerStream) error { 353 return srv.(ClusterDiscoveryServiceServer).DeltaClusters(&clusterDiscoveryServiceDeltaClustersServer{stream}) 354 } 355 356 type ClusterDiscoveryService_DeltaClustersServer interface { 357 Send(*v3.DeltaDiscoveryResponse) error 358 Recv() (*v3.DeltaDiscoveryRequest, error) 359 grpc.ServerStream 360 } 361 362 type clusterDiscoveryServiceDeltaClustersServer struct { 363 grpc.ServerStream 364 } 365 366 func (x *clusterDiscoveryServiceDeltaClustersServer) Send(m *v3.DeltaDiscoveryResponse) error { 367 return x.ServerStream.SendMsg(m) 368 } 369 370 func (x *clusterDiscoveryServiceDeltaClustersServer) Recv() (*v3.DeltaDiscoveryRequest, error) { 371 m := new(v3.DeltaDiscoveryRequest) 372 if err := x.ServerStream.RecvMsg(m); err != nil { 373 return nil, err 374 } 375 return m, nil 376 } 377 378 func _ClusterDiscoveryService_FetchClusters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 379 in := new(v3.DiscoveryRequest) 380 if err := dec(in); err != nil { 381 return nil, err 382 } 383 if interceptor == nil { 384 return srv.(ClusterDiscoveryServiceServer).FetchClusters(ctx, in) 385 } 386 info := &grpc.UnaryServerInfo{ 387 Server: srv, 388 FullMethod: "/envoy.service.cluster.v3.ClusterDiscoveryService/FetchClusters", 389 } 390 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 391 return srv.(ClusterDiscoveryServiceServer).FetchClusters(ctx, req.(*v3.DiscoveryRequest)) 392 } 393 return interceptor(ctx, in, info, handler) 394 } 395 396 var _ClusterDiscoveryService_serviceDesc = grpc.ServiceDesc{ 397 ServiceName: "envoy.service.cluster.v3.ClusterDiscoveryService", 398 HandlerType: (*ClusterDiscoveryServiceServer)(nil), 399 Methods: []grpc.MethodDesc{ 400 { 401 MethodName: "FetchClusters", 402 Handler: _ClusterDiscoveryService_FetchClusters_Handler, 403 }, 404 }, 405 Streams: []grpc.StreamDesc{ 406 { 407 StreamName: "StreamClusters", 408 Handler: _ClusterDiscoveryService_StreamClusters_Handler, 409 ServerStreams: true, 410 ClientStreams: true, 411 }, 412 { 413 StreamName: "DeltaClusters", 414 Handler: _ClusterDiscoveryService_DeltaClusters_Handler, 415 ServerStreams: true, 416 ClientStreams: true, 417 }, 418 }, 419 Metadata: "envoy/service/cluster/v3/cds.proto", 420 }