Path: blob/main/components/ws-manager-bridge-api/go/cluster-service_grpc.pb.go
2496 views
// Copyright (c) 2024 Gitpod GmbH. All rights reserved.1// Licensed under the GNU Affero General Public License (AGPL).2// See License.AGPL.txt in the project root for license information.34// Code generated by protoc-gen-go-grpc. DO NOT EDIT.5// versions:6// - protoc-gen-go-grpc v1.2.07// - protoc (unknown)8// source: cluster-service.proto910package api1112import (13context "context"14grpc "google.golang.org/grpc"15codes "google.golang.org/grpc/codes"16status "google.golang.org/grpc/status"17)1819// This is a compile-time assertion to ensure that this generated file20// is compatible with the grpc package it is being compiled against.21// Requires gRPC-Go v1.32.0 or later.22const _ = grpc.SupportPackageIsVersion72324// ClusterServiceClient is the client API for ClusterService service.25//26// 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.27type ClusterServiceClient interface {28// Register registers a new WorkspaceCluster.29Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error)30// Update modififes properties of an already registered WorkspaceCluster.31Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error)32// Deregister removes a WorkspaceCluster from available clusters.33Deregister(ctx context.Context, in *DeregisterRequest, opts ...grpc.CallOption) (*DeregisterResponse, error)34// List returns the currently registered WorkspaceClusters.35List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)36}3738type clusterServiceClient struct {39cc grpc.ClientConnInterface40}4142func NewClusterServiceClient(cc grpc.ClientConnInterface) ClusterServiceClient {43return &clusterServiceClient{cc}44}4546func (c *clusterServiceClient) Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error) {47out := new(RegisterResponse)48err := c.cc.Invoke(ctx, "/workspacemanagerbridge.ClusterService/Register", in, out, opts...)49if err != nil {50return nil, err51}52return out, nil53}5455func (c *clusterServiceClient) Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) {56out := new(UpdateResponse)57err := c.cc.Invoke(ctx, "/workspacemanagerbridge.ClusterService/Update", in, out, opts...)58if err != nil {59return nil, err60}61return out, nil62}6364func (c *clusterServiceClient) Deregister(ctx context.Context, in *DeregisterRequest, opts ...grpc.CallOption) (*DeregisterResponse, error) {65out := new(DeregisterResponse)66err := c.cc.Invoke(ctx, "/workspacemanagerbridge.ClusterService/Deregister", in, out, opts...)67if err != nil {68return nil, err69}70return out, nil71}7273func (c *clusterServiceClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) {74out := new(ListResponse)75err := c.cc.Invoke(ctx, "/workspacemanagerbridge.ClusterService/List", in, out, opts...)76if err != nil {77return nil, err78}79return out, nil80}8182// ClusterServiceServer is the server API for ClusterService service.83// All implementations must embed UnimplementedClusterServiceServer84// for forward compatibility85type ClusterServiceServer interface {86// Register registers a new WorkspaceCluster.87Register(context.Context, *RegisterRequest) (*RegisterResponse, error)88// Update modififes properties of an already registered WorkspaceCluster.89Update(context.Context, *UpdateRequest) (*UpdateResponse, error)90// Deregister removes a WorkspaceCluster from available clusters.91Deregister(context.Context, *DeregisterRequest) (*DeregisterResponse, error)92// List returns the currently registered WorkspaceClusters.93List(context.Context, *ListRequest) (*ListResponse, error)94mustEmbedUnimplementedClusterServiceServer()95}9697// UnimplementedClusterServiceServer must be embedded to have forward compatible implementations.98type UnimplementedClusterServiceServer struct {99}100101func (UnimplementedClusterServiceServer) Register(context.Context, *RegisterRequest) (*RegisterResponse, error) {102return nil, status.Errorf(codes.Unimplemented, "method Register not implemented")103}104func (UnimplementedClusterServiceServer) Update(context.Context, *UpdateRequest) (*UpdateResponse, error) {105return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")106}107func (UnimplementedClusterServiceServer) Deregister(context.Context, *DeregisterRequest) (*DeregisterResponse, error) {108return nil, status.Errorf(codes.Unimplemented, "method Deregister not implemented")109}110func (UnimplementedClusterServiceServer) List(context.Context, *ListRequest) (*ListResponse, error) {111return nil, status.Errorf(codes.Unimplemented, "method List not implemented")112}113func (UnimplementedClusterServiceServer) mustEmbedUnimplementedClusterServiceServer() {}114115// UnsafeClusterServiceServer may be embedded to opt out of forward compatibility for this service.116// Use of this interface is not recommended, as added methods to ClusterServiceServer will117// result in compilation errors.118type UnsafeClusterServiceServer interface {119mustEmbedUnimplementedClusterServiceServer()120}121122func RegisterClusterServiceServer(s grpc.ServiceRegistrar, srv ClusterServiceServer) {123s.RegisterService(&ClusterService_ServiceDesc, srv)124}125126func _ClusterService_Register_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {127in := new(RegisterRequest)128if err := dec(in); err != nil {129return nil, err130}131if interceptor == nil {132return srv.(ClusterServiceServer).Register(ctx, in)133}134info := &grpc.UnaryServerInfo{135Server: srv,136FullMethod: "/workspacemanagerbridge.ClusterService/Register",137}138handler := func(ctx context.Context, req interface{}) (interface{}, error) {139return srv.(ClusterServiceServer).Register(ctx, req.(*RegisterRequest))140}141return interceptor(ctx, in, info, handler)142}143144func _ClusterService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {145in := new(UpdateRequest)146if err := dec(in); err != nil {147return nil, err148}149if interceptor == nil {150return srv.(ClusterServiceServer).Update(ctx, in)151}152info := &grpc.UnaryServerInfo{153Server: srv,154FullMethod: "/workspacemanagerbridge.ClusterService/Update",155}156handler := func(ctx context.Context, req interface{}) (interface{}, error) {157return srv.(ClusterServiceServer).Update(ctx, req.(*UpdateRequest))158}159return interceptor(ctx, in, info, handler)160}161162func _ClusterService_Deregister_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {163in := new(DeregisterRequest)164if err := dec(in); err != nil {165return nil, err166}167if interceptor == nil {168return srv.(ClusterServiceServer).Deregister(ctx, in)169}170info := &grpc.UnaryServerInfo{171Server: srv,172FullMethod: "/workspacemanagerbridge.ClusterService/Deregister",173}174handler := func(ctx context.Context, req interface{}) (interface{}, error) {175return srv.(ClusterServiceServer).Deregister(ctx, req.(*DeregisterRequest))176}177return interceptor(ctx, in, info, handler)178}179180func _ClusterService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {181in := new(ListRequest)182if err := dec(in); err != nil {183return nil, err184}185if interceptor == nil {186return srv.(ClusterServiceServer).List(ctx, in)187}188info := &grpc.UnaryServerInfo{189Server: srv,190FullMethod: "/workspacemanagerbridge.ClusterService/List",191}192handler := func(ctx context.Context, req interface{}) (interface{}, error) {193return srv.(ClusterServiceServer).List(ctx, req.(*ListRequest))194}195return interceptor(ctx, in, info, handler)196}197198// ClusterService_ServiceDesc is the grpc.ServiceDesc for ClusterService service.199// It's only intended for direct use with grpc.RegisterService,200// and not to be introspected or modified (even as a copy)201var ClusterService_ServiceDesc = grpc.ServiceDesc{202ServiceName: "workspacemanagerbridge.ClusterService",203HandlerType: (*ClusterServiceServer)(nil),204Methods: []grpc.MethodDesc{205{206MethodName: "Register",207Handler: _ClusterService_Register_Handler,208},209{210MethodName: "Update",211Handler: _ClusterService_Update_Handler,212},213{214MethodName: "Deregister",215Handler: _ClusterService_Deregister_Handler,216},217{218MethodName: "List",219Handler: _ClusterService_List_Handler,220},221},222Streams: []grpc.StreamDesc{},223Metadata: "cluster-service.proto",224}225226227