infrav2connect

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2025 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

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

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"
)
View Source
const (
	// SwitchServiceRegisterProcedure is the fully-qualified name of the SwitchService's Register RPC.
	SwitchServiceRegisterProcedure = "/metalstack.infra.v2.SwitchService/Register"
)

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.

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 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, *connect.Request[v2.UpdateBMCInfoRequest]) (*connect.Response[v2.UpdateBMCInfoResponse], 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, *connect.Request[v2.UpdateBMCInfoRequest]) (*connect.Response[v2.UpdateBMCInfoResponse], error)
}

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

type SwitchServiceClient added in v0.0.8

type SwitchServiceClient interface {
	// Register a switch
	Register(context.Context, *connect.Request[v2.SwitchServiceRegisterRequest]) (*connect.Response[v2.SwitchServiceRegisterResponse], 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 {
	// Register a switch
	Register(context.Context, *connect.Request[v2.SwitchServiceRegisterRequest]) (*connect.Response[v2.SwitchServiceRegisterResponse], error)
}

SwitchServiceHandler is an implementation of the metalstack.infra.v2.SwitchService service.

type UnimplementedBMCServiceHandler

type UnimplementedBMCServiceHandler struct{}

UnimplementedBMCServiceHandler returns CodeUnimplemented from all methods.

type UnimplementedSwitchServiceHandler added in v0.0.8

type UnimplementedSwitchServiceHandler struct{}

UnimplementedSwitchServiceHandler returns CodeUnimplemented from all methods.

Jump to

Keyboard shortcuts

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