hostv1connect

package
v0.0.0-...-94cd6a6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// HostServiceAddHostProcedure is the fully-qualified name of the HostService's AddHost RPC.
	HostServiceAddHostProcedure = "/cloudstack.management.host.v1.HostService/AddHost"
	// HostServiceAddSecondaryStorageProcedure is the fully-qualified name of the HostService's
	// AddSecondaryStorage RPC.
	HostServiceAddSecondaryStorageProcedure = "/cloudstack.management.host.v1.HostService/AddSecondaryStorage"
	// HostServiceCancelHostAsDegradedProcedure is the fully-qualified name of the HostService's
	// CancelHostAsDegraded RPC.
	HostServiceCancelHostAsDegradedProcedure = "/cloudstack.management.host.v1.HostService/CancelHostAsDegraded"
	// HostServiceCancelHostMaintenanceProcedure is the fully-qualified name of the HostService's
	// CancelHostMaintenance RPC.
	HostServiceCancelHostMaintenanceProcedure = "/cloudstack.management.host.v1.HostService/CancelHostMaintenance"
	// HostServiceDeclareHostAsDegradedProcedure is the fully-qualified name of the HostService's
	// DeclareHostAsDegraded RPC.
	HostServiceDeclareHostAsDegradedProcedure = "/cloudstack.management.host.v1.HostService/DeclareHostAsDegraded"
	// HostServiceDeleteHostProcedure is the fully-qualified name of the HostService's DeleteHost RPC.
	HostServiceDeleteHostProcedure = "/cloudstack.management.host.v1.HostService/DeleteHost"
	// HostServiceFindHostsForMigrationProcedure is the fully-qualified name of the HostService's
	// FindHostsForMigration RPC.
	HostServiceFindHostsForMigrationProcedure = "/cloudstack.management.host.v1.HostService/FindHostsForMigration"
	// HostServiceListHostTagsProcedure is the fully-qualified name of the HostService's ListHostTags
	// RPC.
	HostServiceListHostTagsProcedure = "/cloudstack.management.host.v1.HostService/ListHostTags"
	// HostServiceListHostsProcedure is the fully-qualified name of the HostService's ListHosts RPC.
	HostServiceListHostsProcedure = "/cloudstack.management.host.v1.HostService/ListHosts"
	// HostServicePrepareForHostMaintenanceProcedure is the fully-qualified name of the HostService's
	// PrepareForHostMaintenance RPC.
	HostServicePrepareForHostMaintenanceProcedure = "/cloudstack.management.host.v1.HostService/PrepareForHostMaintenance"
	// HostServiceReconnectHostProcedure is the fully-qualified name of the HostService's ReconnectHost
	// RPC.
	HostServiceReconnectHostProcedure = "/cloudstack.management.host.v1.HostService/ReconnectHost"
	// HostServiceReleaseHostReservationProcedure is the fully-qualified name of the HostService's
	// ReleaseHostReservation RPC.
	HostServiceReleaseHostReservationProcedure = "/cloudstack.management.host.v1.HostService/ReleaseHostReservation"
	// HostServiceUpdateHostProcedure is the fully-qualified name of the HostService's UpdateHost RPC.
	HostServiceUpdateHostProcedure = "/cloudstack.management.host.v1.HostService/UpdateHost"
	// HostServiceUpdateHostPasswordProcedure is the fully-qualified name of the HostService's
	// UpdateHostPassword RPC.
	HostServiceUpdateHostPasswordProcedure = "/cloudstack.management.host.v1.HostService/UpdateHostPassword"
)

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.

View Source
const (
	// HostServiceName is the fully-qualified name of the HostService service.
	HostServiceName = "cloudstack.management.host.v1.HostService"
)

Variables

This section is empty.

Functions

func NewHostServiceHandler

