dynamo

package
v1.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProcessIDAttrName             = "process_id"
	TaskIDAttrName                = "task_id"
	TaskBadStateEnterTimeAttrName = "bad_state_enter_time"
	TaskStateAttrName             = "state"
	TaskStateMessageAttrName      = "state_message"

	ProcessIDAttrAlias = "#processID"

	ProcessIDValuePlaceholder = ":processID"
)

Variables

This section is empty.

Functions

func BuildCheckIfProcessExistsQueryInput

func BuildCheckIfProcessExistsQueryInput(tableName, processID string) *dynamodb.QueryInput

func BuildCompleteTaskUpdateItemInput

func BuildCompleteTaskUpdateItemInput(tableName string, completeTaskRequest CompleteTaskRequest) *dynamodb.UpdateItemInput

func BuildGetProcessQueryInput

func BuildGetProcessQueryInput(tableName, processID string) *dynamodb.QueryInput

func BuildRegisterTaskUpdateItemInput

func BuildRegisterTaskUpdateItemInput(tableName string, taskToRegister TaskToRegister) *dynamodb.UpdateItemInput

Types

type CompleteTaskRequest

type CompleteTaskRequest struct {
	CompletionTime time.Time
	TerminalState  task.State
	Message        *string
	ProcessID      string
	TaskID         string
}

type ProcessGetter

type ProcessGetter struct {
	// contains filtered or unexported fields
}

func NewProcessGetter

func NewProcessGetter(dynamoAPI dynamodbiface.DynamoDBAPI,
	tasksTableName string, currentDateGetter currentDateGetter) *ProcessGetter

func (*ProcessGetter) Get

func (getter *ProcessGetter) Get(processID string) (*process.Process, error)

type TaskCompleter

type TaskCompleter struct {
	// contains filtered or unexported fields
}

func NewTaskCompleter

func NewTaskCompleter(dynamoAPI dynamodbiface.DynamoDBAPI, tasksTableName string,
	currentDateGetter currentDateGetter) *TaskCompleter

func (*TaskCompleter) Complete

func (completer *TaskCompleter) Complete(request task.CompleteRequest) (task.CompletingResult, error)

type TaskRegisterer

type TaskRegisterer struct {
	// contains filtered or unexported fields
}

func NewTaskRegisterer

func NewTaskRegisterer(dynamoAPI dynamodbiface.DynamoDBAPI, tasksTableName string,
	currentDateGetter currentDateGetter, tasksStoringDuration time.Duration) *TaskRegisterer

func (*TaskRegisterer) Register

func (registerer *TaskRegisterer) Register(registrationData task.RegistrationData) (task.RegistrationResult, error)

type TaskToRegister

type TaskToRegister struct {
	CreationTime     time.Time
	StoringDuration  time.Duration
	RegistrationData task.RegistrationData
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL