infrav2connect

package
v0.0.39 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2026 License: MIT Imports: 6 Imported by: 6

Documentation

Index

Constants

View Source
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.

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 (
	// 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 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) WaitForMachineEvent added in v0.0.39

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