func NewHostServiceHandler(svc HostServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewHostServiceHandler 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 HostServiceClient

type HostServiceClient interface {
	// AddHost Adds a new host.
	AddHost(context.Context, *connect.Request[v1.AddHostRequest]) (*connect.Response[v1.AddHostResponse], error)
	// AddSecondaryStorage Adds secondary storage.
	AddSecondaryStorage(context.Context, *connect.Request[v1.AddSecondaryStorageRequest]) (*connect.Response[v1.AddSecondaryStorageResponse], error)
	// CancelHostAsDegraded Cancel host status from 'Degraded'. Host will transit back to status 'Enabled'.
	CancelHostAsDegraded(context.Context, *connect.Request[v1.CancelHostAsDegradedRequest]) (*connect.Response[v1.CancelHostAsDegradedResponse], error)
	// CancelHostMaintenance Cancels host maintenance.
	CancelHostMaintenance(context.Context, *connect.Request[v1.CancelHostMaintenanceRequest]) (*connect.Response[v1.CancelHostMaintenanceResponse], error)
	// DeclareHostAsDegraded Declare host as 'Degraded'. Host must be on 'Disconnected' or 'Alert' state. The ADMIN must be sure that there are no VMs running on the respective host otherwise this command might corrupted VMs that were running on the 'Degraded' host.
	DeclareHostAsDegraded(context.Context, *connect.Request[v1.DeclareHostAsDegradedRequest]) (*connect.Response[v1.DeclareHostAsDegradedResponse], error)
	// DeleteHost Deletes a host.
	DeleteHost(context.Context, *connect.Request[v1.DeleteHostRequest]) (*connect.Response[v1.DeleteHostResponse], error)
	// FindHostsForMigration Find hosts suitable for migrating a virtual machine.
	FindHostsForMigration(context.Context, *connect.Request[v1.FindHostsForMigrationRequest]) (*connect.Response[v1.FindHostsForMigrationResponse], error)
	// ListHostTags Lists host tags
	ListHostTags(context.Context, *connect.Request[v1.ListHostTagsRequest]) (*connect.Response[v1.ListHostTagsResponse], error)
	// ListHosts Lists hosts.
	ListHosts(context.Context, *connect.Request[v1.ListHostsRequest]) (*connect.Response[v1.ListHostsResponse], error)
	// PrepareForHostMaintenance Prepares a host for maintenance.
	PrepareForHostMaintenance(context.Context, *connect.Request[v1.PrepareForHostMaintenanceRequest]) (*connect.Response[v1.PrepareForHostMaintenanceResponse], error)
	// ReconnectHost Reconnects a host.
	ReconnectHost(context.Context, *connect.Request[v1.ReconnectHostRequest]) (*connect.Response[v1.ReconnectHostResponse], error)
	// ReleaseHostReservation Releases host reservation.
	ReleaseHostReservation(context.Context, *connect.Request[v1.ReleaseHostReservationRequest]) (*connect.Response[v1.ReleaseHostReservationResponse], error)
	// UpdateHost Updates a host.
	UpdateHost(context.Context, *connect.Request[v1.UpdateHostRequest]) (*connect.Response[v1.UpdateHostResponse], error)
	// UpdateHostPassword Update password of a host/pool on management server.
	UpdateHostPassword(context.Context, *connect.Request[v1.UpdateHostPasswordRequest]) (*connect.Response[v1.UpdateHostPasswordResponse], error)
}

HostServiceClient is a client for the cloudstack.management.host.v1.HostService service.

func NewHostServiceClient

func NewHostServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) HostServiceClient

NewHostServiceClient constructs a client for the cloudstack.management.host.v1.HostService 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 HostServiceHandler

type HostServiceHandler interface {
	// AddHost Adds a new host.
	AddHost(context.Context, *connect.Request[v1.AddHostRequest]) (*connect.Response[v1.AddHostResponse], error)
	// AddSecondaryStorage Adds secondary storage.
	AddSecondaryStorage(context.Context, *connect.Request[v1.AddSecondaryStorageRequest]) (*connect.Response[v1.AddSecondaryStorageResponse], error)
	// CancelHostAsDegraded Cancel host status from 'Degraded'. Host will transit back to status 'Enabled'.
	CancelHostAsDegraded(context.Context, *connect.Request[v1.CancelHostAsDegradedRequest]) (*connect.Response[v1.CancelHostAsDegradedResponse], error)
	// CancelHostMaintenance Cancels host maintenance.
	CancelHostMaintenance(context.Context, *connect.Request[v1.CancelHostMaintenanceRequest]) (*connect.Response[v1.CancelHostMaintenanceResponse], error)
	// DeclareHostAsDegraded Declare host as 'Degraded'. Host must be on 'Disconnected' or 'Alert' state. The ADMIN must be sure that there are no VMs running on the respective host otherwise this command might corrupted VMs that were running on the 'Degraded' host.
	DeclareHostAsDegraded(context.Context, *connect.Request[v1.DeclareHostAsDegradedRequest]) (*connect.Response[v1.DeclareHostAsDegradedResponse], error)
	// DeleteHost Deletes a host.
	DeleteHost(context.Context, *connect.Request[v1.DeleteHostRequest]) (*connect.Response[v1.DeleteHostResponse], error)
	// FindHostsForMigration Find hosts suitable for migrating a virtual machine.
	FindHostsForMigration(context.Context, *connect.Request[v1.FindHostsForMigrationRequest]) (*connect.Response[v1.FindHostsForMigrationResponse], error)
	// ListHostTags Lists host tags
	ListHostTags(context.Context, *connect.Request[v1.ListHostTagsRequest]) (*connect.Response[v1.ListHostTagsResponse], error)
	// ListHosts Lists hosts.
	ListHosts(context.Context, *connect.Request[v1.ListHostsRequest]) (*connect.Response[v1.ListHostsResponse], error)
	// PrepareForHostMaintenance Prepares a host for maintenance.
	PrepareForHostMaintenance(context.Context, *connect.Request[v1.PrepareForHostMaintenanceRequest]) (*connect.Response[v1.PrepareForHostMaintenanceResponse], error)
	// ReconnectHost Reconnects a host.
	ReconnectHost(context.Context, *connect.Request[v1.ReconnectHostRequest]) (*connect.Response[v1.ReconnectHostResponse], error)
	// ReleaseHostReservation Releases host reservation.
	ReleaseHostReservation(context.Context, *connect.Request[v1.ReleaseHostReservationRequest]) (*connect.Response[v1.ReleaseHostReservationResponse], error)
	// UpdateHost Updates a host.
	UpdateHost(context.Context, *connect.Request[v1.UpdateHostRequest]) (*connect.Response[v1.UpdateHostResponse], error)
	// UpdateHostPassword Update password of a host/pool on management server.
	UpdateHostPassword(context.Context, *connect.Request[v1.UpdateHostPasswordRequest]) (*connect.Response[v1.UpdateHostPasswordResponse], error)
}

HostServiceHandler is an implementation of the cloudstack.management.host.v1.HostService service.

type UnimplementedHostServiceHandler

type UnimplementedHostServiceHandler struct{}

UnimplementedHostServiceHandler returns CodeUnimplemented from all methods.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL