Documentation
¶
Index ¶
- Constants
- func NewEngineServiceHandler(svc EngineServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- func NewPluginServiceHandler(svc PluginServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- func NewResolverServiceHandler(svc ResolverServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- type EngineServiceClient
- type EngineServiceHandler
- type PluginServiceClient
- type PluginServiceHandler
- type ResolverServiceClient
- type ResolverServiceHandler
- type UnimplementedEngineServiceHandler
- type UnimplementedPluginServiceHandler
- type UnimplementedResolverServiceHandler
Constants ¶
const ( // EngineServiceName is the fully-qualified name of the EngineService service. EngineServiceName = "resolver.v1.EngineService" // PluginServiceName is the fully-qualified name of the PluginService service. PluginServiceName = "resolver.v1.PluginService" // ResolverServiceName is the fully-qualified name of the ResolverService service. ResolverServiceName = "resolver.v1.ResolverService" )
const ( // EngineServiceRegisterPluginProcedure is the fully-qualified name of the EngineService's // RegisterPlugin RPC. EngineServiceRegisterPluginProcedure = "/resolver.v1.EngineService/RegisterPlugin" // PluginServiceShutdownProcedure is the fully-qualified name of the PluginService's Shutdown RPC. PluginServiceShutdownProcedure = "/resolver.v1.PluginService/Shutdown" // ResolverServiceGetSecretsProcedure is the fully-qualified name of the ResolverService's // GetSecrets RPC. ResolverServiceGetSecretsProcedure = "/resolver.v1.ResolverService/GetSecrets" )
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 NewEngineServiceHandler ¶
func NewEngineServiceHandler(svc EngineServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewEngineServiceHandler 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 NewPluginServiceHandler ¶
func NewPluginServiceHandler(svc PluginServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewPluginServiceHandler 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 NewResolverServiceHandler ¶
func NewResolverServiceHandler(svc ResolverServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewResolverServiceHandler 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 EngineServiceClient ¶
type EngineServiceClient interface {
// RegisterPlugin registers the plugin with the engine.
RegisterPlugin(context.Context, *connect.Request[v1.RegisterPluginRequest]) (*connect.Response[v1.RegisterPluginResponse], error)
}
EngineServiceClient is a client for the resolver.v1.EngineService service.
func NewEngineServiceClient ¶
func NewEngineServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) EngineServiceClient
NewEngineServiceClient constructs a client for the resolver.v1.EngineService 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 EngineServiceHandler ¶
type EngineServiceHandler interface {
// RegisterPlugin registers the plugin with the engine.
RegisterPlugin(context.Context, *connect.Request[v1.RegisterPluginRequest]) (*connect.Response[v1.RegisterPluginResponse], error)
}
EngineServiceHandler is an implementation of the resolver.v1.EngineService service.
type PluginServiceClient ¶
type PluginServiceClient interface {
// Shutdown a plugin (let it know the runtime is going down).
Shutdown(context.Context, *connect.Request[v1.ShutdownRequest]) (*connect.Response[v1.ShutdownResponse], error)
}
PluginServiceClient is a client for the resolver.v1.PluginService service.
func NewPluginServiceClient ¶
func NewPluginServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) PluginServiceClient
NewPluginServiceClient constructs a client for the resolver.v1.PluginService 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 PluginServiceHandler ¶
type PluginServiceHandler interface {
// Shutdown a plugin (let it know the runtime is going down).
Shutdown(context.Context, *connect.Request[v1.ShutdownRequest]) (*connect.Response[v1.ShutdownResponse], error)
}
PluginServiceHandler is an implementation of the resolver.v1.PluginService service.
type ResolverServiceClient ¶
type ResolverServiceClient interface {
// Resolve a secret by its ID.
GetSecrets(context.Context, *connect.Request[v1.GetSecretsRequest]) (*connect.Response[v1.GetSecretsResponse], error)
}
ResolverServiceClient is a client for the resolver.v1.ResolverService service.
func NewResolverServiceClient ¶
func NewResolverServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ResolverServiceClient
NewResolverServiceClient constructs a client for the resolver.v1.ResolverService 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 ResolverServiceHandler ¶
type ResolverServiceHandler interface {
// Resolve a secret by its ID.
GetSecrets(context.Context, *connect.Request[v1.GetSecretsRequest]) (*connect.Response[v1.GetSecretsResponse], error)
}
ResolverServiceHandler is an implementation of the resolver.v1.ResolverService service.
type UnimplementedEngineServiceHandler ¶
type UnimplementedEngineServiceHandler struct{}
UnimplementedEngineServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedEngineServiceHandler) RegisterPlugin ¶
func (UnimplementedEngineServiceHandler) RegisterPlugin(context.Context, *connect.Request[v1.RegisterPluginRequest]) (*connect.Response[v1.RegisterPluginResponse], error)
type UnimplementedPluginServiceHandler ¶
type UnimplementedPluginServiceHandler struct{}
UnimplementedPluginServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedPluginServiceHandler) Shutdown ¶
func (UnimplementedPluginServiceHandler) Shutdown(context.Context, *connect.Request[v1.ShutdownRequest]) (*connect.Response[v1.ShutdownResponse], error)
type UnimplementedResolverServiceHandler ¶
type UnimplementedResolverServiceHandler struct{}
UnimplementedResolverServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedResolverServiceHandler) GetSecrets ¶
func (UnimplementedResolverServiceHandler) GetSecrets(context.Context, *connect.Request[v1.GetSecretsRequest]) (*connect.Response[v1.GetSecretsResponse], error)