Documentation ¶
Index ¶
- Constants
- func New(table string, client *dynamodb.Client) repository.Execution
- type DynamoExecutionRepository
- func (r *DynamoExecutionRepository) Close()
- func (d *DynamoExecutionRepository) CloseExecution(ctx context.Context, id workflow.ExecutionIdentifier, result workflow.Status, ...) error
- func (d *DynamoExecutionRepository) CreateExecution(ctx context.Context, ex *workflow.Execution) error
- func (d *DynamoExecutionRepository) GetExecution(ctx context.Context, id workflow.ExecutionIdentifier) (*workflow.Execution, error)
- func (*DynamoExecutionRepository) Init(ctx context.Context) error
- type ExecutionDdbRecord
Constants ¶
View Source
const ( AttributeIdentifier = "identifier" AttributeWorkflow = "workflow" AttributeStatus = "status" AttributeCreatedAt = "created_at" AttributeUpdatedAt = "updated_at" AttributeFinishedAt = "finished_at" AttributeResults = "results" AttributeTtl = "ttl" )
View Source
const (
TtlPeriod = 24 * time.Hour
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DynamoExecutionRepository ¶
type DynamoExecutionRepository struct {
// contains filtered or unexported fields
}
func (*DynamoExecutionRepository) Close ¶ added in v0.0.9
func (r *DynamoExecutionRepository) Close()
func (*DynamoExecutionRepository) CloseExecution ¶
func (d *DynamoExecutionRepository) CloseExecution(ctx context.Context, id workflow.ExecutionIdentifier, result workflow.Status, output workflow.SerializedExecutionResult) error
func (*DynamoExecutionRepository) CreateExecution ¶
func (*DynamoExecutionRepository) GetExecution ¶
func (d *DynamoExecutionRepository) GetExecution(ctx context.Context, id workflow.ExecutionIdentifier) (*workflow.Execution, error)
type ExecutionDdbRecord ¶
type ExecutionDdbRecord struct { Identifier string `dynamodbav:"identifier"` Workflow string `dynamodbav:"workflow"` Status string `dynamodbav:"status"` CreatedAt time.Time `dynamodbav:"created_at"` UpdatedAt time.Time `dynamodbav:"updated_at"` FinishedAt *time.Time `dynamodbav:"finished_at,omitempty"` Results *string `dynamodbav:"results,omitempty"` }
func (*ExecutionDdbRecord) ToExecution ¶
func (n *ExecutionDdbRecord) ToExecution() *workflow.Execution
Click to show internal directories.
Click to hide internal directories.