Documentation ¶
Index ¶
- Constants
- func NewManagementServiceHandler(svc ManagementServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- type ManagementServiceClient
- type ManagementServiceHandler
- type UnimplementedManagementServiceHandler
- func (UnimplementedManagementServiceHandler) GetComplexDeviceData(context.Context, *connect.Request[v1alpha1.GetComplexDeviceDataRequest]) (*connect.Response[v1alpha1.GetComplexDeviceDataResponse], error)
- func (UnimplementedManagementServiceHandler) GetConfiguration(context.Context, *connect.Request[v1alpha11.GetConfigurationRequest]) (*connect.Response[v1alpha11.GetConfigurationResponse], error)
- func (UnimplementedManagementServiceHandler) GetPowerState(context.Context, *connect.Request[v1alpha1.GetPowerStateRequest]) (*connect.Response[v1alpha1.GetPowerStateResponse], error)
- func (UnimplementedManagementServiceHandler) GetSimpleDeviceData(context.Context, *connect.Request[v1alpha1.GetSimpleDeviceDataRequest]) (*connect.Response[v1alpha1.GetSimpleDeviceDataResponse], error)
- func (UnimplementedManagementServiceHandler) GetVersion(context.Context, *connect.Request[v1alpha1.GetVersionRequest]) (*connect.Response[v1alpha1.GetVersionResponse], error)
- func (UnimplementedManagementServiceHandler) SetComplexDeviceData(context.Context, *connect.Request[v1alpha1.SetComplexDeviceDataRequest]) (*connect.Response[v1alpha1.SetComplexDeviceDataResponse], error)
- func (UnimplementedManagementServiceHandler) SetConfiguration(context.Context, *connect.Request[v1alpha11.SetConfigurationRequest]) (*connect.Response[v1alpha11.SetConfigurationResponse], error)
- func (UnimplementedManagementServiceHandler) SetPowerState(context.Context, *connect.Request[v1alpha1.SetPowerStateRequest]) (*connect.Response[v1alpha1.SetPowerStateResponse], error)
- func (UnimplementedManagementServiceHandler) SetSimpleDeviceData(context.Context, *connect.Request[v1alpha1.SetSimpleDeviceDataRequest]) (*connect.Response[v1alpha1.SetSimpleDeviceDataResponse], error)
- func (UnimplementedManagementServiceHandler) StreamConsole(context.Context, ...) error
- func (UnimplementedManagementServiceHandler) UpdateFirmware(context.Context, ...) error
Constants ¶
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.
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.
func (UnimplementedManagementServiceHandler) GetComplexDeviceData ¶
func (UnimplementedManagementServiceHandler) GetComplexDeviceData(context.Context, *connect.Request[v1alpha1.GetComplexDeviceDataRequest]) (*connect.Response[v1alpha1.GetComplexDeviceDataResponse], error)
func (UnimplementedManagementServiceHandler) GetConfiguration ¶
func (UnimplementedManagementServiceHandler) GetConfiguration(context.Context, *connect.Request[v1alpha11.GetConfigurationRequest]) (*connect.Response[v1alpha11.GetConfigurationResponse], error)
func (UnimplementedManagementServiceHandler) GetPowerState ¶
func (UnimplementedManagementServiceHandler) GetPowerState(context.Context, *connect.Request[v1alpha1.GetPowerStateRequest]) (*connect.Response[v1alpha1.GetPowerStateResponse], error)
func (UnimplementedManagementServiceHandler) GetSimpleDeviceData ¶
func (UnimplementedManagementServiceHandler) GetSimpleDeviceData(context.Context, *connect.Request[v1alpha1.GetSimpleDeviceDataRequest]) (*connect.Response[v1alpha1.GetSimpleDeviceDataResponse], error)
func (UnimplementedManagementServiceHandler) GetVersion ¶
func (UnimplementedManagementServiceHandler) GetVersion(context.Context, *connect.Request[v1alpha1.GetVersionRequest]) (*connect.Response[v1alpha1.GetVersionResponse], error)
func (UnimplementedManagementServiceHandler) SetComplexDeviceData ¶
func (UnimplementedManagementServiceHandler) SetComplexDeviceData(context.Context, *connect.Request[v1alpha1.SetComplexDeviceDataRequest]) (*connect.Response[v1alpha1.SetComplexDeviceDataResponse], error)
func (UnimplementedManagementServiceHandler) SetConfiguration ¶
func (UnimplementedManagementServiceHandler) SetConfiguration(context.Context, *connect.Request[v1alpha11.SetConfigurationRequest]) (*connect.Response[v1alpha11.SetConfigurationResponse], error)
func (UnimplementedManagementServiceHandler) SetPowerState ¶
func (UnimplementedManagementServiceHandler) SetPowerState(context.Context, *connect.Request[v1alpha1.SetPowerStateRequest]) (*connect.Response[v1alpha1.SetPowerStateResponse], error)
func (UnimplementedManagementServiceHandler) SetSimpleDeviceData ¶
func (UnimplementedManagementServiceHandler) SetSimpleDeviceData(context.Context, *connect.Request[v1alpha1.SetSimpleDeviceDataRequest]) (*connect.Response[v1alpha1.SetSimpleDeviceDataResponse], error)
func (UnimplementedManagementServiceHandler) StreamConsole ¶
func (UnimplementedManagementServiceHandler) StreamConsole(context.Context, *connect.BidiStream[v1alpha1.StreamConsoleRequest, v1alpha1.StreamConsoleResponse]) error
func (UnimplementedManagementServiceHandler) UpdateFirmware ¶
func (UnimplementedManagementServiceHandler) UpdateFirmware(context.Context, *connect.BidiStream[v1alpha1.UpdateFirmwareRequest, v1alpha1.UpdateFirmwareResponse]) error