managementv1alpha1connect

package
v0.0.0-...-fe9013e Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ManagementServiceGetVersionProcedure is the fully-qualified name of the ManagementService's
	// GetVersion RPC.
	ManagementServiceGetVersionProcedure = "/management.v1alpha1.ManagementService/GetVersion"
	// ManagementServiceStreamConsoleProcedure is the fully-qualified name of the ManagementService's
	// StreamConsole RPC.
	ManagementServiceStreamConsoleProcedure = "/management.v1alpha1.ManagementService/StreamConsole"
	// ManagementServiceGetPowerStateProcedure is the fully-qualified name of the ManagementService's
	// GetPowerState RPC.
	ManagementServiceGetPowerStateProcedure = "/management.v1alpha1.ManagementService/GetPowerState"
	// ManagementServiceSetPowerStateProcedure is the fully-qualified name of the ManagementService's
	// SetPowerState RPC.
	ManagementServiceSetPowerStateProcedure = "/management.v1alpha1.ManagementService/SetPowerState"
	// ManagementServiceUpdateFirmwareProcedure is the fully-qualified name of the ManagementService's
	// UpdateFirmware RPC.
	ManagementServiceUpdateFirmwareProcedure = "/management.v1alpha1.ManagementService/UpdateFirmware"
	// ManagementServiceGetSimpleDeviceDataProcedure is the fully-qualified name of the
	// ManagementService's GetSimpleDeviceData RPC.
	ManagementServiceGetSimpleDeviceDataProcedure = "/management.v1alpha1.ManagementService/GetSimpleDeviceData"
	// ManagementServiceSetSimpleDeviceDataProcedure is the fully-qualified name of the
	// ManagementService's SetSimpleDeviceData RPC.
	ManagementServiceSetSimpleDeviceDataProcedure = "/management.v1alpha1.ManagementService/SetSimpleDeviceData"
	// ManagementServiceGetComplexDeviceDataProcedure is the fully-qualified name of the
	// ManagementService's GetComplexDeviceData RPC.
	ManagementServiceGetComplexDeviceDataProcedure = "/management.v1alpha1.ManagementService/GetComplexDeviceData"
	// ManagementServiceSetComplexDeviceDataProcedure is the fully-qualified name of the
	// ManagementService's SetComplexDeviceData RPC.
	ManagementServiceSetComplexDeviceDataProcedure = "/management.v1alpha1.ManagementService/SetComplexDeviceData"
	// ManagementServiceGetConfigurationProcedure is the fully-qualified name of the ManagementService's
	// GetConfiguration RPC.
	ManagementServiceGetConfigurationProcedure = "/management.v1alpha1.ManagementService/GetConfiguration"
	// ManagementServiceSetConfigurationProcedure is the fully-qualified name of the ManagementService's
	// SetConfiguration RPC.
	ManagementServiceSetConfigurationProcedure = "/management.v1alpha1.ManagementService/SetConfiguration"
)

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 (
	// ManagementServiceName is the fully-qualified name of the ManagementService service.
	ManagementServiceName = "management.v1alpha1.ManagementService"
)

Variables

This section is empty.

Functions

func NewManagementServiceHandler

