Versions in this module Expand all Collapse all v0 v0.1.2 Mar 19, 2024 v0.1.1 Mar 19, 2024 Changes in this version + const DefaultWorkflowTimeout + const MaxKubeAttempts + const StrategyOptimisticWriteToSpiceDBAndKube + const StrategyPessimisticWriteToSpiceDBAndKube + var KubeBackoff = wait.Backoff + func ResourceLockRel(input *WriteObjInput, workflowID string) *v1.RelationshipUpdate + func WorkflowForLockMode(lockMode string) (any, error) + type ActivityHandler struct + KubeClient rest.Interface + PermissionClient v1.PermissionsServiceClient + func (h *ActivityHandler) CheckKubeResource(ctx context.Context, req *KubeReqInput) (bool, error) + func (h *ActivityHandler) WriteToKube(ctx context.Context, req *KubeReqInput) (*KubeResp, error) + func (h *ActivityHandler) WriteToSpiceDB(ctx context.Context, input *v1.WriteRelationshipsRequest) (*v1.WriteRelationshipsResponse, error) + type KubeReqInput struct + Body []byte + Header http.Header + ObjectMeta *metav1.ObjectMeta + RequestInfo *request.RequestInfo + type KubeResp struct + Body []byte + ContentType string + Err k8serrors.StatusError + StatusCode int + func KubeConflict(err error, input *WriteObjInput) *KubeResp + func OptimisticWriteToSpiceDBAndKube(ctx workflow.Context, input *WriteObjInput) (*KubeResp, error) + func PessimisticWriteToSpiceDBAndKube(ctx workflow.Context, input *WriteObjInput) (*KubeResp, error) + type RollbackRelationships []*v1.RelationshipUpdate + func NewRollbackRelationships(rels ...*v1.RelationshipUpdate) *RollbackRelationships + func (r *RollbackRelationships) Cleanup(ctx workflow.Context) + func (r *RollbackRelationships) WithRels(relationships ...*v1.RelationshipUpdate) *RollbackRelationships + type Worker struct + func SetupWithBackend(ctx context.Context, permissionClient v1.PermissionsServiceClient, ...) (*client.Client, *Worker, error) + func SetupWithMemoryBackend(ctx context.Context, permissionClient v1.PermissionsServiceClient, ...) (*client.Client, *Worker, error) + func SetupWithSQLiteBackend(ctx context.Context, permissionClient v1.PermissionsServiceClient, ...) (*client.Client, *Worker, error) + func (w *Worker) Shutdown(_ context.Context) error + func (w *Worker) Start(ctx context.Context) error + type WriteObjInput struct + Body []byte + Header http.Header + ObjectMeta *metav1.ObjectMeta + Preconditions []*v1.Precondition + Rels []*v1.Relationship + RequestInfo *request.RequestInfo + UserInfo *user.DefaultInfo