wfindexes

package
v0.0.0-...-4450389 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigMinEventsBetweenSnapshots = 1000
	ConfigMaxSnapshotWorkflows      = 200

	ConfigEventConst           = 1
	ConfigSnapshotBaseCost     = 300
	ConfigSnapshotWorkflowCost = 300
)
View Source
const ConfigMaxProtoSize = 100 * 1024
View Source
const ConfigSinceEpochUpdate = ConfigSinceEpochUpdateDays * 24 * time.Hour
View Source
const ConfigSinceEpochUpdateDays = 30

`ConfigSinceEpochUpdate` is the time that must have passed since the epoch was updated before the epoch can become the new tail.

Variables

View Source
var ErrInvalidCommand = errors.New("invalid workflow index command")
View Source
var ErrInvalidEventType = errors.New("invalid event type")
View Source
var ErrSmallStorageReduction = errors.New("would not save much storage")
View Source
var ErrTooManyWorkflows = errors.New("too many workflows")
View Source
var ErrUnknownWorkflow = errors.New("unknown workflow")
View Source
var NoVC = events.NoVC
View Source
var RetryNoVC = events.RetryNoVC

Functions

This section is empty.

Types

type Advancer

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

The bools indicate which part of the state has been duplicated.

func (*Advancer) Advance

func (a *Advancer) Advance(s events.State, ev events.Event) events.State

type Behavior

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

func (Behavior) NewAdvancer

func (Behavior) NewAdvancer() events.Advancer

func (Behavior) NewEvent

func (Behavior) NewEvent() events.Event

func (Behavior) NewState

func (Behavior) NewState(id uuid.I) events.State

func (Behavior) Tell

func (bh Behavior) Tell(
	s events.State, c events.Command,
) ([]events.Event, error)

type CmdBeginArchiveRepo

type CmdBeginArchiveRepo struct {
	WorkflowId      uuid.I
	WorkflowEventId ulid.I
	GlobalPath      string
}

func (*CmdBeginArchiveRepo) AggregateCommand

func (*CmdBeginArchiveRepo) AggregateCommand()

type CmdBeginDuRoot

type CmdBeginDuRoot struct {
	WorkflowId      uuid.I
	WorkflowEventId ulid.I
	GlobalRoot      string
	Host            string
	HostRoot        string
}

func (*CmdBeginDuRoot) AggregateCommand

func (*CmdBeginDuRoot) AggregateCommand()

type CmdBeginFreezeRepo

type CmdBeginFreezeRepo struct {
	WorkflowId      uuid.I
	WorkflowEventId ulid.I
	GlobalPath      string
}

func (*CmdBeginFreezeRepo) AggregateCommand

func (*CmdBeginFreezeRepo) AggregateCommand()

type CmdBeginPingRegistry

type CmdBeginPingRegistry struct {
	WorkflowId      uuid.I
	WorkflowEventId ulid.I
}

func (*CmdBeginPingRegistry) AggregateCommand

func (*CmdBeginPingRegistry) AggregateCommand()

type CmdBeginSplitRoot

type CmdBeginSplitRoot struct {
	WorkflowId      uuid.I
	WorkflowEventId ulid.I
	GlobalRoot      string
	Host            string
	HostRoot        string
}

func (*CmdBeginSplitRoot) AggregateCommand

func (*CmdBeginSplitRoot) AggregateCommand()

type CmdBeginUnarchiveRepo

type CmdBeginUnarchiveRepo struct {
	WorkflowId      uuid.I
	WorkflowEventId ulid.I
	GlobalPath      string
}

func (*CmdBeginUnarchiveRepo) AggregateCommand

func (*CmdBeginUnarchiveRepo) AggregateCommand()

type CmdBeginUnfreezeRepo

type CmdBeginUnfreezeRepo struct {
	WorkflowId      uuid.I
	WorkflowEventId ulid.I
	GlobalPath      string
}

func (*CmdBeginUnfreezeRepo) AggregateCommand

func (*CmdBeginUnfreezeRepo) AggregateCommand()

type CmdCommitArchiveRepo

type CmdCommitArchiveRepo struct {
	WorkflowId      uuid.I
	WorkflowEventId ulid.I
}

func (*CmdCommitArchiveRepo) AggregateCommand

func (*CmdCommitArchiveRepo) AggregateCommand()

type CmdCommitDuRoot

type CmdCommitDuRoot struct {
	WorkflowId      uuid.I
	WorkflowEventId ulid.I
}

