api/mesh/v1alpha1/dds_grpc.pb.go (217 lines of code) (raw):

// Code generated by protoc-gen-go-grpc. DO NOT EDIT. package v1alpha1 import ( context "context" ) import ( 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 // GlobalDDSServiceClient is the client API for GlobalDDSService 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 GlobalDDSServiceClient interface { // HealthCheck allows us to implement a health check that works across // proxies, unlike HTTP/2 PING frames. HealthCheck(ctx context.Context, in *ZoneHealthCheckRequest, opts ...grpc.CallOption) (*ZoneHealthCheckResponse, error) } type globalDDSServiceClient struct { cc grpc.ClientConnInterface } func NewGlobalDDSServiceClient(cc grpc.ClientConnInterface) GlobalDDSServiceClient { return &globalDDSServiceClient{cc} } func (c *globalDDSServiceClient) HealthCheck(ctx context.Context, in *ZoneHealthCheckRequest, opts ...grpc.CallOption) (*ZoneHealthCheckResponse, error) { out := new(ZoneHealthCheckResponse) err := c.cc.Invoke(ctx, "/dubbo.mesh.v1alpha1.GlobalDDSService/HealthCheck", in, out, opts...) if err != nil { return nil, err } return out, nil } // GlobalDDSServiceServer is the server API for GlobalDDSService service. // All implementations must embed UnimplementedGlobalDDSServiceServer // for forward compatibility type GlobalDDSServiceServer interface { // HealthCheck allows us to implement a health check that works across // proxies, unlike HTTP/2 PING frames. HealthCheck(context.Context, *ZoneHealthCheckRequest) (*ZoneHealthCheckResponse, error) mustEmbedUnimplementedGlobalDDSServiceServer() } // UnimplementedGlobalDDSServiceServer must be embedded to have forward compatible implementations. type UnimplementedGlobalDDSServiceServer struct { } func (UnimplementedGlobalDDSServiceServer) HealthCheck(context.Context, *ZoneHealthCheckRequest) (*ZoneHealthCheckResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method HealthCheck not implemented") } func (UnimplementedGlobalDDSServiceServer) mustEmbedUnimplementedGlobalDDSServiceServer() {} // UnsafeGlobalDDSServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to GlobalDDSServiceServer will // result in compilation errors. type UnsafeGlobalDDSServiceServer interface { mustEmbedUnimplementedGlobalDDSServiceServer() } func RegisterGlobalDDSServiceServer(s grpc.ServiceRegistrar, srv GlobalDDSServiceServer) { s.RegisterService(&GlobalDDSService_ServiceDesc, srv) } func _GlobalDDSService_HealthCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ZoneHealthCheckRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(GlobalDDSServiceServer).HealthCheck(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/dubbo.mesh.v1alpha1.GlobalDDSService/HealthCheck", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(GlobalDDSServiceServer).HealthCheck(ctx, req.(*ZoneHealthCheckRequest)) } return interceptor(ctx, in, info, handler) } // GlobalDDSService_ServiceDesc is the grpc.ServiceDesc for GlobalDDSService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var GlobalDDSService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "dubbo.mesh.v1alpha1.GlobalDDSService", HandlerType: (*GlobalDDSServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "HealthCheck", Handler: _GlobalDDSService_HealthCheck_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/mesh/v1alpha1/dds.proto", } // DDSSyncServiceClient is the client API for DDSSyncService 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 DDSSyncServiceClient interface { // GlobalToZoneSync is logically a service exposed by global control-plane // that allows zone control plane to connect and synchronize resources from // the global control-plane to the zone control-plane. It uses delta xDS from // go-control-plane and responds only with the changes to the resources. GlobalToZoneSync(ctx context.Context, opts ...grpc.CallOption) (DDSSyncService_GlobalToZoneSyncClient, error) // ZoneToGlobalSync is logically a service exposed by global control-plane // that allows zone control plane to connect and synchronize resources to // the global control-plane. It uses delta xDS from go-control-plane and // responds only with the changes to the resources. ZoneToGlobalSync(ctx context.Context, opts ...grpc.CallOption) (DDSSyncService_ZoneToGlobalSyncClient, error) } type dDSSyncServiceClient struct { cc grpc.ClientConnInterface } func NewDDSSyncServiceClient(cc grpc.ClientConnInterface) DDSSyncServiceClient { return &dDSSyncServiceClient{cc} } func (c *dDSSyncServiceClient) GlobalToZoneSync(ctx context.Context, opts ...grpc.CallOption) (DDSSyncService_GlobalToZoneSyncClient, error) { stream, err := c.cc.NewStream(ctx, &DDSSyncService_ServiceDesc.Streams[0], "/dubbo.mesh.v1alpha1.DDSSyncService/GlobalToZoneSync", opts...) if err != nil { return nil, err } x := &dDSSyncServiceGlobalToZoneSyncClient{stream} return x, nil } type DDSSyncService_GlobalToZoneSyncClient interface { Send(*v3.DeltaDiscoveryRequest) error Recv() (*v3.DeltaDiscoveryResponse, error) grpc.ClientStream } type dDSSyncServiceGlobalToZoneSyncClient struct { grpc.ClientStream } func (x *dDSSyncServiceGlobalToZoneSyncClient) Send(m *v3.DeltaDiscoveryRequest) error { return x.ClientStream.SendMsg(m) } func (x *dDSSyncServiceGlobalToZoneSyncClient) Recv() (*v3.DeltaDiscoveryResponse, error) { m := new(v3.DeltaDiscoveryResponse) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func (c *dDSSyncServiceClient) ZoneToGlobalSync(ctx context.Context, opts ...grpc.CallOption) (DDSSyncService_ZoneToGlobalSyncClient, error) { stream, err := c.cc.NewStream(ctx, &DDSSyncService_ServiceDesc.Streams[1], "/dubbo.mesh.v1alpha1.DDSSyncService/ZoneToGlobalSync", opts...) if err != nil { return nil, err } x := &dDSSyncServiceZoneToGlobalSyncClient{stream} return x, nil } type DDSSyncService_ZoneToGlobalSyncClient interface { Send(*v3.DeltaDiscoveryResponse) error Recv() (*v3.DeltaDiscoveryRequest, error) grpc.ClientStream } type dDSSyncServiceZoneToGlobalSyncClient struct { grpc.ClientStream } func (x *dDSSyncServiceZoneToGlobalSyncClient) Send(m *v3.DeltaDiscoveryResponse) error { return x.ClientStream.SendMsg(m) } func (x *dDSSyncServiceZoneToGlobalSyncClient) Recv() (*v3.DeltaDiscoveryRequest, error) { m := new(v3.DeltaDiscoveryRequest) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } // DDSSyncServiceServer is the server API for DDSSyncService service. // All implementations must embed UnimplementedDDSSyncServiceServer // for forward compatibility type DDSSyncServiceServer interface { // GlobalToZoneSync is logically a service exposed by global control-plane // that allows zone control plane to connect and synchronize resources from // the global control-plane to the zone control-plane. It uses delta xDS from // go-control-plane and responds only with the changes to the resources. GlobalToZoneSync(DDSSyncService_GlobalToZoneSyncServer) error // ZoneToGlobalSync is logically a service exposed by global control-plane // that allows zone control plane to connect and synchronize resources to // the global control-plane. It uses delta xDS from go-control-plane and // responds only with the changes to the resources. ZoneToGlobalSync(DDSSyncService_ZoneToGlobalSyncServer) error mustEmbedUnimplementedDDSSyncServiceServer() } // UnimplementedDDSSyncServiceServer must be embedded to have forward compatible implementations. type UnimplementedDDSSyncServiceServer struct { } func (UnimplementedDDSSyncServiceServer) GlobalToZoneSync(DDSSyncService_GlobalToZoneSyncServer) error { return status.Errorf(codes.Unimplemented, "method GlobalToZoneSync not implemented") } func (UnimplementedDDSSyncServiceServer) ZoneToGlobalSync(DDSSyncService_ZoneToGlobalSyncServer) error { return status.Errorf(codes.Unimplemented, "method ZoneToGlobalSync not implemented") } func (UnimplementedDDSSyncServiceServer) mustEmbedUnimplementedDDSSyncServiceServer() {} // UnsafeDDSSyncServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to DDSSyncServiceServer will // result in compilation errors. type UnsafeDDSSyncServiceServer interface { mustEmbedUnimplementedDDSSyncServiceServer() } func RegisterDDSSyncServiceServer(s grpc.ServiceRegistrar, srv DDSSyncServiceServer) { s.RegisterService(&DDSSyncService_ServiceDesc, srv) } func _DDSSyncService_GlobalToZoneSync_Handler(srv interface{}, stream grpc.ServerStream) error { return srv.(DDSSyncServiceServer).GlobalToZoneSync(&dDSSyncServiceGlobalToZoneSyncServer{stream}) } type DDSSyncService_GlobalToZoneSyncServer interface { Send(*v3.DeltaDiscoveryResponse) error Recv() (*v3.DeltaDiscoveryRequest, error) grpc.ServerStream } type dDSSyncServiceGlobalToZoneSyncServer struct { grpc.ServerStream } func (x *dDSSyncServiceGlobalToZoneSyncServer) Send(m *v3.DeltaDiscoveryResponse) error { return x.ServerStream.SendMsg(m) } func (x *dDSSyncServiceGlobalToZoneSyncServer) Recv() (*v3.DeltaDiscoveryRequest, error) { m := new(v3.DeltaDiscoveryRequest) if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func _DDSSyncService_ZoneToGlobalSync_Handler(srv interface{}, stream grpc.ServerStream) error { return srv.(DDSSyncServiceServer).ZoneToGlobalSync(&dDSSyncServiceZoneToGlobalSyncServer{stream}) } type DDSSyncService_ZoneToGlobalSyncServer interface { Send(*v3.DeltaDiscoveryRequest) error Recv() (*v3.DeltaDiscoveryResponse, error) grpc.ServerStream } type dDSSyncServiceZoneToGlobalSyncServer struct { grpc.ServerStream } func (x *dDSSyncServiceZoneToGlobalSyncServer) Send(m *v3.DeltaDiscoveryRequest) error { return x.ServerStream.SendMsg(m) } func (x *dDSSyncServiceZoneToGlobalSyncServer) Recv() (*v3.DeltaDiscoveryResponse, error) { m := new(v3.DeltaDiscoveryResponse) if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err } return m, nil } // DDSSyncService_ServiceDesc is the grpc.ServiceDesc for DDSSyncService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var DDSSyncService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "dubbo.mesh.v1alpha1.DDSSyncService", HandlerType: (*DDSSyncServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "GlobalToZoneSync", Handler: _DDSSyncService_GlobalToZoneSync_Handler, ServerStreams: true, ClientStreams: true, }, { StreamName: "ZoneToGlobalSync", Handler: _DDSSyncService_ZoneToGlobalSync_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "api/mesh/v1alpha1/dds.proto", }