Documentation ¶
Index ¶
- Constants
- func NewPluginServiceHandler(svc PluginServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- func NewRequestServiceHandler(svc RequestServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- type PluginServiceClient
- type PluginServiceHandler
- type RequestServiceClient
- type RequestServiceHandler
- type UnimplementedPluginServiceHandler
- func (UnimplementedPluginServiceHandler) ComputeConfig(context.Context, *connect.Request[plugin.ComputeConfigRequest]) (*connect.Response[plugin.ComputeConfigResponse], error)
- func (UnimplementedPluginServiceHandler) Initialize(context.Context, *connect.Request[plugin.InitializeRequest]) (*connect.Response[plugin.InitializeResponse], error)
- func (UnimplementedPluginServiceHandler) RunCapsule(context.Context, *connect.Request[plugin.RunCapsuleRequest]) (*connect.Response[plugin.RunCapsuleResponse], error)
- func (UnimplementedPluginServiceHandler) WatchObjectStatus(context.Context, *connect.Request[plugin.WatchObjectStatusRequest], ...) error
- type UnimplementedRequestServiceHandler
- func (UnimplementedRequestServiceHandler) DeleteObject(context.Context, *connect.Request[plugin.DeleteObjectRequest]) (*connect.Response[plugin.DeleteObjectResponse], error)
- func (UnimplementedRequestServiceHandler) GetObject(context.Context, *connect.Request[plugin.GetObjectRequest]) (*connect.Response[plugin.GetObjectResponse], error)
- func (UnimplementedRequestServiceHandler) ListObjects(context.Context, *connect.Request[plugin.ListObjectsRequest]) (*connect.Response[plugin.ListObjectsResponse], error)
- func (UnimplementedRequestServiceHandler) MarkUsedObject(context.Context, *connect.Request[plugin.MarkUsedObjectRequest]) (*connect.Response[plugin.MarkUsedObjectResponse], error)
- func (UnimplementedRequestServiceHandler) SetObject(context.Context, *connect.Request[plugin.SetObjectRequest]) (*connect.Response[plugin.SetObjectResponse], error)
Constants ¶
const ( // PluginServiceName is the fully-qualified name of the PluginService service. PluginServiceName = "api.v1.plugin.PluginService" // RequestServiceName is the fully-qualified name of the RequestService service. RequestServiceName = "api.v1.plugin.RequestService" )
const ( // PluginServiceInitializeProcedure is the fully-qualified name of the PluginService's Initialize // RPC. PluginServiceInitializeProcedure = "/api.v1.plugin.PluginService/Initialize" // PluginServiceRunCapsuleProcedure is the fully-qualified name of the PluginService's RunCapsule // RPC. PluginServiceRunCapsuleProcedure = "/api.v1.plugin.PluginService/RunCapsule" // PluginServiceWatchObjectStatusProcedure is the fully-qualified name of the PluginService's // WatchObjectStatus RPC. PluginServiceWatchObjectStatusProcedure = "/api.v1.plugin.PluginService/WatchObjectStatus" // PluginServiceComputeConfigProcedure is the fully-qualified name of the PluginService's // ComputeConfig RPC. PluginServiceComputeConfigProcedure = "/api.v1.plugin.PluginService/ComputeConfig" // RequestServiceGetObjectProcedure is the fully-qualified name of the RequestService's GetObject // RPC. RequestServiceGetObjectProcedure = "/api.v1.plugin.RequestService/GetObject" // RequestServiceSetObjectProcedure is the fully-qualified name of the RequestService's SetObject // RPC. RequestServiceSetObjectProcedure = "/api.v1.plugin.RequestService/SetObject" // RequestServiceDeleteObjectProcedure is the fully-qualified name of the RequestService's // DeleteObject RPC. RequestServiceDeleteObjectProcedure = "/api.v1.plugin.RequestService/DeleteObject" // RequestServiceMarkUsedObjectProcedure is the fully-qualified name of the RequestService's // MarkUsedObject RPC. RequestServiceMarkUsedObjectProcedure = "/api.v1.plugin.RequestService/MarkUsedObject" // RequestServiceListObjectsProcedure is the fully-qualified name of the RequestService's // ListObjects RPC. RequestServiceListObjectsProcedure = "/api.v1.plugin.RequestService/ListObjects" )
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 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 NewRequestServiceHandler ¶
func NewRequestServiceHandler(svc RequestServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewRequestServiceHandler 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 PluginServiceClient ¶
type PluginServiceClient interface { Initialize(context.Context, *connect.Request[plugin.InitializeRequest]) (*connect.Response[plugin.InitializeResponse], error) RunCapsule(context.Context, *connect.Request[plugin.RunCapsuleRequest]) (*connect.Response[plugin.RunCapsuleResponse], error) WatchObjectStatus(context.Context, *connect.Request[plugin.WatchObjectStatusRequest]) (*connect.ServerStreamForClient[plugin.WatchObjectStatusResponse], error) ComputeConfig(context.Context, *connect.Request[plugin.ComputeConfigRequest]) (*connect.Response[plugin.ComputeConfigResponse], error) }
PluginServiceClient is a client for the api.v1.plugin.PluginService service.
func NewPluginServiceClient ¶
func NewPluginServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) PluginServiceClient
NewPluginServiceClient constructs a client for the api.v1.plugin.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 { Initialize(context.Context, *connect.Request[plugin.InitializeRequest]) (*connect.Response[plugin.InitializeResponse], error) RunCapsule(context.Context, *connect.Request[plugin.RunCapsuleRequest]) (*connect.Response[plugin.RunCapsuleResponse], error) WatchObjectStatus(context.Context, *connect.Request[plugin.WatchObjectStatusRequest], *connect.ServerStream[plugin.WatchObjectStatusResponse]) error ComputeConfig(context.Context, *connect.Request[plugin.ComputeConfigRequest]) (*connect.Response[plugin.ComputeConfigResponse], error) }
PluginServiceHandler is an implementation of the api.v1.plugin.PluginService service.
type RequestServiceClient ¶
type RequestServiceClient interface { GetObject(context.Context, *connect.Request[plugin.GetObjectRequest]) (*connect.Response[plugin.GetObjectResponse], error) SetObject(context.Context, *connect.Request[plugin.SetObjectRequest]) (*connect.Response[plugin.SetObjectResponse], error) DeleteObject(context.Context, *connect.Request[plugin.DeleteObjectRequest]) (*connect.Response[plugin.DeleteObjectResponse], error) MarkUsedObject(context.Context, *connect.Request[plugin.MarkUsedObjectRequest]) (*connect.Response[plugin.MarkUsedObjectResponse], error) ListObjects(context.Context, *connect.Request[plugin.ListObjectsRequest]) (*connect.Response[plugin.ListObjectsResponse], error) }
RequestServiceClient is a client for the api.v1.plugin.RequestService service.
func NewRequestServiceClient ¶
func NewRequestServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) RequestServiceClient
NewRequestServiceClient constructs a client for the api.v1.plugin.RequestService 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 RequestServiceHandler ¶
type RequestServiceHandler interface { GetObject(context.Context, *connect.Request[plugin.GetObjectRequest]) (*connect.Response[plugin.GetObjectResponse], error) SetObject(context.Context, *connect.Request[plugin.SetObjectRequest]) (*connect.Response[plugin.SetObjectResponse], error) DeleteObject(context.Context, *connect.Request[plugin.DeleteObjectRequest]) (*connect.Response[plugin.DeleteObjectResponse], error) MarkUsedObject(context.Context, *connect.Request[plugin.MarkUsedObjectRequest]) (*connect.Response[plugin.MarkUsedObjectResponse], error) ListObjects(context.Context, *connect.Request[plugin.ListObjectsRequest]) (*connect.Response[plugin.ListObjectsResponse], error) }
RequestServiceHandler is an implementation of the api.v1.plugin.RequestService service.
type UnimplementedPluginServiceHandler ¶
type UnimplementedPluginServiceHandler struct{}
UnimplementedPluginServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedPluginServiceHandler) ComputeConfig ¶
func (UnimplementedPluginServiceHandler) ComputeConfig(context.Context, *connect.Request[plugin.ComputeConfigRequest]) (*connect.Response[plugin.ComputeConfigResponse], error)
func (UnimplementedPluginServiceHandler) Initialize ¶
func (UnimplementedPluginServiceHandler) Initialize(context.Context, *connect.Request[plugin.InitializeRequest]) (*connect.Response[plugin.InitializeResponse], error)
func (UnimplementedPluginServiceHandler) RunCapsule ¶
func (UnimplementedPluginServiceHandler) RunCapsule(context.Context, *connect.Request[plugin.RunCapsuleRequest]) (*connect.Response[plugin.RunCapsuleResponse], error)
func (UnimplementedPluginServiceHandler) WatchObjectStatus ¶
func (UnimplementedPluginServiceHandler) WatchObjectStatus(context.Context, *connect.Request[plugin.WatchObjectStatusRequest], *connect.ServerStream[plugin.WatchObjectStatusResponse]) error
type UnimplementedRequestServiceHandler ¶
type UnimplementedRequestServiceHandler struct{}
UnimplementedRequestServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedRequestServiceHandler) DeleteObject ¶
func (UnimplementedRequestServiceHandler) DeleteObject(context.Context, *connect.Request[plugin.DeleteObjectRequest]) (*connect.Response[plugin.DeleteObjectResponse], error)
func (UnimplementedRequestServiceHandler) GetObject ¶
func (UnimplementedRequestServiceHandler) GetObject(context.Context, *connect.Request[plugin.GetObjectRequest]) (*connect.Response[plugin.GetObjectResponse], error)
func (UnimplementedRequestServiceHandler) ListObjects ¶
func (UnimplementedRequestServiceHandler) ListObjects(context.Context, *connect.Request[plugin.ListObjectsRequest]) (*connect.Response[plugin.ListObjectsResponse], error)
func (UnimplementedRequestServiceHandler) MarkUsedObject ¶
func (UnimplementedRequestServiceHandler) MarkUsedObject(context.Context, *connect.Request[plugin.MarkUsedObjectRequest]) (*connect.Response[plugin.MarkUsedObjectResponse], error)
func (UnimplementedRequestServiceHandler) SetObject ¶
func (UnimplementedRequestServiceHandler) SetObject(context.Context, *connect.Request[plugin.SetObjectRequest]) (*connect.Response[plugin.SetObjectResponse], error)