Documentation
¶
Index ¶
- Constants
- func NewProviderHandler(svc ProviderHandler, opts ...connect.HandlerOption) (string, http.Handler)
- func NewProviderHostHandler(svc ProviderHostHandler, opts ...connect.HandlerOption) (string, http.Handler)
- type ProviderClient
- type ProviderHandler
- type ProviderHostClient
- type ProviderHostHandler
- type UnimplementedProviderHandler
- func (UnimplementedProviderHandler) ApplyAction(context.Context, *connect.Request[v0.ApplyActionRequest]) (*connect.Response[v0.ApplyActionResponse], error)
- func (UnimplementedProviderHandler) Doctor(context.Context, *connect.Request[v0.DoctorRequest]) (*connect.Response[v0.DoctorResponse], error)
- func (UnimplementedProviderHandler) GetProviderInformation(context.Context, *connect.Request[v0.GetProviderInformationRequest]) (*connect.Response[v0.GetProviderInformationResponse], error)
- func (UnimplementedProviderHandler) Observe(context.Context, *connect.Request[v0.ObserveRequest]) (*connect.Response[v0.ObserveResponse], error)
- func (UnimplementedProviderHandler) Plan(context.Context, *connect.Request[v0.PlanRequest]) (*connect.Response[v0.PlanResponse], error)
- func (UnimplementedProviderHandler) UpgradeState(context.Context, *connect.Request[v0.UpgradeStateRequest]) (*connect.Response[v0.UpgradeStateResponse], error)
- func (UnimplementedProviderHandler) Validate(context.Context, *connect.Request[v0.ValidateRequest]) (*connect.Response[v0.ValidateResponse], error)
- type UnimplementedProviderHostHandler
- func (UnimplementedProviderHostHandler) ExecuteRequest(context.Context, *connect.Request[v0.ExecuteRequestRequest]) (*connect.Response[v0.ExecuteRequestResponse], error)
- func (UnimplementedProviderHostHandler) ProposeOutput(context.Context, *connect.Request[v0.ProposeOutputRequest]) (*connect.Response[v0.ProposeOutputResponse], error)
- func (UnimplementedProviderHostHandler) RecordCheckpoint(context.Context, *connect.Request[v0.RecordCheckpointRequest]) (*connect.Response[v0.RecordCheckpointResponse], error)
- func (UnimplementedProviderHostHandler) ResolveCapture(context.Context, *connect.Request[v0.ResolveCaptureRequest]) (*connect.Response[v0.ResolveCaptureResponse], error)
Constants ¶
const ( // ProviderName is the fully-qualified name of the Provider service. ProviderName = "codefly.services.provider.v0.Provider" // ProviderHostName is the fully-qualified name of the ProviderHost service. ProviderHostName = "codefly.services.provider.v0.ProviderHost" )
const ( // ProviderGetProviderInformationProcedure is the fully-qualified name of the Provider's // GetProviderInformation RPC. ProviderGetProviderInformationProcedure = "/codefly.services.provider.v0.Provider/GetProviderInformation" // ProviderValidateProcedure is the fully-qualified name of the Provider's Validate RPC. ProviderValidateProcedure = "/codefly.services.provider.v0.Provider/Validate" // ProviderObserveProcedure is the fully-qualified name of the Provider's Observe RPC. ProviderObserveProcedure = "/codefly.services.provider.v0.Provider/Observe" // ProviderPlanProcedure is the fully-qualified name of the Provider's Plan RPC. ProviderPlanProcedure = "/codefly.services.provider.v0.Provider/Plan" // ProviderApplyActionProcedure is the fully-qualified name of the Provider's ApplyAction RPC. ProviderApplyActionProcedure = "/codefly.services.provider.v0.Provider/ApplyAction" // ProviderDoctorProcedure is the fully-qualified name of the Provider's Doctor RPC. ProviderDoctorProcedure = "/codefly.services.provider.v0.Provider/Doctor" // ProviderUpgradeStateProcedure is the fully-qualified name of the Provider's UpgradeState RPC. ProviderUpgradeStateProcedure = "/codefly.services.provider.v0.Provider/UpgradeState" // ProviderHostExecuteRequestProcedure is the fully-qualified name of the ProviderHost's // ExecuteRequest RPC. ProviderHostExecuteRequestProcedure = "/codefly.services.provider.v0.ProviderHost/ExecuteRequest" // ProviderHostRecordCheckpointProcedure is the fully-qualified name of the ProviderHost's // RecordCheckpoint RPC. ProviderHostRecordCheckpointProcedure = "/codefly.services.provider.v0.ProviderHost/RecordCheckpoint" // ProviderHostResolveCaptureProcedure is the fully-qualified name of the ProviderHost's // ResolveCapture RPC. ProviderHostResolveCaptureProcedure = "/codefly.services.provider.v0.ProviderHost/ResolveCapture" // ProviderHostProposeOutputProcedure is the fully-qualified name of the ProviderHost's // ProposeOutput RPC. ProviderHostProposeOutputProcedure = "/codefly.services.provider.v0.ProviderHost/ProposeOutput" )
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 NewProviderHandler ¶
func NewProviderHandler(svc ProviderHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewProviderHandler 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 NewProviderHostHandler ¶
func NewProviderHostHandler(svc ProviderHostHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewProviderHostHandler 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 ProviderClient ¶
type ProviderClient interface {
// GetProviderInformation returns immutable advertisement and catalog identity.
GetProviderInformation(context.Context, *connect.Request[v0.GetProviderInformationRequest]) (*connect.Response[v0.GetProviderInformationResponse], error)
// Validate checks normalized desired input without broker access.
Validate(context.Context, *connect.Request[v0.ValidateRequest]) (*connect.Response[v0.ValidateResponse], error)
// Observe reads admitted remote state.
Observe(context.Context, *connect.Request[v0.ObserveRequest]) (*connect.Response[v0.ObserveResponse], error)
// Plan produces an exact ordered plan without broker access.
Plan(context.Context, *connect.Request[v0.PlanRequest]) (*connect.Response[v0.PlanResponse], error)
// ApplyAction applies exactly one action selected from the bound plan.
ApplyAction(context.Context, *connect.Request[v0.ApplyActionRequest]) (*connect.Response[v0.ApplyActionResponse], error)
// Doctor performs admitted read-only diagnostics.
Doctor(context.Context, *connect.Request[v0.DoctorRequest]) (*connect.Response[v0.DoctorResponse], error)
// UpgradeState performs one offline state-schema upgrade step.
UpgradeState(context.Context, *connect.Request[v0.UpgradeStateRequest]) (*connect.Response[v0.UpgradeStateResponse], error)
}
ProviderClient is a client for the codefly.services.provider.v0.Provider service.
func NewProviderClient ¶
func NewProviderClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ProviderClient
NewProviderClient constructs a client for the codefly.services.provider.v0.Provider 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 ProviderHandler ¶
type ProviderHandler interface {
// GetProviderInformation returns immutable advertisement and catalog identity.
GetProviderInformation(context.Context, *connect.Request[v0.GetProviderInformationRequest]) (*connect.Response[v0.GetProviderInformationResponse], error)
// Validate checks normalized desired input without broker access.
Validate(context.Context, *connect.Request[v0.ValidateRequest]) (*connect.Response[v0.ValidateResponse], error)
// Observe reads admitted remote state.
Observe(context.Context, *connect.Request[v0.ObserveRequest]) (*connect.Response[v0.ObserveResponse], error)
// Plan produces an exact ordered plan without broker access.
Plan(context.Context, *connect.Request[v0.PlanRequest]) (*connect.Response[v0.PlanResponse], error)
// ApplyAction applies exactly one action selected from the bound plan.
ApplyAction(context.Context, *connect.Request[v0.ApplyActionRequest]) (*connect.Response[v0.ApplyActionResponse], error)
// Doctor performs admitted read-only diagnostics.
Doctor(context.Context, *connect.Request[v0.DoctorRequest]) (*connect.Response[v0.DoctorResponse], error)
// UpgradeState performs one offline state-schema upgrade step.
UpgradeState(context.Context, *connect.Request[v0.UpgradeStateRequest]) (*connect.Response[v0.UpgradeStateResponse], error)
}
ProviderHandler is an implementation of the codefly.services.provider.v0.Provider service.
type ProviderHostClient ¶
type ProviderHostClient interface {
// ExecuteRequest executes one manifest-declared and host-admitted request.
ExecuteRequest(context.Context, *connect.Request[v0.ExecuteRequestRequest]) (*connect.Response[v0.ExecuteRequestResponse], error)
// RecordCheckpoint durably records pre-send or recovery state.
RecordCheckpoint(context.Context, *connect.Request[v0.RecordCheckpointRequest]) (*connect.Response[v0.RecordCheckpointResponse], error)
// ResolveCapture returns an opaque reference for a durable capture.
ResolveCapture(context.Context, *connect.Request[v0.ResolveCaptureRequest]) (*connect.Response[v0.ResolveCaptureResponse], error)
// ProposeOutput asks the host to execute one PROJECT_OUTPUT action.
ProposeOutput(context.Context, *connect.Request[v0.ProposeOutputRequest]) (*connect.Response[v0.ProposeOutputResponse], error)
}
ProviderHostClient is a client for the codefly.services.provider.v0.ProviderHost service.
func NewProviderHostClient ¶
func NewProviderHostClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ProviderHostClient
NewProviderHostClient constructs a client for the codefly.services.provider.v0.ProviderHost 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 ProviderHostHandler ¶
type ProviderHostHandler interface {
// ExecuteRequest executes one manifest-declared and host-admitted request.
ExecuteRequest(context.Context, *connect.Request[v0.ExecuteRequestRequest]) (*connect.Response[v0.ExecuteRequestResponse], error)
// RecordCheckpoint durably records pre-send or recovery state.
RecordCheckpoint(context.Context, *connect.Request[v0.RecordCheckpointRequest]) (*connect.Response[v0.RecordCheckpointResponse], error)
// ResolveCapture returns an opaque reference for a durable capture.
ResolveCapture(context.Context, *connect.Request[v0.ResolveCaptureRequest]) (*connect.Response[v0.ResolveCaptureResponse], error)
// ProposeOutput asks the host to execute one PROJECT_OUTPUT action.
ProposeOutput(context.Context, *connect.Request[v0.ProposeOutputRequest]) (*connect.Response[v0.ProposeOutputResponse], error)
}
ProviderHostHandler is an implementation of the codefly.services.provider.v0.ProviderHost service.
type UnimplementedProviderHandler ¶
type UnimplementedProviderHandler struct{}
UnimplementedProviderHandler returns CodeUnimplemented from all methods.
func (UnimplementedProviderHandler) ApplyAction ¶
func (UnimplementedProviderHandler) ApplyAction(context.Context, *connect.Request[v0.ApplyActionRequest]) (*connect.Response[v0.ApplyActionResponse], error)
func (UnimplementedProviderHandler) Doctor ¶
func (UnimplementedProviderHandler) Doctor(context.Context, *connect.Request[v0.DoctorRequest]) (*connect.Response[v0.DoctorResponse], error)
func (UnimplementedProviderHandler) GetProviderInformation ¶
func (UnimplementedProviderHandler) GetProviderInformation(context.Context, *connect.Request[v0.GetProviderInformationRequest]) (*connect.Response[v0.GetProviderInformationResponse], error)
func (UnimplementedProviderHandler) Observe ¶
func (UnimplementedProviderHandler) Observe(context.Context, *connect.Request[v0.ObserveRequest]) (*connect.Response[v0.ObserveResponse], error)
func (UnimplementedProviderHandler) Plan ¶
func (UnimplementedProviderHandler) Plan(context.Context, *connect.Request[v0.PlanRequest]) (*connect.Response[v0.PlanResponse], error)
func (UnimplementedProviderHandler) UpgradeState ¶
func (UnimplementedProviderHandler) UpgradeState(context.Context, *connect.Request[v0.UpgradeStateRequest]) (*connect.Response[v0.UpgradeStateResponse], error)
func (UnimplementedProviderHandler) Validate ¶
func (UnimplementedProviderHandler) Validate(context.Context, *connect.Request[v0.ValidateRequest]) (*connect.Response[v0.ValidateResponse], error)
type UnimplementedProviderHostHandler ¶
type UnimplementedProviderHostHandler struct{}
UnimplementedProviderHostHandler returns CodeUnimplemented from all methods.
func (UnimplementedProviderHostHandler) ExecuteRequest ¶
func (UnimplementedProviderHostHandler) ExecuteRequest(context.Context, *connect.Request[v0.ExecuteRequestRequest]) (*connect.Response[v0.ExecuteRequestResponse], error)
func (UnimplementedProviderHostHandler) ProposeOutput ¶
func (UnimplementedProviderHostHandler) ProposeOutput(context.Context, *connect.Request[v0.ProposeOutputRequest]) (*connect.Response[v0.ProposeOutputResponse], error)
func (UnimplementedProviderHostHandler) RecordCheckpoint ¶
func (UnimplementedProviderHostHandler) RecordCheckpoint(context.Context, *connect.Request[v0.RecordCheckpointRequest]) (*connect.Response[v0.RecordCheckpointResponse], error)
func (UnimplementedProviderHostHandler) ResolveCapture ¶
func (UnimplementedProviderHostHandler) ResolveCapture(context.Context, *connect.Request[v0.ResolveCaptureRequest]) (*connect.Response[v0.ResolveCaptureResponse], error)