infrav2connect

package
v0.0.49 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// BMCServiceUpdateBMCInfoProcedure is the fully-qualified name of the BMCService's UpdateBMCInfo
	// RPC.
	BMCServiceUpdateBMCInfoProcedure = "/metalstack.infra.v2.BMCService/UpdateBMCInfo"
	// BMCServiceWaitForBMCCommandProcedure is the fully-qualified name of the BMCService's
	// WaitForBMCCommand RPC.
	BMCServiceWaitForBMCCommandProcedure = "/metalstack.infra.v2.BMCService/WaitForBMCCommand"
	// BMCServiceBMCCommandDoneProcedure is the fully-qualified name of the BMCService's BMCCommandDone
	// RPC.
	BMCServiceBMCCommandDoneProcedure = "/metalstack.infra.v2.BMCService/BMCCommandDone"
)

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 (
	// BootServiceDhcpProcedure is the fully-qualified name of the BootService's Dhcp RPC.
	BootServiceDhcpProcedure = "/metalstack.infra.v2.BootService/Dhcp"
	// BootServiceBootProcedure is the fully-qualified name of the BootService's Boot RPC.
	BootServiceBootProcedure = "/metalstack.infra.v2.BootService/Boot"
	// BootServiceSuperUserPasswordProcedure is the fully-qualified name of the BootService's
	// SuperUserPassword RPC.
	BootServiceSuperUserPasswordProcedure = "/metalstack.infra.v2.BootService/SuperUserPassword"
	// BootServiceRegisterProcedure is the fully-qualified name of the BootService's Register RPC.
	BootServiceRegisterProcedure = "/metalstack.infra.v2.BootService/Register"
	// BootServiceWaitProcedure is the fully-qualified name of the BootService's Wait RPC.
	BootServiceWaitProcedure = "/metalstack.infra.v2.BootService/Wait"
	// BootServiceInstallationSucceededProcedure is the fully-qualified name of the BootService's
	// InstallationSucceeded RPC.
	BootServiceInstallationSucceededProcedure = "/metalstack.infra.v2.BootService/InstallationSucceeded"
)

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 (
	// 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.

View Source
const (
	// BMCServiceName is the fully-qualified name of the BMCService service.
	BMCServiceName = "metalstack.infra.v2.BMCService"
)
View Source
const (
	// BootServiceName is the fully-qualified name of the BootService service.
	BootServiceName = "metalstack.infra.v2.BootService"
)
View Source
const (
	// EventServiceName is the fully-qualified name of the EventService service.
	EventServiceName = "metalstack.infra.v2.EventService"
)
View Source
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.

View Source
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 NewBootServiceHandler added in v0.0.41

func NewBootServiceHandler(svc BootServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewBootServiceHandler 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)
	// WaitForBMCCommand is called by the metal-bmc and is returned with a bmc command to execute.
	WaitForBMCCommand(context.Context, *v2.WaitForBMCCommandRequest) (*connect.ServerStreamForClient[v2.WaitForBMCCommandResponse], error)
	// BMCCommandDone must be called from metal-bmc after the command execution
	BMCCommandDone(context.Context, *v2.BMCCommandDoneRequest) (*v2.BMCCommandDoneResponse, 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)
	// WaitForBMCCommand is called by the metal-bmc and is returned with a bmc command to execute.
	WaitForBMCCommand(context.Context, *v2.WaitForBMCCommandRequest, *connect.ServerStream[v2.WaitForBMCCommandResponse]) error
	// BMCCommandDone must be called from metal-bmc after the command execution
	BMCCommandDone(context.Context, *v2.BMCCommandDoneRequest) (*v2.BMCCommandDoneResponse, error)
}

BMCServiceHandler is an implementation of the metalstack.infra.v2.BMCService service.

type BootServiceClient added in v0.0.41

type BootServiceClient interface {
	// Dhcp is the first dhcp request (option 97). A ProvisioningEventPXEBooting is fired
	Dhcp(context.Context, *v2.BootServiceDhcpRequest) (*v2.BootServiceDhcpResponse, error)
	// Boot is called from pixie once the machine got the first dhcp response and ipxie asks for subsequent kernel and initrd
	Boot(context.Context, *v2.BootServiceBootRequest) (*v2.BootServiceBootResponse, error)
	// SuperUserPassword metal-hammer takes the configured root password for the bmc from metal-apiserver and configure the bmc accordingly
	SuperUserPassword(context.Context, *v2.BootServiceSuperUserPasswordRequest) (*v2.BootServiceSuperUserPasswordResponse, error)
	// Register is called from metal-hammer after hardware inventory is finished, tells metal-apiserver all gory details about that machine
	Register(context.Context, *v2.BootServiceRegisterRequest) (*v2.BootServiceRegisterResponse, error)
	// Wait is a hanging call that waits until the machine gets allocated by a user
	Wait(context.Context, *v2.BootServiceWaitRequest) (*connect.ServerStreamForClient[v2.BootServiceWaitResponse], error)
	// InstallationSucceeded tells metal-apiserver installation was either successful
	InstallationSucceeded(context.Context, *v2.BootServiceInstallationSucceededRequest) (*v2.BootServiceInstallationSucceededResponse, error)
}

BootServiceClient is a client for the metalstack.infra.v2.BootService service.

func NewBootServiceClient added in v0.0.41

func NewBootServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) BootServiceClient

NewBootServiceClient constructs a client for the metalstack.infra.v2.BootService 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 BootServiceHandler added in v0.0.41

type BootServiceHandler interface {
	// Dhcp is the first dhcp request (option 97). A ProvisioningEventPXEBooting is fired
	Dhcp(context.Context, *v2.BootServiceDhcpRequest) (*v2.BootServiceDhcpResponse, error)
	// Boot is called from pixie once the machine got the first dhcp response and ipxie asks for subsequent kernel and initrd
	Boot(context.Context, *v2.BootServiceBootRequest) (*v2.BootServiceBootResponse, error)
	// SuperUserPassword metal-hammer takes the configured root password for the bmc from metal-apiserver and configure the bmc accordingly
	SuperUserPassword(context.Context, *v2.BootServiceSuperUserPasswordRequest) (*v2.BootServiceSuperUserPasswordResponse, error)
	// Register is called from metal-hammer after hardware inventory is finished, tells metal-apiserver all gory details about that machine
	Register(context.Context, *v2.BootServiceRegisterRequest) (*v2.BootServiceRegisterResponse, error)
	// Wait is a hanging call that waits until the machine gets allocated by a user
	Wait(context.Context, *v2.BootServiceWaitRequest, *connect.ServerStream[v2.BootServiceWaitResponse]) error
	// InstallationSucceeded tells metal-apiserver installation was either successful
	InstallationSucceeded(context.Context, *v2.BootServiceInstallationSucceededRequest) (*v2.BootServiceInstallationSucceededResponse, error)
}

BootServiceHandler is an implementation of the metalstack.infra.v2.BootService 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) BMCCommandDone added in v0.0.41

func (UnimplementedBMCServiceHandler) UpdateBMCInfo

func (UnimplementedBMCServiceHandler) WaitForBMCCommand added in v0.0.41

type UnimplementedBootServiceHandler added in v0.0.41

type UnimplementedBootServiceHandler struct{}

UnimplementedBootServiceHandler returns CodeUnimplemented from all methods.

func (UnimplementedBootServiceHandler) Boot added in v0.0.41

func (UnimplementedBootServiceHandler) Dhcp added in v0.0.41

func (UnimplementedBootServiceHandler) Register added in v0.0.41

func (UnimplementedBootServiceHandler) SuperUserPassword added in v0.0.41

func (UnimplementedBootServiceHandler) Wait added in v0.0.41

type UnimplementedEventServiceHandler added in v0.0.36

type UnimplementedEventServiceHandler struct{}

UnimplementedEventServiceHandler returns CodeUnimplemented from all methods.

func (UnimplementedEventServiceHandler) Send added in v0.0.36

type UnimplementedSwitchServiceHandler added in v0.0.8

type UnimplementedSwitchServiceHandler struct{}

UnimplementedSwitchServiceHandler returns CodeUnimplemented from all methods.

func (UnimplementedSwitchServiceHandler) Get added in v0.0.29

func (UnimplementedSwitchServiceHandler) Heartbeat added in v0.0.23

func (UnimplementedSwitchServiceHandler) Register added in v0.0.8

Jump to

Keyboard shortcuts

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