v1connect

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// NetworkingServiceAddRouteProcedure is the fully-qualified name of the NetworkingService's
	// AddRoute RPC.
	NetworkingServiceAddRouteProcedure = "/core.control_plane.networking.v1.NetworkingService/AddRoute"
	// NetworkingServiceListRoutesProcedure is the fully-qualified name of the NetworkingService's
	// ListRoutes RPC.
	NetworkingServiceListRoutesProcedure = "/core.control_plane.networking.v1.NetworkingService/ListRoutes"
	// NetworkingServiceDeleteRouteProcedure is the fully-qualified name of the NetworkingService's
	// DeleteRoute RPC.
	NetworkingServiceDeleteRouteProcedure = "/core.control_plane.networking.v1.NetworkingService/DeleteRoute"
)

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 (
	// NetworkingServiceName is the fully-qualified name of the NetworkingService service.
	NetworkingServiceName = "core.control_plane.networking.v1.NetworkingService"
)

Variables

This section is empty.

Functions

func NewNetworkingServiceHandler

func NewNetworkingServiceHandler(svc NetworkingServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewNetworkingServiceHandler 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 NetworkingServiceClient

type NetworkingServiceClient interface {
	// Add route exposing an endpoint on the gateway and routing traffic to the correct process
	AddRoute(context.Context, *connect.Request[v1.AddRouteRequest]) (*connect.Response[v1.AddRouteResponse], error)
	// List all routes in the networking configuration
	ListRoutes(context.Context, *connect.Request[v1.ListRoutesRequest]) (*connect.Response[v1.ListRoutesResponse], error)
	// Delete a route from the networking configuration, requires the name of the route
	// and returns a response code to indicate the success of the operation
	DeleteRoute(context.Context, *connect.Request[v1.DeleteRouteRequest]) (*connect.Response[v1.DeleteRouteResponse], error)
}

NetworkingServiceClient is a client for the core.control_plane.networking.v1.NetworkingService service.

func NewNetworkingServiceClient

func NewNetworkingServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) NetworkingServiceClient

NewNetworkingServiceClient constructs a client for the core.control_plane.networking.v1.NetworkingService 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 NetworkingServiceHandler

type NetworkingServiceHandler interface {
	// Add route exposing an endpoint on the gateway and routing traffic to the correct process
	AddRoute(context.Context, *connect.Request[v1.AddRouteRequest]) (*connect.Response[v1.AddRouteResponse], error)
	// List all routes in the networking configuration
	ListRoutes(context.Context, *connect.Request[v1.ListRoutesRequest]) (*connect.Response[v1.ListRoutesResponse], error)
	// Delete a route from the networking configuration, requires the name of the route
	// and returns a response code to indicate the success of the operation
	DeleteRoute(context.Context, *connect.Request[v1.DeleteRouteRequest]) (*connect.Response[v1.DeleteRouteResponse], error)
}

NetworkingServiceHandler is an implementation of the core.control_plane.networking.v1.NetworkingService service.

type UnimplementedNetworkingServiceHandler

type UnimplementedNetworkingServiceHandler struct{}

UnimplementedNetworkingServiceHandler returns CodeUnimplemented from all methods.

Jump to

Keyboard shortcuts

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