Documentation
¶
Overview ¶
Package rpcv3 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterClusterServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterClusterServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ClusterServiceClient) error
- func RegisterClusterServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterClusterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ClusterServiceServer) error
- func RegisterClusterServiceServer(s grpc.ServiceRegistrar, srv ClusterServiceServer)
- type ClusterServiceClient
- type ClusterServiceServer
- type DeleteClusterResponse
- type RegisterClusterRequest
- func (*RegisterClusterRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterClusterRequest) GetSigningRequest() []byte
- func (x *RegisterClusterRequest) GetToken() string
- func (*RegisterClusterRequest) ProtoMessage()
- func (x *RegisterClusterRequest) ProtoReflect() protoreflect.Message
- func (x *RegisterClusterRequest) Reset()
- func (x *RegisterClusterRequest) String() string
- type RegisterClusterResponse
- func (*RegisterClusterResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterClusterResponse) GetCaCertificate() []byte
- func (x *RegisterClusterResponse) GetCertificate() []byte
- func (*RegisterClusterResponse) ProtoMessage()
- func (x *RegisterClusterResponse) ProtoReflect() protoreflect.Message
- func (x *RegisterClusterResponse) Reset()
- func (x *RegisterClusterResponse) String() string
- type SchedulerClient
- type SchedulerPool
- type UnimplementedClusterServiceServer
- func (UnimplementedClusterServiceServer) CreateCluster(context.Context, *v3.Cluster) (*v3.Cluster, error)
- func (UnimplementedClusterServiceServer) DeleteCluster(context.Context, *v3.Cluster) (*DeleteClusterResponse, error)
- func (UnimplementedClusterServiceServer) DownloadCluster(context.Context, *v3.Cluster) (*v31.HttpBody, error)
- func (UnimplementedClusterServiceServer) GetCluster(context.Context, *v3.Cluster) (*v3.Cluster, error)
- func (UnimplementedClusterServiceServer) GetClusters(context.Context, *v31.QueryOptions) (*v3.ClusterList, error)
- func (UnimplementedClusterServiceServer) UpdateCluster(context.Context, *v3.Cluster) (*v3.Cluster, error)
- type UnsafeClusterServiceServer
Constants ¶
This section is empty.
Variables ¶
var ClusterService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "paralus.dev.rpc.v3.ClusterService", HandlerType: (*ClusterServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateCluster", Handler: _ClusterService_CreateCluster_Handler, }, { MethodName: "GetClusters", Handler: _ClusterService_GetClusters_Handler, }, { MethodName: "GetCluster", Handler: _ClusterService_GetCluster_Handler, }, { MethodName: "UpdateCluster", Handler: _ClusterService_UpdateCluster_Handler, }, { MethodName: "DeleteCluster", Handler: _ClusterService_DeleteCluster_Handler, }, { MethodName: "DownloadCluster", Handler: _ClusterService_DownloadCluster_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/rpc/scheduler/cluster.proto", }
ClusterService_ServiceDesc is the grpc.ServiceDesc for ClusterService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_proto_rpc_scheduler_cluster_proto protoreflect.FileDescriptor
Functions ¶
func RegisterClusterServiceHandler ¶ added in v0.1.3
func RegisterClusterServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterClusterServiceHandler registers the http handlers for service ClusterService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterClusterServiceHandlerClient ¶ added in v0.1.3
func RegisterClusterServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ClusterServiceClient) error
RegisterClusterServiceHandlerClient registers the http handlers for service ClusterService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ClusterServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ClusterServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ClusterServiceClient" to call the correct interceptors.
func RegisterClusterServiceHandlerFromEndpoint ¶ added in v0.1.3
func RegisterClusterServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterClusterServiceHandlerFromEndpoint is same as RegisterClusterServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterClusterServiceHandlerServer ¶ added in v0.1.3
func RegisterClusterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ClusterServiceServer) error
RegisterClusterServiceHandlerServer registers the http handlers for service ClusterService to "mux". UnaryRPC :call ClusterServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterClusterServiceHandlerFromEndpoint instead.
func RegisterClusterServiceServer ¶ added in v0.1.3
func RegisterClusterServiceServer(s grpc.ServiceRegistrar, srv ClusterServiceServer)
Types ¶
type ClusterServiceClient ¶ added in v0.1.3
type ClusterServiceClient interface { CreateCluster(ctx context.Context, in *v3.Cluster, opts ...grpc.CallOption) (*v3.Cluster, error) GetClusters(ctx context.Context, in *v31.QueryOptions, opts ...grpc.CallOption) (*v3.ClusterList, error) GetCluster(ctx context.Context, in *v3.Cluster, opts ...grpc.CallOption) (*v3.Cluster, error) UpdateCluster(ctx context.Context, in *v3.Cluster, opts ...grpc.CallOption) (*v3.Cluster, error) DeleteCluster(ctx context.Context, in *v3.Cluster, opts ...grpc.CallOption) (*DeleteClusterResponse, error) DownloadCluster(ctx context.Context, in *v3.Cluster, opts ...grpc.CallOption) (*v31.HttpBody, error) }
ClusterServiceClient is the client API for ClusterService 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.
func NewClusterServiceClient ¶ added in v0.1.3
func NewClusterServiceClient(cc grpc.ClientConnInterface) ClusterServiceClient
type ClusterServiceServer ¶ added in v0.1.3
type ClusterServiceServer interface { CreateCluster(context.Context, *v3.Cluster) (*v3.Cluster, error) GetClusters(context.Context, *v31.QueryOptions) (*v3.ClusterList, error) GetCluster(context.Context, *v3.Cluster) (*v3.Cluster, error) UpdateCluster(context.Context, *v3.Cluster) (*v3.Cluster, error) DeleteCluster(context.Context, *v3.Cluster) (*DeleteClusterResponse, error) DownloadCluster(context.Context, *v3.Cluster) (*v31.HttpBody, error) }
ClusterServiceServer is the server API for ClusterService service. All implementations should embed UnimplementedClusterServiceServer for forward compatibility
type DeleteClusterResponse ¶
type DeleteClusterResponse struct {
// contains filtered or unexported fields
}
func (*DeleteClusterResponse) Descriptor
deprecated
func (*DeleteClusterResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteClusterResponse.ProtoReflect.Descriptor instead.
func (*DeleteClusterResponse) ProtoMessage ¶
func (*DeleteClusterResponse) ProtoMessage()
func (*DeleteClusterResponse) ProtoReflect ¶
func (x *DeleteClusterResponse) ProtoReflect() protoreflect.Message
func (*DeleteClusterResponse) Reset ¶
func (x *DeleteClusterResponse) Reset()
func (*DeleteClusterResponse) String ¶
func (x *DeleteClusterResponse) String() string
type RegisterClusterRequest ¶
type RegisterClusterRequest struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` SigningRequest []byte `protobuf:"bytes,2,opt,name=signingRequest,proto3" json:"signingRequest,omitempty"` // contains filtered or unexported fields }
func (*RegisterClusterRequest) Descriptor
deprecated
func (*RegisterClusterRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegisterClusterRequest.ProtoReflect.Descriptor instead.
func (*RegisterClusterRequest) GetSigningRequest ¶
func (x *RegisterClusterRequest) GetSigningRequest() []byte
func (*RegisterClusterRequest) GetToken ¶
func (x *RegisterClusterRequest) GetToken() string
func (*RegisterClusterRequest) ProtoMessage ¶
func (*RegisterClusterRequest) ProtoMessage()
func (*RegisterClusterRequest) ProtoReflect ¶
func (x *RegisterClusterRequest) ProtoReflect() protoreflect.Message
func (*RegisterClusterRequest) Reset ¶
func (x *RegisterClusterRequest) Reset()
func (*RegisterClusterRequest) String ¶
func (x *RegisterClusterRequest) String() string
type RegisterClusterResponse ¶
type RegisterClusterResponse struct { Certificate []byte `protobuf:"bytes,1,opt,name=certificate,proto3" json:"certificate,omitempty"` CaCertificate []byte `protobuf:"bytes,2,opt,name=caCertificate,proto3" json:"caCertificate,omitempty"` // contains filtered or unexported fields }
func (*RegisterClusterResponse) Descriptor
deprecated
func (*RegisterClusterResponse) Descriptor() ([]byte, []int)
Deprecated: Use RegisterClusterResponse.ProtoReflect.Descriptor instead.
func (*RegisterClusterResponse) GetCaCertificate ¶
func (x *RegisterClusterResponse) GetCaCertificate() []byte
func (*RegisterClusterResponse) GetCertificate ¶
func (x *RegisterClusterResponse) GetCertificate() []byte
func (*RegisterClusterResponse) ProtoMessage ¶
func (*RegisterClusterResponse) ProtoMessage()
func (*RegisterClusterResponse) ProtoReflect ¶
func (x *RegisterClusterResponse) ProtoReflect() protoreflect.Message
func (*RegisterClusterResponse) Reset ¶
func (x *RegisterClusterResponse) Reset()
func (*RegisterClusterResponse) String ¶
func (x *RegisterClusterResponse) String() string
type SchedulerClient ¶
type SchedulerClient interface { Unhealthy() Close() error ClusterServiceClient }
SchedulerClient is the interface for accessing all the RPCs exposed by Cluster Scheduler
type SchedulerPool ¶
type SchedulerPool interface { Close() NewClient(ctx context.Context) (SchedulerClient, error) }
SchedulerPool maintains pool of grpc connections to scheduler service
func NewSchedulerPool ¶
func NewSchedulerPool(addr string, maxConn int) SchedulerPool
NewSchedulerPool new scheduler pool
type UnimplementedClusterServiceServer ¶ added in v0.1.3
type UnimplementedClusterServiceServer struct { }
UnimplementedClusterServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedClusterServiceServer) CreateCluster ¶ added in v0.1.3
func (UnimplementedClusterServiceServer) DeleteCluster ¶ added in v0.1.3
func (UnimplementedClusterServiceServer) DeleteCluster(context.Context, *v3.Cluster) (*DeleteClusterResponse, error)
func (UnimplementedClusterServiceServer) DownloadCluster ¶ added in v0.1.3
func (UnimplementedClusterServiceServer) GetCluster ¶ added in v0.1.3
func (UnimplementedClusterServiceServer) GetClusters ¶ added in v0.1.3
func (UnimplementedClusterServiceServer) GetClusters(context.Context, *v31.QueryOptions) (*v3.ClusterList, error)
func (UnimplementedClusterServiceServer) UpdateCluster ¶ added in v0.1.3
type UnsafeClusterServiceServer ¶ added in v0.1.3
type UnsafeClusterServiceServer interface {
// contains filtered or unexported methods
}
UnsafeClusterServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ClusterServiceServer will result in compilation errors.