Documentation
¶
Index ¶
- Constants
- func NewBMCServiceHandler(svc BMCServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- func NewEventServiceHandler(svc EventServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- func NewSwitchServiceHandler(svc SwitchServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- type BMCServiceClient
- type BMCServiceHandler
- type EventServiceClient
- type EventServiceHandler
- type SwitchServiceClient
- type SwitchServiceHandler
- type UnimplementedBMCServiceHandler
- type UnimplementedEventServiceHandler
- type UnimplementedSwitchServiceHandler
- func (UnimplementedSwitchServiceHandler) Get(context.Context, *v2.SwitchServiceGetRequest) (*v2.SwitchServiceGetResponse, error)
- func (UnimplementedSwitchServiceHandler) Heartbeat(context.Context, *v2.SwitchServiceHeartbeatRequest) (*v2.SwitchServiceHeartbeatResponse, error)
- func (UnimplementedSwitchServiceHandler) Register(context.Context, *v2.SwitchServiceRegisterRequest) (*v2.SwitchServiceRegisterResponse, error)
Constants ¶
const ( // BMCServiceUpdateBMCInfoProcedure is the fully-qualified name of the BMCService's UpdateBMCInfo // RPC. BMCServiceUpdateBMCInfoProcedure = "/metalstack.infra.v2.BMCService/UpdateBMCInfo" // BMCServiceWaitForMachineEventProcedure is the fully-qualified name of the BMCService's // WaitForMachineEvent RPC. BMCServiceWaitForMachineEventProcedure = "/metalstack.infra.v2.BMCService/WaitForMachineEvent" )
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 ( // SwitchServiceGetProcedure is the fully-qualified name of the SwitchService's Get RPC. SwitchServiceGetProcedure = "/metalstack.infra.v2.SwitchService/Get" // SwitchServiceRegisterProcedure is the fully-qualified name of the SwitchService's Register RPC. SwitchServiceRegisterProcedure = "/metalstack.infra.v2.SwitchService/Register" // SwitchServiceHeartbeatProcedure is the fully-qualified name of the SwitchService's Heartbeat RPC. SwitchServiceHeartbeatProcedure = "/metalstack.infra.v2.SwitchService/Heartbeat" )
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 (
// BMCServiceName is the fully-qualified name of the BMCService service.
BMCServiceName = "metalstack.infra.v2.BMCService"
)
const (
// EventServiceName is the fully-qualified name of the EventService service.
EventServiceName = "metalstack.infra.v2.EventService"
)
const (
// EventServiceSendProcedure is the fully-qualified name of the EventService's Send RPC.
EventServiceSendProcedure = "/metalstack.infra.v2.EventService/Send"
)
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 (
// SwitchServiceName is the fully-qualified name of the SwitchService service.
SwitchServiceName = "metalstack.infra.v2.SwitchService"
)
Variables ¶
This section is empty.
Functions ¶
func NewBMCServiceHandler ¶
func NewBMCServiceHandler(svc BMCServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewBMCServiceHandler 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.
func NewEventServiceHandler ¶ added in v0.0.36
func NewEventServiceHandler(svc EventServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewEventServiceHandler 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.
func NewSwitchServiceHandler ¶ added in v0.0.8
func NewSwitchServiceHandler(svc SwitchServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewSwitchServiceHandler 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 BMCServiceClient ¶
type BMCServiceClient interface {
// UpdateBMCInfo
UpdateBMCInfo(context.Context, *v2.UpdateBMCInfoRequest) (*v2.UpdateBMCInfoResponse, error)
// WaitForMachineEvent is called by the metal-bmc and is returned with a bmc command to execute.
WaitForMachineEvent(context.Context, *v2.WaitForMachineEventRequest) (*connect.ServerStreamForClient[v2.WaitForMachineEventResponse], error)
}
BMCServiceClient is a client for the metalstack.infra.v2.BMCService service.
func NewBMCServiceClient ¶
func NewBMCServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) BMCServiceClient
NewBMCServiceClient constructs a client for the metalstack.infra.v2.BMCService 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 BMCServiceHandler ¶
type BMCServiceHandler interface {
// UpdateBMCInfo
UpdateBMCInfo(context.Context, *v2.UpdateBMCInfoRequest) (*v2.UpdateBMCInfoResponse, error)
// WaitForMachineEvent is called by the metal-bmc and is returned with a bmc command to execute.
WaitForMachineEvent(context.Context, *v2.WaitForMachineEventRequest, *connect.ServerStream[v2.WaitForMachineEventResponse]) error
}
BMCServiceHandler is an implementation of the metalstack.infra.v2.BMCService service.
type EventServiceClient ¶ added in v0.0.36
type EventServiceClient interface {
// Send a series of machine provisioning events.
Send(context.Context, *v2.EventServiceSendRequest) (*v2.EventServiceSendResponse, error)
}
EventServiceClient is a client for the metalstack.infra.v2.EventService service.
func NewEventServiceClient ¶ added in v0.0.36
func NewEventServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) EventServiceClient
NewEventServiceClient constructs a client for the metalstack.infra.v2.EventService 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 EventServiceHandler ¶ added in v0.0.36
type EventServiceHandler interface {
// Send a series of machine provisioning events.
Send(context.Context, *v2.EventServiceSendRequest) (*v2.EventServiceSendResponse, error)
}
EventServiceHandler is an implementation of the metalstack.infra.v2.EventService service.
type SwitchServiceClient ¶ added in v0.0.8
type SwitchServiceClient interface {
// Get a switch by ID.
Get(context.Context, *v2.SwitchServiceGetRequest) (*v2.SwitchServiceGetResponse, error)
// Register a switch.
Register(context.Context, *v2.SwitchServiceRegisterRequest) (*v2.SwitchServiceRegisterResponse, error)
// Heartbeat a switch.
Heartbeat(context.Context, *v2.SwitchServiceHeartbeatRequest) (*v2.SwitchServiceHeartbeatResponse, error)
}
SwitchServiceClient is a client for the metalstack.infra.v2.SwitchService service.
func NewSwitchServiceClient ¶ added in v0.0.8
func NewSwitchServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) SwitchServiceClient
NewSwitchServiceClient constructs a client for the metalstack.infra.v2.SwitchService 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 SwitchServiceHandler ¶ added in v0.0.8
type SwitchServiceHandler interface {
// Get a switch by ID.
Get(context.Context, *v2.SwitchServiceGetRequest) (*v2.SwitchServiceGetResponse, error)
// Register a switch.
Register(context.Context, *v2.SwitchServiceRegisterRequest) (*v2.SwitchServiceRegisterResponse, error)
// Heartbeat a switch.
Heartbeat(context.Context, *v2.SwitchServiceHeartbeatRequest) (*v2.SwitchServiceHeartbeatResponse, error)
}
SwitchServiceHandler is an implementation of the metalstack.infra.v2.SwitchService service.
type UnimplementedBMCServiceHandler ¶
type UnimplementedBMCServiceHandler struct{}
UnimplementedBMCServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedBMCServiceHandler) UpdateBMCInfo ¶
func (UnimplementedBMCServiceHandler) UpdateBMCInfo(context.Context, *v2.UpdateBMCInfoRequest) (*v2.UpdateBMCInfoResponse, error)
func (UnimplementedBMCServiceHandler) WaitForMachineEvent ¶ added in v0.0.39
func (UnimplementedBMCServiceHandler) WaitForMachineEvent(context.Context, *v2.WaitForMachineEventRequest, *connect.ServerStream[v2.WaitForMachineEventResponse]) error
type UnimplementedEventServiceHandler ¶ added in v0.0.36
type UnimplementedEventServiceHandler struct{}
UnimplementedEventServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedEventServiceHandler) Send ¶ added in v0.0.36
func (UnimplementedEventServiceHandler) Send(context.Context, *v2.EventServiceSendRequest) (*v2.EventServiceSendResponse, error)
type UnimplementedSwitchServiceHandler ¶ added in v0.0.8
type UnimplementedSwitchServiceHandler struct{}
UnimplementedSwitchServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedSwitchServiceHandler) Heartbeat ¶ added in v0.0.23
func (UnimplementedSwitchServiceHandler) Heartbeat(context.Context, *v2.SwitchServiceHeartbeatRequest) (*v2.SwitchServiceHeartbeatResponse, error)
func (UnimplementedSwitchServiceHandler) Register ¶ added in v0.0.8
func (UnimplementedSwitchServiceHandler) Register(context.Context, *v2.SwitchServiceRegisterRequest) (*v2.SwitchServiceRegisterResponse, error)