func (*CmdCommitDuRoot) AggregateCommand

func (*CmdCommitDuRoot) AggregateCommand()

type CmdCommitFreezeRepo

type CmdCommitFreezeRepo struct {
	WorkflowId      uuid.I
	WorkflowEventId ulid.I
}

func (*CmdCommitFreezeRepo) AggregateCommand

func (*CmdCommitFreezeRepo) AggregateCommand()

type CmdCommitPingRegistry

type CmdCommitPingRegistry struct {
	WorkflowId      uuid.I
	WorkflowEventId ulid.I
}

func (*CmdCommitPingRegistry) AggregateCommand

func (*CmdCommitPingRegistry) AggregateCommand()

type CmdCommitSplitRoot

type CmdCommitSplitRoot struct {
	WorkflowId      uuid.I
	WorkflowEventId ulid.I
}

func (*CmdCommitSplitRoot) AggregateCommand

func (*CmdCommitSplitRoot) AggregateCommand()

type CmdCommitUnarchiveRepo

type CmdCommitUnarchiveRepo struct {
	WorkflowId      uuid.I
	WorkflowEventId ulid.I
}

func (*CmdCommitUnarchiveRepo) AggregateCommand

func (*CmdCommitUnarchiveRepo) AggregateCommand()

type CmdCommitUnfreezeRepo

type CmdCommitUnfreezeRepo struct {
	WorkflowId      uuid.I
	WorkflowEventId ulid.I
}

func (*CmdCommitUnfreezeRepo) AggregateCommand

func (*CmdCommitUnfreezeRepo) AggregateCommand()

type CmdDeleteArchiveRepo

type CmdDeleteArchiveRepo struct {
	WorkflowId uuid.I
}

func (*CmdDeleteArchiveRepo) AggregateCommand

func (*CmdDeleteArchiveRepo) AggregateCommand()

type CmdDeleteDuRoot

type CmdDeleteDuRoot struct {
	WorkflowId uuid.I
}

func (*CmdDeleteDuRoot) AggregateCommand

func (*CmdDeleteDuRoot) AggregateCommand()

type CmdDeleteFreezeRepo

type CmdDeleteFreezeRepo struct {
	WorkflowId uuid.I
}

func (*CmdDeleteFreezeRepo) AggregateCommand

func (*CmdDeleteFreezeRepo) AggregateCommand()

type CmdDeletePingRegistry

type CmdDeletePingRegistry struct {
	WorkflowId uuid.I
}

func (*CmdDeletePingRegistry) AggregateCommand

func (*CmdDeletePingRegistry) AggregateCommand()

type CmdDeleteSplitRoot

type CmdDeleteSplitRoot struct {
	WorkflowId uuid.I
}

func (*CmdDeleteSplitRoot) AggregateCommand

func (*CmdDeleteSplitRoot) AggregateCommand()

type CmdDeleteUnarchiveRepo

type CmdDeleteUnarchiveRepo struct {
	WorkflowId uuid.I
}

func (*CmdDeleteUnarchiveRepo) AggregateCommand

func (*CmdDeleteUnarchiveRepo) AggregateCommand()

type CmdDeleteUnfreezeRepo

type CmdDeleteUnfreezeRepo struct {
	WorkflowId uuid.I
}

func (*CmdDeleteUnfreezeRepo) AggregateCommand

func (*CmdDeleteUnfreezeRepo) AggregateCommand()

type CmdSnapshot

type CmdSnapshot struct {
	IfStorageReduction bool
}

func (*CmdSnapshot) AggregateCommand

func (*CmdSnapshot) AggregateCommand()

type Event

type Event struct{ wfev.Event }

func (*Event) UnmarshalProto

func (ev *Event) UnmarshalProto(data []byte) error

type Indexes

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

func New

func New(journal *events.Journal) *Indexes

func (*Indexes) BeginArchiveRepo

func (r *Indexes) BeginArchiveRepo(
	id uuid.I, vid ulid.I, cmd *CmdBeginArchiveRepo,
) (ulid.I, error)

func (*Indexes) BeginDuRoot

func (r *Indexes) BeginDuRoot(
	id uuid.I, vid ulid.I, cmd *CmdBeginDuRoot,
) (ulid.I, error)

func (*Indexes) BeginFreezeRepo

func (r *Indexes) BeginFreezeRepo(
	id uuid.I, vid ulid.I, cmd *CmdBeginFreezeRepo,
) (ulid.I, error)