func NewManagementServiceHandler(svc ManagementServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewManagementServiceHandler 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 ManagementServiceClient

type ManagementServiceClient interface {
	GetVersion(context.Context, *connect.Request[v1alpha1.GetVersionRequest]) (*connect.Response[v1alpha1.GetVersionResponse], error)
	StreamConsole(context.Context) *connect.BidiStreamForClient[v1alpha1.StreamConsoleRequest, v1alpha1.StreamConsoleResponse]
	GetPowerState(context.Context, *connect.Request[v1alpha1.GetPowerStateRequest]) (*connect.Response[v1alpha1.GetPowerStateResponse], error)
	SetPowerState(context.Context, *connect.Request[v1alpha1.SetPowerStateRequest]) (*connect.Response[v1alpha1.SetPowerStateResponse], error)
	UpdateFirmware(context.Context) *connect.BidiStreamForClient[v1alpha1.UpdateFirmwareRequest, v1alpha1.UpdateFirmwareResponse]
	GetSimpleDeviceData(context.Context, *connect.Request[v1alpha1.GetSimpleDeviceDataRequest]) (*connect.Response[v1alpha1.GetSimpleDeviceDataResponse], error)
	SetSimpleDeviceData(context.Context, *connect.Request[v1alpha1.SetSimpleDeviceDataRequest]) (*connect.Response[v1alpha1.SetSimpleDeviceDataResponse], error)
	GetComplexDeviceData(context.Context, *connect.Request[v1alpha1.GetComplexDeviceDataRequest]) (*connect.Response[v1alpha1.GetComplexDeviceDataResponse], error)
	SetComplexDeviceData(context.Context, *connect.Request[v1alpha1.SetComplexDeviceDataRequest]) (*connect.Response[v1alpha1.SetComplexDeviceDataResponse], error)
	GetConfiguration(context.Context, *connect.Request[v1alpha11.GetConfigurationRequest]) (*connect.Response[v1alpha11.GetConfigurationResponse], error)
	SetConfiguration(context.Context, *connect.Request[v1alpha11.SetConfigurationRequest]) (*connect.Response[v1alpha11.SetConfigurationResponse], error)
}

ManagementServiceClient is a client for the management.v1alpha1.ManagementService service.

func NewManagementServiceClient

func NewManagementServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ManagementServiceClient

NewManagementServiceClient constructs a client for the management.v1alpha1.ManagementService 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 ManagementServiceHandler

type ManagementServiceHandler interface {
	GetVersion(context.Context, *connect.Request[v1alpha1.GetVersionRequest]) (*connect.Response[v1alpha1.GetVersionResponse], error)
	StreamConsole(context.Context, *connect.BidiStream[v1alpha1.StreamConsoleRequest, v1alpha1.StreamConsoleResponse]) error
	GetPowerState(context.Context, *connect.Request[v1alpha1.GetPowerStateRequest]) (*connect.Response[v1alpha1.GetPowerStateResponse], error)
	SetPowerState(context.Context, *connect.Request[v1alpha1.SetPowerStateRequest]) (*connect.Response[v1alpha1.SetPowerStateResponse], error)
	UpdateFirmware(context.Context, *connect.BidiStream[v1alpha1.UpdateFirmwareRequest, v1alpha1.UpdateFirmwareResponse]) error
	GetSimpleDeviceData(context.Context, *connect.Request[v1alpha1.GetSimpleDeviceDataRequest]) (*connect.Response[v1alpha1.GetSimpleDeviceDataResponse], error)
	SetSimpleDeviceData(context.Context, *connect.Request[v1alpha1.SetSimpleDeviceDataRequest]) (*connect.Response[v1alpha1.SetSimpleDeviceDataResponse], error)
	GetComplexDeviceData(context.Context, *connect.Request[v1alpha1.GetComplexDeviceDataRequest]) (*connect.Response[v1alpha1.GetComplexDeviceDataResponse], error)
	SetComplexDeviceData(context.Context, *connect.Request[v1alpha1.SetComplexDeviceDataRequest]) (*connect.Response[v1alpha1.SetComplexDeviceDataResponse], error)
	GetConfiguration(context.Context, *connect.Request[v1alpha11.GetConfigurationRequest]) (*connect.Response[v1alpha11.GetConfigurationResponse], error)
	SetConfiguration(context.Context, *connect.Request[v1alpha11.SetConfigurationRequest]) (*connect.Response[v1alpha11.SetConfigurationResponse], error)
}

ManagementServiceHandler is an implementation of the management.v1alpha1.ManagementService service.

type UnimplementedManagementServiceHandler

type UnimplementedManagementServiceHandler struct{}

UnimplementedManagementServiceHandler returns CodeUnimplemented from all methods.

Jump to

Keyboard shortcuts

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