Documentation
¶
Index ¶
- Constants
- func NewClusterServiceHandler(svc ClusterServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- type ClusterServiceClient
- type ClusterServiceHandler
- type UnimplementedClusterServiceHandler
- func (UnimplementedClusterServiceHandler) AddCluster(context.Context, *connect.Request[v1.AddClusterRequest]) (*connect.Response[v1.AddClusterResponse], error)
- func (UnimplementedClusterServiceHandler) DeleteCluster(context.Context, *connect.Request[v1.DeleteClusterRequest]) (*connect.Response[v1.DeleteClusterResponse], error)
- func (UnimplementedClusterServiceHandler) ExecuteClusterDrsPlan(context.Context, *connect.Request[v1.ExecuteClusterDrsPlanRequest]) (*connect.Response[v1.ExecuteClusterDrsPlanResponse], error)
- func (UnimplementedClusterServiceHandler) GenerateClusterDrsPlan(context.Context, *connect.Request[v1.GenerateClusterDrsPlanRequest]) (*connect.Response[v1.GenerateClusterDrsPlanResponse], error)
- func (UnimplementedClusterServiceHandler) ListClusterDrsPlan(context.Context, *connect.Request[v1.ListClusterDrsPlanRequest]) (*connect.Response[v1.ListClusterDrsPlanResponse], error)
- func (UnimplementedClusterServiceHandler) ListClusters(context.Context, *connect.Request[v1.ListClustersRequest]) (*connect.Response[v1.ListClustersResponse], error)
- func (UnimplementedClusterServiceHandler) UpdateCluster(context.Context, *connect.Request[v1.UpdateClusterRequest]) (*connect.Response[v1.UpdateClusterResponse], error)
Constants ¶
const ( // ClusterServiceAddClusterProcedure is the fully-qualified name of the ClusterService's AddCluster // RPC. ClusterServiceAddClusterProcedure = "/cloudstack.management.cluster.v1.ClusterService/AddCluster" // ClusterServiceDeleteClusterProcedure is the fully-qualified name of the ClusterService's // DeleteCluster RPC. ClusterServiceDeleteClusterProcedure = "/cloudstack.management.cluster.v1.ClusterService/DeleteCluster" // ClusterServiceExecuteClusterDrsPlanProcedure is the fully-qualified name of the ClusterService's // ExecuteClusterDrsPlan RPC. ClusterServiceExecuteClusterDrsPlanProcedure = "/cloudstack.management.cluster.v1.ClusterService/ExecuteClusterDrsPlan" // ClusterServiceGenerateClusterDrsPlanProcedure is the fully-qualified name of the ClusterService's // GenerateClusterDrsPlan RPC. ClusterServiceGenerateClusterDrsPlanProcedure = "/cloudstack.management.cluster.v1.ClusterService/GenerateClusterDrsPlan" // ClusterServiceListClusterDrsPlanProcedure is the fully-qualified name of the ClusterService's // ListClusterDrsPlan RPC. ClusterServiceListClusterDrsPlanProcedure = "/cloudstack.management.cluster.v1.ClusterService/ListClusterDrsPlan" // ClusterServiceListClustersProcedure is the fully-qualified name of the ClusterService's // ListClusters RPC. ClusterServiceListClustersProcedure = "/cloudstack.management.cluster.v1.ClusterService/ListClusters" // ClusterServiceUpdateClusterProcedure is the fully-qualified name of the ClusterService's // UpdateCluster RPC. ClusterServiceUpdateClusterProcedure = "/cloudstack.management.cluster.v1.ClusterService/UpdateCluster" )
These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.
const (
// ClusterServiceName is the fully-qualified name of the ClusterService service.
ClusterServiceName = "cloudstack.management.cluster.v1.ClusterService"
)
Variables ¶
This section is empty.
Functions ¶
func NewClusterServiceHandler ¶
func NewClusterServiceHandler(svc ClusterServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewClusterServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.
By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.
Types ¶
type ClusterServiceClient ¶
type ClusterServiceClient interface { // AddCluster Adds a new cluster AddCluster(context.Context, *connect.Request[v1.AddClusterRequest]) (*connect.Response[v1.AddClusterResponse], error) // DeleteCluster Deletes a cluster. DeleteCluster(context.Context, *connect.Request[v1.DeleteClusterRequest]) (*connect.Response[v1.DeleteClusterResponse], error) // ExecuteClusterDrsPlan Execute DRS for a cluster. If there is another plan in progress for the same cluster, this command will fail. ExecuteClusterDrsPlan(context.Context, *connect.Request[v1.ExecuteClusterDrsPlanRequest]) (*connect.Response[v1.ExecuteClusterDrsPlanResponse], error) // GenerateClusterDrsPlan Generate DRS plan for a cluster GenerateClusterDrsPlan(context.Context, *connect.Request[v1.GenerateClusterDrsPlanRequest]) (*connect.Response[v1.GenerateClusterDrsPlanResponse], error) // ListClusterDrsPlan List DRS plans for a clusters ListClusterDrsPlan(context.Context, *connect.Request[v1.ListClusterDrsPlanRequest]) (*connect.Response[v1.ListClusterDrsPlanResponse], error) // ListClusters Lists clusters. ListClusters(context.Context, *connect.Request[v1.ListClustersRequest]) (*connect.Response[v1.ListClustersResponse], error) // UpdateCluster Updates an existing cluster UpdateCluster(context.Context, *connect.Request[v1.UpdateClusterRequest]) (*connect.Response[v1.UpdateClusterResponse], error) }
ClusterServiceClient is a client for the cloudstack.management.cluster.v1.ClusterService service.
func NewClusterServiceClient ¶
func NewClusterServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ClusterServiceClient
NewClusterServiceClient constructs a client for the cloudstack.management.cluster.v1.ClusterService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.
The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).
type ClusterServiceHandler ¶
type ClusterServiceHandler interface { // AddCluster Adds a new cluster AddCluster(context.Context, *connect.Request[v1.AddClusterRequest]) (*connect.Response[v1.AddClusterResponse], error) // DeleteCluster Deletes a cluster. DeleteCluster(context.Context, *connect.Request[v1.DeleteClusterRequest]) (*connect.Response[v1.DeleteClusterResponse], error) // ExecuteClusterDrsPlan Execute DRS for a cluster. If there is another plan in progress for the same cluster, this command will fail. ExecuteClusterDrsPlan(context.Context, *connect.Request[v1.ExecuteClusterDrsPlanRequest]) (*connect.Response[v1.ExecuteClusterDrsPlanResponse], error) // GenerateClusterDrsPlan Generate DRS plan for a cluster GenerateClusterDrsPlan(context.Context, *connect.Request[v1.GenerateClusterDrsPlanRequest]) (*connect.Response[v1.GenerateClusterDrsPlanResponse], error) // ListClusterDrsPlan List DRS plans for a clusters ListClusterDrsPlan(context.Context, *connect.Request[v1.ListClusterDrsPlanRequest]) (*connect.Response[v1.ListClusterDrsPlanResponse], error) // ListClusters Lists clusters. ListClusters(context.Context, *connect.Request[v1.ListClustersRequest]) (*connect.Response[v1.ListClustersResponse], error) // UpdateCluster Updates an existing cluster UpdateCluster(context.Context, *connect.Request[v1.UpdateClusterRequest]) (*connect.Response[v1.UpdateClusterResponse], error) }
ClusterServiceHandler is an implementation of the cloudstack.management.cluster.v1.ClusterService service.
type UnimplementedClusterServiceHandler ¶
type UnimplementedClusterServiceHandler struct{}
UnimplementedClusterServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedClusterServiceHandler) AddCluster ¶
func (UnimplementedClusterServiceHandler) AddCluster(context.Context, *connect.Request[v1.AddClusterRequest]) (*connect.Response[v1.AddClusterResponse], error)
func (UnimplementedClusterServiceHandler) DeleteCluster ¶
func (UnimplementedClusterServiceHandler) DeleteCluster(context.Context, *connect.Request[v1.DeleteClusterRequest]) (*connect.Response[v1.DeleteClusterResponse], error)
func (UnimplementedClusterServiceHandler) ExecuteClusterDrsPlan ¶
func (UnimplementedClusterServiceHandler) ExecuteClusterDrsPlan(context.Context, *connect.Request[v1.ExecuteClusterDrsPlanRequest]) (*connect.Response[v1.ExecuteClusterDrsPlanResponse], error)
func (UnimplementedClusterServiceHandler) GenerateClusterDrsPlan ¶
func (UnimplementedClusterServiceHandler) GenerateClusterDrsPlan(context.Context, *connect.Request[v1.GenerateClusterDrsPlanRequest]) (*connect.Response[v1.GenerateClusterDrsPlanResponse], error)
func (UnimplementedClusterServiceHandler) ListClusterDrsPlan ¶
func (UnimplementedClusterServiceHandler) ListClusterDrsPlan(context.Context, *connect.Request[v1.ListClusterDrsPlanRequest]) (*connect.Response[v1.ListClusterDrsPlanResponse], error)
func (UnimplementedClusterServiceHandler) ListClusters ¶
func (UnimplementedClusterServiceHandler) ListClusters(context.Context, *connect.Request[v1.ListClustersRequest]) (*connect.Response[v1.ListClustersResponse], error)
func (UnimplementedClusterServiceHandler) UpdateCluster ¶
func (UnimplementedClusterServiceHandler) UpdateCluster(context.Context, *connect.Request[v1.UpdateClusterRequest]) (*connect.Response[v1.UpdateClusterResponse], error)