func (*Indexes) BeginPingRegistry

func (r *Indexes) BeginPingRegistry(
	id uuid.I, vid ulid.I, cmd *CmdBeginPingRegistry,
) (ulid.I, error)

func (*Indexes) BeginSplitRoot

func (r *Indexes) BeginSplitRoot(
	id uuid.I, vid ulid.I, cmd *CmdBeginSplitRoot,
) (ulid.I, error)

func (*Indexes) BeginUnarchiveRepo

func (r *Indexes) BeginUnarchiveRepo(
	id uuid.I, vid ulid.I, cmd *CmdBeginUnarchiveRepo,
) (ulid.I, error)

func (*Indexes) BeginUnfreezeRepo

func (r *Indexes) BeginUnfreezeRepo(
	id uuid.I, vid ulid.I, cmd *CmdBeginUnfreezeRepo,
) (ulid.I, error)

func (*Indexes) CommitArchiveRepo

func (r *Indexes) CommitArchiveRepo(
	id uuid.I, vid ulid.I, cmd *CmdCommitArchiveRepo,
) (ulid.I, error)

func (*Indexes) CommitDuRoot

func (r *Indexes) CommitDuRoot(
	id uuid.I, vid ulid.I, cmd *CmdCommitDuRoot,
) (ulid.I, error)

func (*Indexes) CommitFreezeRepo

func (r *Indexes) CommitFreezeRepo(
	id uuid.I, vid ulid.I, cmd *CmdCommitFreezeRepo,
) (ulid.I, error)

func (*Indexes) CommitPingRegistry

func (r *Indexes) CommitPingRegistry(
	id uuid.I, vid ulid.I, cmd *CmdCommitPingRegistry,
) (ulid.I, error)

func (*Indexes) CommitSplitRoot

func (r *Indexes) CommitSplitRoot(
	id uuid.I, vid ulid.I, cmd *CmdCommitSplitRoot,
) (ulid.I, error)

func (*Indexes) CommitUnarchiveRepo

func (r *Indexes) CommitUnarchiveRepo(
	id uuid.I, vid ulid.I, cmd *CmdCommitUnarchiveRepo,
) (ulid.I, error)

func (*Indexes) CommitUnfreezeRepo

func (r *Indexes) CommitUnfreezeRepo(
	id uuid.I, vid ulid.I, cmd *CmdCommitUnfreezeRepo,
) (ulid.I, error)

func (*Indexes) DeleteArchiveRepo

func (r *Indexes) DeleteArchiveRepo(
	id uuid.I, vid ulid.I, workflowId uuid.I,
) (ulid.I, error)

func (*Indexes) DeleteDuRoot

func (r *Indexes) DeleteDuRoot(
	id uuid.I, vid ulid.I, workflowId uuid.I,
) (ulid.I, error)

func (*Indexes) DeleteFreezeRepo

func (r *Indexes) DeleteFreezeRepo(
	id uuid.I, vid ulid.I, workflowId uuid.I,
) (ulid.I, error)

func (*Indexes) DeletePingRegistry

func (r *Indexes) DeletePingRegistry(
	id uuid.I, vid ulid.I, workflowId uuid.I,
) (ulid.I, error)

func (*Indexes) DeleteSplitRoot

func (r *Indexes) DeleteSplitRoot(
	id uuid.I, vid ulid.I, workflowId uuid.I,
) (ulid.I, error)

func (*Indexes) DeleteUnarchiveRepo

func (r *Indexes) DeleteUnarchiveRepo(
	id uuid.I, vid ulid.I, workflowId uuid.I,
) (ulid.I, error)

func (*Indexes) DeleteUnfreezeRepo

func (r *Indexes) DeleteUnfreezeRepo(
	id uuid.I, vid ulid.I, workflowId uuid.I,
) (ulid.I, error)

func (*Indexes) FindId

func (r *Indexes) FindId(id uuid.I) (*State, error)

func (*Indexes) Snapshot

func (r *Indexes) Snapshot(
	id uuid.I, vid ulid.I,
) (ulid.I, error)

type State

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

func (*State) AggregateState

func (*State) AggregateState()

func (*State) Id

func (s *State) Id() uuid.I

func (*State) SetVid

func (s *State) SetVid(vid ulid.I)

func (*State) Vid

func (s *State) Vid() ulid.I

Jump to

Keyboard shortcuts

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