Documentation ¶
Index ¶
- Constants
- func NewControllerMeshHandler(svc ControllerMeshHandler, opts ...connect.HandlerOption) (string, http.Handler)
- func NewThrottlingHandler(svc ThrottlingHandler, opts ...connect.HandlerOption) (string, http.Handler)
- type ControllerMeshClient
- type ControllerMeshHandler
- type ThrottlingClient
- type ThrottlingHandler
- type UnimplementedControllerMeshHandler
- type UnimplementedThrottlingHandler
Constants ¶
const (
// ControllerMeshName is the fully-qualified name of the ControllerMesh service.
ControllerMeshName = "proto.ControllerMesh"
)
const (
// ControllerMeshRegisterProcedure is the fully-qualified name of the ControllerMesh's Register RPC.
ControllerMeshRegisterProcedure = "/proto.ControllerMesh/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.
const (
// ThrottlingName is the fully-qualified name of the Throttling service.
ThrottlingName = "proto.Throttling"
)
const (
// ThrottlingSendConfigProcedure is the fully-qualified name of the Throttling's SendConfig RPC.
ThrottlingSendConfigProcedure = "/proto.Throttling/SendConfig"
)
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 NewControllerMeshHandler ¶
func NewControllerMeshHandler(svc ControllerMeshHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewControllerMeshHandler 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 NewThrottlingHandler ¶
func NewThrottlingHandler(svc ThrottlingHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewThrottlingHandler 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 ControllerMeshClient ¶
type ControllerMeshClient interface {
Register(context.Context) *connect.BidiStreamForClient[proto.ProxyStatus, proto.ProxySpec]
}
ControllerMeshClient is a client for the proto.ControllerMesh service.
func NewControllerMeshClient ¶
func NewControllerMeshClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ControllerMeshClient
NewControllerMeshClient constructs a client for the proto.ControllerMesh 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 ControllerMeshHandler ¶
type ControllerMeshHandler interface {
Register(context.Context, *connect.BidiStream[proto.ProxyStatus, proto.ProxySpec]) error
}
ControllerMeshHandler is an implementation of the proto.ControllerMesh service.
type ThrottlingClient ¶
type ThrottlingClient interface {
SendConfig(context.Context, *connect.Request[proto.CircuitBreaker]) (*connect.Response[proto.ConfigResp], error)
}
ThrottlingClient is a client for the proto.Throttling service.
func NewThrottlingClient ¶
func NewThrottlingClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ThrottlingClient
NewThrottlingClient constructs a client for the proto.Throttling 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 ThrottlingHandler ¶
type ThrottlingHandler interface {
SendConfig(context.Context, *connect.Request[proto.CircuitBreaker]) (*connect.Response[proto.ConfigResp], error)
}
ThrottlingHandler is an implementation of the proto.Throttling service.
type UnimplementedControllerMeshHandler ¶
type UnimplementedControllerMeshHandler struct{}
UnimplementedControllerMeshHandler returns CodeUnimplemented from all methods.
func (UnimplementedControllerMeshHandler) Register ¶
func (UnimplementedControllerMeshHandler) Register(context.Context, *connect.BidiStream[proto.ProxyStatus, proto.ProxySpec]) error
type UnimplementedThrottlingHandler ¶
type UnimplementedThrottlingHandler struct{}
UnimplementedThrottlingHandler returns CodeUnimplemented from all methods.
func (UnimplementedThrottlingHandler) SendConfig ¶
func (UnimplementedThrottlingHandler) SendConfig(context.Context, *connect.Request[proto.CircuitBreaker]) (*connect.Response[proto.ConfigResp], error)