Documentation ¶
Overview ¶
Package universal contains the implementation of APIs that are shared between gRPC and HTTP servers. On HTTP servers, they use protojson to convert data to/from JSON.
Index ¶
- type Options
- type Universal
- func (a *Universal) ActorReadinessCheck(ctx context.Context) error
- func (a *Universal) Actors() actors.ActorRuntime
- func (a *Universal) AppConnectionConfig() config.AppConnectionConfig
- func (a *Universal) AppID() string
- func (a *Universal) CompStore() *compstore.ComponentStore
- func (a *Universal) ConverseAlpha1(ctx context.Context, req *runtimev1pb.ConversationRequest) (*runtimev1pb.ConversationResponse, error)
- func (a *Universal) CryptoGetUnwrapKeyFn(ctx context.Context, componentName string, ...) encv1.UnwrapKeyFn
- func (a *Universal) CryptoGetWrapKeyFn(ctx context.Context, componentName string, ...) encv1.WrapKeyFn
- func (a *Universal) CryptoValidateRequest(componentName string) (contribCrypto.SubtleCrypto, error)
- func (a *Universal) DeleteJobAlpha1(ctx context.Context, inReq *runtimev1pb.DeleteJobRequest) (*runtimev1pb.DeleteJobResponse, error)
- func (a *Universal) GetBulkSecret(ctx context.Context, in *runtimev1pb.GetBulkSecretRequest) (*runtimev1pb.GetBulkSecretResponse, error)
- func (a *Universal) GetJobAlpha1(ctx context.Context, inReq *runtimev1pb.GetJobRequest) (*runtimev1pb.GetJobResponse, error)
- func (a *Universal) GetMetadata(ctx context.Context, in *runtimev1pb.GetMetadataRequest) (*runtimev1pb.GetMetadataResponse, error)
- func (a *Universal) GetSecret(ctx context.Context, in *runtimev1pb.GetSecretRequest) (*runtimev1pb.GetSecretResponse, error)
- func (a *Universal) GetStateStore(name string) (state.Store, error)
- func (a *Universal) GetWorkflowAlpha1(ctx context.Context, in *runtimev1pb.GetWorkflowRequest) (*runtimev1pb.GetWorkflowResponse, error)
- func (a *Universal) GetWorkflowBeta1(ctx context.Context, in *runtimev1pb.GetWorkflowRequest) (*runtimev1pb.GetWorkflowResponse, error)
- func (a *Universal) Namespace() string
- func (a *Universal) PauseWorkflowAlpha1(ctx context.Context, in *runtimev1pb.PauseWorkflowRequest) (*emptypb.Empty, error)
- func (a *Universal) PauseWorkflowBeta1(ctx context.Context, in *runtimev1pb.PauseWorkflowRequest) (*emptypb.Empty, error)
- func (a *Universal) PurgeWorkflowAlpha1(ctx context.Context, in *runtimev1pb.PurgeWorkflowRequest) (*emptypb.Empty, error)
- func (a *Universal) PurgeWorkflowBeta1(ctx context.Context, in *runtimev1pb.PurgeWorkflowRequest) (*emptypb.Empty, error)
- func (a *Universal) QueryStateAlpha1(ctx context.Context, in *runtimev1pb.QueryStateRequest) (*runtimev1pb.QueryStateResponse, error)
- func (a *Universal) RaiseEventWorkflowAlpha1(ctx context.Context, in *runtimev1pb.RaiseEventWorkflowRequest) (*emptypb.Empty, error)
- func (a *Universal) RaiseEventWorkflowBeta1(ctx context.Context, in *runtimev1pb.RaiseEventWorkflowRequest) (*emptypb.Empty, error)
- func (a *Universal) RegisterActorReminder(ctx context.Context, in *runtimev1pb.RegisterActorReminderRequest) (*emptypb.Empty, error)
- func (a *Universal) RegisterActorTimer(ctx context.Context, in *runtimev1pb.RegisterActorTimerRequest) (*emptypb.Empty, error)
- func (a *Universal) Resiliency() resiliency.Provider
- func (a *Universal) ResumeWorkflowAlpha1(ctx context.Context, in *runtimev1pb.ResumeWorkflowRequest) (*emptypb.Empty, error)
- func (a *Universal) ResumeWorkflowBeta1(ctx context.Context, in *runtimev1pb.ResumeWorkflowRequest) (*emptypb.Empty, error)
- func (a *Universal) ScheduleJobAlpha1(ctx context.Context, inReq *runtimev1pb.ScheduleJobRequest) (*runtimev1pb.ScheduleJobResponse, error)
- func (a *Universal) ScheduleJobAlpha1HTTP(ctx context.Context, job *internalsv1pb.JobHTTPRequest) (*runtimev1pb.ScheduleJobResponse, error)
- func (a *Universal) SetActorRuntime(actor actors.ActorRuntime)
- func (a *Universal) SetActorsInitDone()
- func (a *Universal) SetMetadata(ctx context.Context, in *runtimev1pb.SetMetadataRequest) (*emptypb.Empty, error)
- func (a *Universal) Shutdown(ctx context.Context, in *runtimev1pb.ShutdownRequest) (*emptypb.Empty, error)
- func (a *Universal) StartWorkflowAlpha1(ctx context.Context, in *runtimev1pb.StartWorkflowRequest) (*runtimev1pb.StartWorkflowResponse, error)
- func (a *Universal) StartWorkflowBeta1(ctx context.Context, in *runtimev1pb.StartWorkflowRequest) (*runtimev1pb.StartWorkflowResponse, error)
- func (a *Universal) SubtleDecryptAlpha1(ctx context.Context, in *runtimev1pb.SubtleDecryptRequest) (*runtimev1pb.SubtleDecryptResponse, error)
- func (a *Universal) SubtleEncryptAlpha1(ctx context.Context, in *runtimev1pb.SubtleEncryptRequest) (*runtimev1pb.SubtleEncryptResponse, error)
- func (a *Universal) SubtleGetKeyAlpha1(ctx context.Context, in *runtimev1pb.SubtleGetKeyRequest) (*runtimev1pb.SubtleGetKeyResponse, error)
- func (a *Universal) SubtleSignAlpha1(ctx context.Context, in *runtimev1pb.SubtleSignRequest) (*runtimev1pb.SubtleSignResponse, error)
- func (a *Universal) SubtleUnwrapKeyAlpha1(ctx context.Context, in *runtimev1pb.SubtleUnwrapKeyRequest) (*runtimev1pb.SubtleUnwrapKeyResponse, error)
- func (a *Universal) SubtleVerifyAlpha1(ctx context.Context, in *runtimev1pb.SubtleVerifyRequest) (*runtimev1pb.SubtleVerifyResponse, error)
- func (a *Universal) SubtleWrapKeyAlpha1(ctx context.Context, in *runtimev1pb.SubtleWrapKeyRequest) (*runtimev1pb.SubtleWrapKeyResponse, error)
- func (a *Universal) TerminateWorkflowAlpha1(ctx context.Context, in *runtimev1pb.TerminateWorkflowRequest) (*emptypb.Empty, error)
- func (a *Universal) TerminateWorkflowBeta1(ctx context.Context, in *runtimev1pb.TerminateWorkflowRequest) (*emptypb.Empty, error)
- func (a *Universal) TryLockAlpha1(ctx context.Context, req *runtimev1pb.TryLockRequest) (*runtimev1pb.TryLockResponse, error)
- func (a *Universal) UnlockAlpha1(ctx context.Context, req *runtimev1pb.UnlockRequest) (*runtimev1pb.UnlockResponse, error)
- func (a *Universal) UnregisterActorReminder(ctx context.Context, in *runtimev1pb.UnregisterActorReminderRequest) (*emptypb.Empty, error)
- func (a *Universal) UnregisterActorTimer(ctx context.Context, in *runtimev1pb.UnregisterActorTimerRequest) (*emptypb.Empty, error)
- func (a *Universal) WaitForActorsReady(ctx context.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct { AppID string Namespace string Logger logger.Logger Resiliency resiliency.Provider Actors actors.ActorRuntime CompStore *compstore.ComponentStore ShutdownFn func() GetComponentsCapabilitiesFn func() map[string][]string ExtendedMetadata map[string]string AppConnectionConfig config.AppConnectionConfig GlobalConfig *config.Configuration WorkflowEngine *wfengine.WorkflowEngine SchedulerClients *clients.Clients }
type Universal ¶
type Universal struct {
// contains filtered or unexported fields
}
Universal contains the implementation of gRPC APIs that are also used by the HTTP server.
func (*Universal) ActorReadinessCheck ¶
ActorReadinessCheck makes sure that the actor subsystem is ready.
func (*Universal) Actors ¶
func (a *Universal) Actors() actors.ActorRuntime
func (*Universal) AppConnectionConfig ¶
func (a *Universal) AppConnectionConfig() config.AppConnectionConfig
func (*Universal) CompStore ¶
func (a *Universal) CompStore() *compstore.ComponentStore
func (*Universal) ConverseAlpha1 ¶
func (a *Universal) ConverseAlpha1(ctx context.Context, req *runtimev1pb.ConversationRequest) (*runtimev1pb.ConversationResponse, error)
func (*Universal) CryptoGetUnwrapKeyFn ¶
func (a *Universal) CryptoGetUnwrapKeyFn(ctx context.Context, componentName string, component contribCrypto.SubtleCrypto) encv1.UnwrapKeyFn
func (*Universal) CryptoGetWrapKeyFn ¶
func (a *Universal) CryptoGetWrapKeyFn(ctx context.Context, componentName string, component contribCrypto.SubtleCrypto) encv1.WrapKeyFn
func (*Universal) CryptoValidateRequest ¶
func (a *Universal) CryptoValidateRequest(componentName string) (contribCrypto.SubtleCrypto, error)
CryptoValidateRequest is an internal method that checks if the request is for a valid crypto component.
func (*Universal) DeleteJobAlpha1 ¶
func (a *Universal) DeleteJobAlpha1(ctx context.Context, inReq *runtimev1pb.DeleteJobRequest) (*runtimev1pb.DeleteJobResponse, error)
func (*Universal) GetBulkSecret ¶
func (a *Universal) GetBulkSecret(ctx context.Context, in *runtimev1pb.GetBulkSecretRequest) (*runtimev1pb.GetBulkSecretResponse, error)
func (*Universal) GetJobAlpha1 ¶
func (a *Universal) GetJobAlpha1(ctx context.Context, inReq *runtimev1pb.GetJobRequest) (*runtimev1pb.GetJobResponse, error)
func (*Universal) GetMetadata ¶
func (a *Universal) GetMetadata(ctx context.Context, in *runtimev1pb.GetMetadataRequest) (*runtimev1pb.GetMetadataResponse, error)
func (*Universal) GetSecret ¶
func (a *Universal) GetSecret(ctx context.Context, in *runtimev1pb.GetSecretRequest) (*runtimev1pb.GetSecretResponse, error)
func (*Universal) GetStateStore ¶
func (*Universal) GetWorkflowAlpha1 ¶
func (a *Universal) GetWorkflowAlpha1(ctx context.Context, in *runtimev1pb.GetWorkflowRequest) (*runtimev1pb.GetWorkflowResponse, error)
GetWorkflowAlpha1 is the API handler for getting workflow details
func (*Universal) GetWorkflowBeta1 ¶
func (a *Universal) GetWorkflowBeta1(ctx context.Context, in *runtimev1pb.GetWorkflowRequest) (*runtimev1pb.GetWorkflowResponse, error)
GetWorkflowBeta1 is the API handler for getting workflow details
func (*Universal) PauseWorkflowAlpha1 ¶
func (a *Universal) PauseWorkflowAlpha1(ctx context.Context, in *runtimev1pb.PauseWorkflowRequest) (*emptypb.Empty, error)
PauseWorkflowAlpha1 is the API handler for pausing a workflow
func (*Universal) PauseWorkflowBeta1 ¶
func (a *Universal) PauseWorkflowBeta1(ctx context.Context, in *runtimev1pb.PauseWorkflowRequest) (*emptypb.Empty, error)
PauseWorkflowBeta1 is the API handler for pausing a workflow
func (*Universal) PurgeWorkflowAlpha1 ¶
func (a *Universal) PurgeWorkflowAlpha1(ctx context.Context, in *runtimev1pb.PurgeWorkflowRequest) (*emptypb.Empty, error)
PurgeWorkflowAlpha1 is the API handler for purging a workflow
func (*Universal) PurgeWorkflowBeta1 ¶
func (a *Universal) PurgeWorkflowBeta1(ctx context.Context, in *runtimev1pb.PurgeWorkflowRequest) (*emptypb.Empty, error)
PurgeWorkflowBeta1 is the API handler for purging a workflow
func (*Universal) QueryStateAlpha1 ¶
func (a *Universal) QueryStateAlpha1(ctx context.Context, in *runtimev1pb.QueryStateRequest) (*runtimev1pb.QueryStateResponse, error)
func (*Universal) RaiseEventWorkflowAlpha1 ¶
func (a *Universal) RaiseEventWorkflowAlpha1(ctx context.Context, in *runtimev1pb.RaiseEventWorkflowRequest) (*emptypb.Empty, error)
RaiseEventWorkflowAlpha1 is the API handler for raising an event to a workflow
func (*Universal) RaiseEventWorkflowBeta1 ¶
func (a *Universal) RaiseEventWorkflowBeta1(ctx context.Context, in *runtimev1pb.RaiseEventWorkflowRequest) (*emptypb.Empty, error)
RaiseEventWorkflowBeta1 is the API handler for raising an event to a workflow
func (*Universal) RegisterActorReminder ¶
func (a *Universal) RegisterActorReminder(ctx context.Context, in *runtimev1pb.RegisterActorReminderRequest) (*emptypb.Empty, error)
func (*Universal) RegisterActorTimer ¶
func (a *Universal) RegisterActorTimer(ctx context.Context, in *runtimev1pb.RegisterActorTimerRequest) (*emptypb.Empty, error)
func (*Universal) Resiliency ¶
func (a *Universal) Resiliency() resiliency.Provider
func (*Universal) ResumeWorkflowAlpha1 ¶
func (a *Universal) ResumeWorkflowAlpha1(ctx context.Context, in *runtimev1pb.ResumeWorkflowRequest) (*emptypb.Empty, error)
ResumeWorkflowAlpha1 is the API handler for resuming a workflow
func (*Universal) ResumeWorkflowBeta1 ¶
func (a *Universal) ResumeWorkflowBeta1(ctx context.Context, in *runtimev1pb.ResumeWorkflowRequest) (*emptypb.Empty, error)
ResumeWorkflowBeta1 is the API handler for resuming a workflow
func (*Universal) ScheduleJobAlpha1 ¶
func (a *Universal) ScheduleJobAlpha1(ctx context.Context, inReq *runtimev1pb.ScheduleJobRequest) (*runtimev1pb.ScheduleJobResponse, error)
func (*Universal) ScheduleJobAlpha1HTTP ¶
func (a *Universal) ScheduleJobAlpha1HTTP(ctx context.Context, job *internalsv1pb.JobHTTPRequest) (*runtimev1pb.ScheduleJobResponse, error)
func (*Universal) SetActorRuntime ¶
func (a *Universal) SetActorRuntime(actor actors.ActorRuntime)
func (*Universal) SetActorsInitDone ¶
func (a *Universal) SetActorsInitDone()
SetActorsInitDone indicates that the actors runtime has been initialized, whether actors are available or not
func (*Universal) SetMetadata ¶
func (a *Universal) SetMetadata(ctx context.Context, in *runtimev1pb.SetMetadataRequest) (*emptypb.Empty, error)
SetMetadata Sets value in extended metadata of the sidecar.
func (*Universal) Shutdown ¶
func (a *Universal) Shutdown(ctx context.Context, in *runtimev1pb.ShutdownRequest) (*emptypb.Empty, error)
Shutdown the sidecar.
func (*Universal) StartWorkflowAlpha1 ¶
func (a *Universal) StartWorkflowAlpha1(ctx context.Context, in *runtimev1pb.StartWorkflowRequest) (*runtimev1pb.StartWorkflowResponse, error)
StartWorkflowAlpha1 is the API handler for starting a workflow
func (*Universal) StartWorkflowBeta1 ¶
func (a *Universal) StartWorkflowBeta1(ctx context.Context, in *runtimev1pb.StartWorkflowRequest) (*runtimev1pb.StartWorkflowResponse, error)
StartWorkflowBeta1 is the API handler for starting a workflow
func (*Universal) SubtleDecryptAlpha1 ¶
func (a *Universal) SubtleDecryptAlpha1(ctx context.Context, in *runtimev1pb.SubtleDecryptRequest) (*runtimev1pb.SubtleDecryptResponse, error)
SubtleDecryptAlpha1 decrypts a small message using a key stored in the vault.
func (*Universal) SubtleEncryptAlpha1 ¶
func (a *Universal) SubtleEncryptAlpha1(ctx context.Context, in *runtimev1pb.SubtleEncryptRequest) (*runtimev1pb.SubtleEncryptResponse, error)
SubtleEncryptAlpha1 encrypts a small message using a key stored in the vault.
func (*Universal) SubtleGetKeyAlpha1 ¶
func (a *Universal) SubtleGetKeyAlpha1(ctx context.Context, in *runtimev1pb.SubtleGetKeyRequest) (*runtimev1pb.SubtleGetKeyResponse, error)
SubtleGetKeyAlpha1 returns the public part of an asymmetric key stored in the vault.
func (*Universal) SubtleSignAlpha1 ¶
func (a *Universal) SubtleSignAlpha1(ctx context.Context, in *runtimev1pb.SubtleSignRequest) (*runtimev1pb.SubtleSignResponse, error)
SubtleSignAlpha1 signs a message using a key stored in the vault.
func (*Universal) SubtleUnwrapKeyAlpha1 ¶
func (a *Universal) SubtleUnwrapKeyAlpha1(ctx context.Context, in *runtimev1pb.SubtleUnwrapKeyRequest) (*runtimev1pb.SubtleUnwrapKeyResponse, error)
SubtleUnwrapKeyAlpha1 unwraps a key using a key stored in the vault.
func (*Universal) SubtleVerifyAlpha1 ¶
func (a *Universal) SubtleVerifyAlpha1(ctx context.Context, in *runtimev1pb.SubtleVerifyRequest) (*runtimev1pb.SubtleVerifyResponse, error)
SubtleVerifyAlpha1 verifies the signature of a message using a key stored in the vault.
func (*Universal) SubtleWrapKeyAlpha1 ¶
func (a *Universal) SubtleWrapKeyAlpha1(ctx context.Context, in *runtimev1pb.SubtleWrapKeyRequest) (*runtimev1pb.SubtleWrapKeyResponse, error)
SubtleWrapKeyAlpha1 wraps a key using a key stored in the vault.
func (*Universal) TerminateWorkflowAlpha1 ¶
func (a *Universal) TerminateWorkflowAlpha1(ctx context.Context, in *runtimev1pb.TerminateWorkflowRequest) (*emptypb.Empty, error)
TerminateWorkflowAlpha1 is the API handler for terminating a workflow
func (*Universal) TerminateWorkflowBeta1 ¶
func (a *Universal) TerminateWorkflowBeta1(ctx context.Context, in *runtimev1pb.TerminateWorkflowRequest) (*emptypb.Empty, error)
TerminateWorkflowBeta1 is the API handler for terminating a workflow
func (*Universal) TryLockAlpha1 ¶
func (a *Universal) TryLockAlpha1(ctx context.Context, req *runtimev1pb.TryLockRequest) (*runtimev1pb.TryLockResponse, error)
func (*Universal) UnlockAlpha1 ¶
func (a *Universal) UnlockAlpha1(ctx context.Context, req *runtimev1pb.UnlockRequest) (*runtimev1pb.UnlockResponse, error)
func (*Universal) UnregisterActorReminder ¶
func (a *Universal) UnregisterActorReminder(ctx context.Context, in *runtimev1pb.UnregisterActorReminderRequest) (*emptypb.Empty, error)
func (*Universal) UnregisterActorTimer ¶
func (a *Universal) UnregisterActorTimer(ctx context.Context, in *runtimev1pb.UnregisterActorTimerRequest) (*emptypb.Empty, error)
func (*Universal) WaitForActorsReady ¶
WaitForActorsReady blocks until the actor runtime is set in the object (or until the context is canceled).