events

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: 6 Imported by: 0

Documentation

Overview

Package `workflows/events` helps with handling lowlevel `WorkflowEvent` protos.

Use `NewPb<event>()` to create valid `WorkflowEvent` protos. Use `ParsePbWorkflowEvent()` to parse protos to higher level structs `Ev<event>`, which are then typically used in a type switch, like:

switch x := events.MustParsePbWorkflowEvent(evpb).(type) {
case *wfevents.EvShadowRepoMoveStarted:
    ...
}

See packages `workflows/*wf` for details about individual workflows:

  • du-root: `../durootwf/du-root.go`
  • move-repo: `../moverepowf/move-repo.go`
  • move-shadow: `../moveshadowwf/move-shadow.go`
  • ping-registry: `../pingregistrywf/ping-registry.go`

To find all locations where a certain event is processed, you need to grep for both `EV_FSO_...` and `Ev...`, like:

ev=EV_FSO_SHADOW_REPO_MOVE_STARTED
evrgx="\(${ev}\|Ev$(sed <<<"${ev}" -e 's/^.*EV_FSO_//' -e 's/_//g' | tr 'A-Z' 'a-z')\)"
git grep -i "${evrgx}"

It is often useful to specifically grep for the cases in switch statements:

git grep -i "case.*${evrgx}:"

Struct `Event` can be used with package `internal/events` to implement event sourcing, see specifically `internal/events.NewEngine()` and `internal/events.Behavior.NewEvent()`.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEvents

func NewEvents(
	parent ulid.I, pbs ...pb.WorkflowEvent,
) ([]events.Event, error)

func NewPbArchiveRepoCommitted

func NewPbArchiveRepoCommitted() pb.WorkflowEvent

func NewPbArchiveRepoCompletedError

func NewPbArchiveRepoCompletedError(code int32, message string) pb.WorkflowEvent

func NewPbArchiveRepoCompletedIdRef

func NewPbArchiveRepoCompletedIdRef(id uuid.I, vid ulid.I) pb.WorkflowEvent

func NewPbArchiveRepoCompletedOk

func NewPbArchiveRepoCompletedOk() pb.WorkflowEvent

func NewPbArchiveRepoDeleted

func NewPbArchiveRepoDeleted(id uuid.I) pb.WorkflowEvent

func NewPbArchiveRepoFilesCommitted

func NewPbArchiveRepoFilesCommitted() pb.WorkflowEvent

func NewPbArchiveRepoFilesCompletedError

func NewPbArchiveRepoFilesCompletedError(code int32, message string) pb.WorkflowEvent

func NewPbArchiveRepoFilesCompletedOk

func NewPbArchiveRepoFilesCompletedOk() pb.WorkflowEvent

func NewPbArchiveRepoFilesStarted

func NewPbArchiveRepoFilesStarted(aclPolicy *pb.RepoAclPolicy) pb.WorkflowEvent

func NewPbArchiveRepoGcCompleted

func NewPbArchiveRepoGcCompleted() pb.WorkflowEvent

func NewPbArchiveRepoStartedIndex

func NewPbArchiveRepoStartedIndex(ev *EvArchiveRepoStarted) pb.WorkflowEvent

func NewPbArchiveRepoStartedWorkflow

func NewPbArchiveRepoStartedWorkflow(ev *EvArchiveRepoStarted) pb.WorkflowEvent

func NewPbArchiveRepoSwapStarted

func NewPbArchiveRepoSwapStarted(wd string) pb.WorkflowEvent

func NewPbArchiveRepoTarttCompleted

func NewPbArchiveRepoTarttCompleted(tarPath string) pb.WorkflowEvent

func NewPbDuRootCommitted

func NewPbDuRootCommitted() pb.WorkflowEvent

func NewPbDuRootCompletedError

func NewPbDuRootCompletedError(code int32, message string) pb.WorkflowEvent

func NewPbDuRootCompletedIdRef

func NewPbDuRootCompletedIdRef(id uuid.I, vid ulid.I) pb.WorkflowEvent

func NewPbDuRootCompletedOk

func NewPbDuRootCompletedOk() pb.WorkflowEvent

func NewPbDuRootDeleted

func NewPbDuRootDeleted(id uuid.I) pb.WorkflowEvent

func NewPbDuRootStartedIndex

func NewPbDuRootStartedIndex(ev *EvDuRootStarted) pb.WorkflowEvent

func NewPbDuRootStartedWorkflow

func NewPbDuRootStartedWorkflow(ev *EvDuRootStarted) pb.WorkflowEvent

func NewPbDuUpdated

func NewPbDuUpdated(ev *EvDuUpdated) pb.WorkflowEvent

func NewPbFreezeRepoCommitted

func NewPbFreezeRepoCommitted() pb.WorkflowEvent

func NewPbFreezeRepoCompleted2Error

func NewPbFreezeRepoCompleted2Error(code int32, message string) pb.WorkflowEvent

func NewPbFreezeRepoCompleted2IdRef

func NewPbFreezeRepoCompleted2IdRef(id uuid.I, vid ulid.I) pb.WorkflowEvent

func NewPbFreezeRepoCompleted2Ok

func NewPbFreezeRepoCompleted2Ok() pb.WorkflowEvent

func NewPbFreezeRepoDeleted

func NewPbFreezeRepoDeleted(id uuid.I) pb.WorkflowEvent

func NewPbFreezeRepoFilesCompletedError

func NewPbFreezeRepoFilesCompletedError(code int32, message string) pb.WorkflowEvent

func NewPbFreezeRepoFilesCompletedOk

func NewPbFreezeRepoFilesCompletedOk() pb.WorkflowEvent

func NewPbFreezeRepoFilesStarted

func NewPbFreezeRepoFilesStarted() pb.WorkflowEvent

func NewPbFreezeRepoStarted2Index

func NewPbFreezeRepoStarted2Index(ev *EvFreezeRepoStarted2) pb.WorkflowEvent

func NewPbFreezeRepoStarted2Workflow

func NewPbFreezeRepoStarted2Workflow(ev *EvFreezeRepoStarted2) pb.WorkflowEvent

func NewPbPingRegistryCommitted

func NewPbPingRegistryCommitted() pb.WorkflowEvent

func NewPbPingRegistryCompleted

func NewPbPingRegistryCompleted() pb.WorkflowEvent

func NewPbPingRegistryCompletedIdRef

func NewPbPingRegistryCompletedIdRef(id uuid.I, vid ulid.I) pb.WorkflowEvent

func NewPbPingRegistryDeleted

func NewPbPingRegistryDeleted(id uuid.I) pb.WorkflowEvent

func NewPbPingRegistryStartedIndex

func NewPbPingRegistryStartedIndex(
	ev *EvPingRegistryStarted,
) pb.WorkflowEvent

func NewPbPingRegistryStartedWorkflow

func NewPbPingRegistryStartedWorkflow(
	ev *EvPingRegistryStarted,
) pb.WorkflowEvent

func NewPbRepoMoveAppAccepted

func NewPbRepoMoveAppAccepted() pb.WorkflowEvent

func NewPbRepoMoveCommitted

func NewPbRepoMoveCommitted() pb.WorkflowEvent

func NewPbRepoMoveStaReleased

func NewPbRepoMoveStaReleased() pb.WorkflowEvent

func NewPbRepoMoveStarted

func NewPbRepoMoveStarted(ev *EvRepoMoveStarted) pb.WorkflowEvent

func NewPbRepoMoved

func NewPbRepoMoved(ev *EvRepoMoved) pb.WorkflowEvent

func NewPbServerPinged

func NewPbServerPinged(code int32, message string) pb.WorkflowEvent

func NewPbServerPingsGathered

func NewPbServerPingsGathered(code int32, message string) pb.WorkflowEvent

func NewPbShadowRepoMoveCommitted

func NewPbShadowRepoMoveCommitted() pb.WorkflowEvent

func NewPbShadowRepoMoveStaDisabled

func NewPbShadowRepoMoveStaDisabled() pb.WorkflowEvent

func NewPbShadowRepoMoveStarted

func NewPbShadowRepoMoveStarted(
	repoId uuid.I, repoEventId ulid.I,
) pb.WorkflowEvent

func NewPbShadowRepoMoved

func NewPbShadowRepoMoved(repoId uuid.I) pb.WorkflowEvent

func NewPbSnapshotBegin

func NewPbSnapshotBegin() pb.WorkflowEvent

func NewPbSnapshotEnd

func NewPbSnapshotEnd() pb.WorkflowEvent

func NewPbSplitRootAnalysisCompletedError

func NewPbSplitRootAnalysisCompletedError(
	code int32, message string,
) pb.WorkflowEvent

func NewPbSplitRootAnalysisCompletedOk

func NewPbSplitRootAnalysisCompletedOk() pb.WorkflowEvent

func NewPbSplitRootCommitted

func NewPbSplitRootCommitted() pb.WorkflowEvent

func NewPbSplitRootCompletedError

func NewPbSplitRootCompletedError(code int32, message string) pb.WorkflowEvent

func NewPbSplitRootCompletedIdRef

func NewPbSplitRootCompletedIdRef(id uuid.I, vid ulid.I) pb.WorkflowEvent

func NewPbSplitRootCompletedOk

func NewPbSplitRootCompletedOk() pb.WorkflowEvent

func NewPbSplitRootDecisionAppended

func NewPbSplitRootDecisionAppended(
	ev *EvSplitRootDecisionAppended,
) pb.WorkflowEvent

func NewPbSplitRootDeleted

func NewPbSplitRootDeleted(id uuid.I) pb.WorkflowEvent

func NewPbSplitRootDuAppended

func NewPbSplitRootDuAppended(ev *EvSplitRootDuAppended) pb.WorkflowEvent

func NewPbSplitRootDuCompletedError

func NewPbSplitRootDuCompletedError(
	code int32, message string,
) pb.WorkflowEvent

func NewPbSplitRootDuCompletedOk

func NewPbSplitRootDuCompletedOk() pb.WorkflowEvent

func NewPbSplitRootStartedIndex

func NewPbSplitRootStartedIndex(ev *EvSplitRootStarted) pb.WorkflowEvent

func NewPbSplitRootStartedWorkflow

func NewPbSplitRootStartedWorkflow(ev *EvSplitRootStarted) pb.WorkflowEvent

func NewPbSplitRootSuggestionAppended

func NewPbSplitRootSuggestionAppended(
	ev *EvSplitRootSuggestionAppended,
) pb.WorkflowEvent

func NewPbUnarchiveRepoCommitted

func NewPbUnarchiveRepoCommitted() pb.WorkflowEvent

func NewPbUnarchiveRepoCompletedError

func NewPbUnarchiveRepoCompletedError(code int32, message string) pb.WorkflowEvent

func NewPbUnarchiveRepoCompletedIdRef

func NewPbUnarchiveRepoCompletedIdRef(id uuid.I, vid ulid.I) pb.WorkflowEvent

func NewPbUnarchiveRepoCompletedOk

func NewPbUnarchiveRepoCompletedOk() pb.WorkflowEvent

func NewPbUnarchiveRepoDeleted

func NewPbUnarchiveRepoDeleted(id uuid.I) pb.WorkflowEvent

func NewPbUnarchiveRepoFilesCommitted

func NewPbUnarchiveRepoFilesCommitted() pb.WorkflowEvent

func NewPbUnarchiveRepoFilesCompletedError

func NewPbUnarchiveRepoFilesCompletedError(code int32, message string) pb.WorkflowEvent

func NewPbUnarchiveRepoFilesCompletedOk

func NewPbUnarchiveRepoFilesCompletedOk() pb.WorkflowEvent

func NewPbUnarchiveRepoFilesStarted

func NewPbUnarchiveRepoFilesStarted(aclPolicy *pb.RepoAclPolicy) pb.WorkflowEvent

func NewPbUnarchiveRepoGcCompleted

func NewPbUnarchiveRepoGcCompleted() pb.WorkflowEvent

func NewPbUnarchiveRepoStartedIndex

func NewPbUnarchiveRepoStartedIndex(ev *EvUnarchiveRepoStarted) pb.WorkflowEvent

func NewPbUnarchiveRepoStartedWorkflow

func NewPbUnarchiveRepoStartedWorkflow(ev *EvUnarchiveRepoStarted) pb.WorkflowEvent

func NewPbUnarchiveRepoTarttCompletedError

func NewPbUnarchiveRepoTarttCompletedError(code int32, message string) pb.WorkflowEvent

func NewPbUnarchiveRepoTarttCompletedOk

func NewPbUnarchiveRepoTarttCompletedOk() pb.WorkflowEvent

func NewPbUnarchiveRepoTarttStarted

func NewPbUnarchiveRepoTarttStarted(wd string) pb.WorkflowEvent

func NewPbUnfreezeRepoCommitted

func NewPbUnfreezeRepoCommitted() pb.WorkflowEvent

func NewPbUnfreezeRepoCompleted2Error

func NewPbUnfreezeRepoCompleted2Error(code int32, message string) pb.WorkflowEvent

func NewPbUnfreezeRepoCompleted2IdRef

func NewPbUnfreezeRepoCompleted2IdRef(id uuid.I, vid ulid.I) pb.WorkflowEvent

func NewPbUnfreezeRepoCompleted2Ok

func NewPbUnfreezeRepoCompleted2Ok() pb.WorkflowEvent

func NewPbUnfreezeRepoDeleted

func NewPbUnfreezeRepoDeleted(id uuid.I) pb.WorkflowEvent

func NewPbUnfreezeRepoFilesCompletedError

func NewPbUnfreezeRepoFilesCompletedError(code int32, message string) pb.WorkflowEvent

func NewPbUnfreezeRepoFilesCompletedOk

func NewPbUnfreezeRepoFilesCompletedOk() pb.WorkflowEvent

func NewPbUnfreezeRepoFilesStarted

func NewPbUnfreezeRepoFilesStarted() pb.WorkflowEvent

func NewPbUnfreezeRepoStarted2Index

func NewPbUnfreezeRepoStarted2Index(ev *EvUnfreezeRepoStarted2) pb.WorkflowEvent

func NewPbUnfreezeRepoStarted2Workflow

func NewPbUnfreezeRepoStarted2Workflow(ev *EvUnfreezeRepoStarted2) pb.WorkflowEvent

func NewPbWorkflowIndexSnapshotState

func NewPbWorkflowIndexSnapshotState(
	ev *EvWorkflowIndexSnapshotState,
) pb.WorkflowEvent

Types

type EvArchiveRepoCommitted

type EvArchiveRepoCommitted struct{}

`WorkflowEvent_EV_FSO_ARCHIVE_REPO_COMMITTED` aka `EvArchiveRepoCommitted`.

func (EvArchiveRepoCommitted) WorkflowEvent

func (EvArchiveRepoCommitted) WorkflowEvent()

type EvArchiveRepoCompleted

type EvArchiveRepoCompleted struct {
	StatusCode      int32  // only in archiverepowf, repos, and registry.
	StatusMessage   string // only in archiverepowf, repos, and registry.
	WorkflowId      uuid.I // only in workflow indexes.
	WorkflowEventId ulid.I // only in workflow indexes.
}

`WorkflowEvent_EV_FSO_ARCHIVE_REPO_COMPLETED` aka `EvArchiveRepoCompleted`. See archive-repo workflow aka archiverepowf.

func (EvArchiveRepoCompleted) WorkflowEvent

func (EvArchiveRepoCompleted) WorkflowEvent()

type EvArchiveRepoDeleted

type EvArchiveRepoDeleted struct {
	WorkflowId uuid.I // only in workflow indexes.
}

`WorkflowEvent_EV_FSO_ARCHIVE_REPO_DELETED` aka `EvArchiveRepoDeleted`. See split-root workflow aka splitrootwf.

func (EvArchiveRepoDeleted) WorkflowEvent

func (EvArchiveRepoDeleted) WorkflowEvent()

type EvArchiveRepoFilesCommitted

type EvArchiveRepoFilesCommitted struct{}

`WorkflowEvent_EV_FSO_ARCHIVE_REPO_FILES_COMMITTED` aka `EvArchiveRepoFilesCommitted`.

func (EvArchiveRepoFilesCommitted) WorkflowEvent

func (EvArchiveRepoFilesCommitted) WorkflowEvent()

type EvArchiveRepoFilesCompleted

type EvArchiveRepoFilesCompleted struct {
	StatusCode    int32
	StatusMessage string
}

`WorkflowEvent_EV_FSO_ARCHIVE_REPO_FILES_COMPLETED` aka `EvArchiveRepoFilesCompleted`. See archive-repo workflow aka archiverepowf.

func (EvArchiveRepoFilesCompleted) WorkflowEvent

func (EvArchiveRepoFilesCompleted) WorkflowEvent()

type EvArchiveRepoFilesStarted

type EvArchiveRepoFilesStarted struct {
	AclPolicy *pb.RepoAclPolicy
}

`WorkflowEvent_EV_FSO_ARCHIVE_REPO_FILES_STARTED` aka `EvArchiveRepoFilesStarted`. See archive-repo workflow aka archiverepowf.

func (EvArchiveRepoFilesStarted) WorkflowEvent

func (EvArchiveRepoFilesStarted) WorkflowEvent()

type EvArchiveRepoGcCompleted

type EvArchiveRepoGcCompleted struct{}

`WorkflowEvent_EV_FSO_ARCHIVE_REPO_GC_COMPLETED` aka `EvArchiveRepoGcCompleted`.

func (EvArchiveRepoGcCompleted) WorkflowEvent

func (EvArchiveRepoGcCompleted) WorkflowEvent()

type EvArchiveRepoStarted

type EvArchiveRepoStarted struct {
	RegistryId       uuid.I // only archiverepowf.
	RegistryName     string // only archiverepowf.
	StartRegistryVid ulid.I // only archiverepowf (optional).
	RepoId           uuid.I // only archiverepowf.
	StartRepoVid     ulid.I // only archiverepowf (optional).
	RepoGlobalPath   string // archiverepowf and workflow indexes.
	AuthorName       string // only archiverepowf.
	AuthorEmail      string // only archiverepowf.
	WorkflowId       uuid.I // only workflow indexes.
	WorkflowEventId  ulid.I // only workflow indexes.
}

`WorkflowEvent_EV_FSO_ARCHIVE_REPO_STARTED` aka `EvArchiveRepoStarted`. See archive-repo workflow aka archiverepowf.

func (EvArchiveRepoStarted) WorkflowEvent

func (EvArchiveRepoStarted) WorkflowEvent()

type EvArchiveRepoSwapStarted

type EvArchiveRepoSwapStarted struct {
	WorkingDir string
}

`WorkflowEvent_EV_FSO_ARCHIVE_REPO_SWAP_STARTED` aka `EvArchiveRepoSwapStarted`. See archive-repo workflow aka archiverepowf.

func (EvArchiveRepoSwapStarted) WorkflowEvent

func (EvArchiveRepoSwapStarted) WorkflowEvent()

type EvArchiveRepoTarttCompleted

type EvArchiveRepoTarttCompleted struct {
	TarPath string
}

`WorkflowEvent_EV_FSO_ARCHIVE_REPO_TARTT_COMPLETED` aka `EvArchiveRepoTarttCompleted`. See archive-repo workflow aka archiverepowf.

func (EvArchiveRepoTarttCompleted) WorkflowEvent

func (EvArchiveRepoTarttCompleted) WorkflowEvent()

type EvDuRootCommitted

type EvDuRootCommitted struct{}

`WorkflowEvent_EV_FSO_DU_ROOT_COMMITTED` aka `EvDuRootCommitted`. See du-root workflow aka durootwf.

func (EvDuRootCommitted) WorkflowEvent

func (EvDuRootCommitted) WorkflowEvent()

type EvDuRootCompleted

type EvDuRootCompleted struct {
	StatusCode      int32  // only in durootwf
	StatusMessage   string // only in durootwf
	WorkflowId      uuid.I // only in workflow indexes.
	WorkflowEventId ulid.I // only in workflow indexes.
}

`WorkflowEvent_EV_FSO_DU_ROOT_COMPLETED` aka `EvDuRootCompleted`. See du-root workflow aka durootwf.

func (EvDuRootCompleted) WorkflowEvent

func (EvDuRootCompleted) WorkflowEvent()

type EvDuRootDeleted

type EvDuRootDeleted struct {
	WorkflowId uuid.I // only in workflow indexes.
}

`WorkflowEvent_EV_FSO_DU_ROOT_DELETED` aka `EvDuRootDeleted`. See du-root workflow aka durootwf.

func (EvDuRootDeleted) WorkflowEvent

func (EvDuRootDeleted) WorkflowEvent()

type EvDuRootStarted

type EvDuRootStarted struct {
	RegistryId      uuid.I // only in du-root workflow.
	WorkflowId      uuid.I // only in workflow indexes.
	WorkflowEventId ulid.I // only in workflow indexes.
	GlobalRoot      string
	Host            string
	HostRoot        string
}

`WorkflowEvent_EV_FSO_DU_ROOT_STARTED` aka `EvDuRootStarted`. See du-root workflow aka durootwf.

func (EvDuRootStarted) WorkflowEvent

func (EvDuRootStarted) WorkflowEvent()

type EvDuUpdated

type EvDuUpdated struct {
	Path  string
	Usage int64
}

`WorkflowEvent_EV_FSO_DU_UPDATED` aka `EvDuUpdated`. See du-root workflow aka durootwf.

func (EvDuUpdated) WorkflowEvent

func (EvDuUpdated) WorkflowEvent()

type EvFreezeRepoCommitted

type EvFreezeRepoCommitted struct{}

`WorkflowEvent_EV_FSO_FREEZE_REPO_COMMITTED` aka `EvFreezeRepoCommitted`.

func (EvFreezeRepoCommitted) WorkflowEvent

func (EvFreezeRepoCommitted) WorkflowEvent()

type EvFreezeRepoCompleted2

type EvFreezeRepoCompleted2 struct {
	StatusCode      int32  // only in freezerepowf, repos, and registry.
	StatusMessage   string // only in freezerepowf, repos, and registry.
	WorkflowId      uuid.I // only in workflow indexes.
	WorkflowEventId ulid.I // only in workflow indexes.
}

`WorkflowEvent_EV_FSO_FREEZE_REPO_COMPLETED_2` aka `EvFreezeRepoCompleted2`. See freeze-repo workflow aka freezerepowf.

func (EvFreezeRepoCompleted2) WorkflowEvent

func (EvFreezeRepoCompleted2) WorkflowEvent()

type EvFreezeRepoDeleted

type EvFreezeRepoDeleted struct {
	WorkflowId uuid.I // only in workflow indexes.
}

`WorkflowEvent_EV_FSO_FREEZE_REPO_DELETED` aka `EvFreezeRepoDeleted`. See split-root workflow aka splitrootwf.

func (EvFreezeRepoDeleted) WorkflowEvent

func (EvFreezeRepoDeleted) WorkflowEvent()

type EvFreezeRepoFilesCompleted

type EvFreezeRepoFilesCompleted struct {
	StatusCode    int32
	StatusMessage string
}

`WorkflowEvent_EV_FSO_FREEZE_REPO_FILES_COMPLETED` aka `EvFreezeRepoFilesCompleted`. See freeze-repo workflow aka freezerepowf.

func (EvFreezeRepoFilesCompleted) WorkflowEvent

func (EvFreezeRepoFilesCompleted) WorkflowEvent()

type EvFreezeRepoFilesStarted

type EvFreezeRepoFilesStarted struct{}

`WorkflowEvent_EV_FSO_FREEZE_REPO_FILES_STARTED` aka `EvFreezeRepoFilesStarted`. See freeze-repo workflow aka freezerepowf.

func (EvFreezeRepoFilesStarted) WorkflowEvent

func (EvFreezeRepoFilesStarted) WorkflowEvent()

type EvFreezeRepoStarted2

type EvFreezeRepoStarted2 struct {
	RegistryId       uuid.I // only freezerepowf.
	RegistryName     string // only freezerepowf.
	StartRegistryVid ulid.I // only freezerepowf (optional).
	RepoId           uuid.I // only freezerepowf.
	StartRepoVid     ulid.I // only freezerepowf (optional).
	RepoGlobalPath   string // freezerepowf and workflow indexes.
	AuthorName       string // only freezerepowf.
	AuthorEmail      string // only freezerepowf.
	WorkflowId       uuid.I // only workflow indexes.
	WorkflowEventId  ulid.I // only workflow indexes.
}

`WorkflowEvent_EV_FSO_FREEZE_REPO_STARTED_2` aka `EvFreezeRepoStarted2`. See freeze-repo workflow aka freezerepowf.

func (EvFreezeRepoStarted2) WorkflowEvent

func (EvFreezeRepoStarted2) WorkflowEvent()

type EvPingRegistryCommitted

type EvPingRegistryCommitted struct{}

`WorkflowEvent_EV_FSO_PING_REGISTRY_COMMITTED` aka `EvPingRegistryCommitted`.

func (EvPingRegistryCommitted) WorkflowEvent

func (EvPingRegistryCommitted) WorkflowEvent()

type EvPingRegistryCompleted

type EvPingRegistryCompleted struct {
	WorkflowId      uuid.I // only in workflow indexes.
	WorkflowEventId ulid.I // only in workflow indexes.
}

`WorkflowEvent_EV_FSO_PING_REGISTRY_COMPLETED` aka `EvPingRegistryCompleted`.

func (EvPingRegistryCompleted) WorkflowEvent

func (EvPingRegistryCompleted) WorkflowEvent()

type EvPingRegistryDeleted

type EvPingRegistryDeleted struct {
	WorkflowId uuid.I // only in workflow indexes.
}

`WorkflowEvent_EV_FSO_PING_REGISTRY_DELETED` aka `EvPingRegistryDeleted`. See ping-registry workflow aka pingregistrywf.

func (EvPingRegistryDeleted) WorkflowEvent

func (EvPingRegistryDeleted) WorkflowEvent()

type EvPingRegistryStarted

type EvPingRegistryStarted struct {
	RegistryId      uuid.I // only in ping-registry workflow.
	WorkflowId      uuid.I // only in workflow indexes.
	WorkflowEventId ulid.I // only in workflow indexes.
}

`WorkflowEvent_EV_FSO_PING_REGISTRY_STARTED` aka `EvPingRegistryStarted`.

func (EvPingRegistryStarted) WorkflowEvent

func (EvPingRegistryStarted) WorkflowEvent()

type EvRepoMoveAppAccepted

type EvRepoMoveAppAccepted struct{}

`WorkflowEvent_EV_FSO_REPO_APP_ACCEPTED` aka `EvRepoMoveAppAccepted` indicates that Nogappd has acknowledged the repo move.

func (EvRepoMoveAppAccepted) WorkflowEvent

func (EvRepoMoveAppAccepted) WorkflowEvent()

type EvRepoMoveCommitted

type EvRepoMoveCommitted struct{}

`WorkflowEvent_EV_FSO_REPO_MOVE_COMMITTED` aka `EvRepoMoveCommitted` indicates that the workflow completed successfully.

func (EvRepoMoveCommitted) WorkflowEvent

func (EvRepoMoveCommitted) WorkflowEvent()

type EvRepoMoveStaReleased

type EvRepoMoveStaReleased struct{}

`WorkflowEvent_EV_FSO_REPO_STA_RELEASED` aka `EvRepoMoveStaReleased` indicates that Nogfsostad has released the repo.

func (EvRepoMoveStaReleased) WorkflowEvent

func (EvRepoMoveStaReleased) WorkflowEvent()

type EvRepoMoveStarted

type EvRepoMoveStarted struct {
	RepoId        uuid.I
	RepoEventId   ulid.I
	OldGlobalPath string
	OldFileHost   string
	OldHostPath   string
	OldShadowPath string
	NewGlobalPath string
	NewFileHost   string
	NewHostPath   string
}

`WorkflowEvent_EV_FSO_REPO_MOVE_STARTED` aka `EvRepoMoveStarted` initializes a repo-move workflow. It refers to the corresponding repo event that started the workflow.

func (EvRepoMoveStarted) WorkflowEvent

func (EvRepoMoveStarted) WorkflowEvent()

type EvRepoMoved

type EvRepoMoved struct {
	RepoId     uuid.I
	GlobalPath string
	FileHost   string
	HostPath   string
	ShadowPath string
}

`WorkflowEvent_EV_FSO_REPO_MOVED` aka `EvRepoMoved` completes a repo-move workflow.

func (EvRepoMoved) WorkflowEvent

func (EvRepoMoved) WorkflowEvent()

type EvServerPinged

type EvServerPinged struct {
	StatusCode    int32
	StatusMessage string
}

`WorkflowEvent_EV_FSO_SERVER_PINGED` aka `EvServerPinged`.

func (EvServerPinged) WorkflowEvent

func (EvServerPinged) WorkflowEvent()

type EvServerPingsGathered

type EvServerPingsGathered struct {
	StatusCode    int32
	StatusMessage string
}

`WorkflowEvent_EV_FSO_SERVER_PINGS_GATHERED` aka `EvServerPingsGathered`.

func (EvServerPingsGathered) WorkflowEvent

func (EvServerPingsGathered) WorkflowEvent()

type EvShadowRepoMoveCommitted

type EvShadowRepoMoveCommitted struct{}

`WorkflowEvent_EV_FSO_SHADOW_REPO_MOVE_COMMITTED` aka `EvShadowRepoMoveCommitted` indicates that the workflow completed successfully.

func (EvShadowRepoMoveCommitted) WorkflowEvent

func (EvShadowRepoMoveCommitted) WorkflowEvent()

type EvShadowRepoMoveStaDisabled

type EvShadowRepoMoveStaDisabled struct{}

`WorkflowEvent_EV_FSO_SHADOW_REPO_MOVED` aka `EvShadowRepoMoveStaDisabled` indicates that Nogfsostad has disabled the shadow repo.

func (EvShadowRepoMoveStaDisabled) WorkflowEvent

func (EvShadowRepoMoveStaDisabled) WorkflowEvent()

type EvShadowRepoMoveStarted

type EvShadowRepoMoveStarted struct {
	RepoId      uuid.I
	RepoEventId ulid.I
}

`WorkflowEvent_EV_FSO_SHADOW_REPO_MOVE_STARTED` aka `EvShadowRepoMoveStarted` initializes a shadow-move workflow. It refers to the corresponding repo event that started the workflow.

func (EvShadowRepoMoveStarted) WorkflowEvent

func (EvShadowRepoMoveStarted) WorkflowEvent()

type EvShadowRepoMoved

type EvShadowRepoMoved struct {
	RepoId uuid.I
}

`WorkflowEvent_EV_FSO_SHADOW_REPO_MOVED` aka `EvShadowRepoMoved` completes a shadow-move workflow.

func (EvShadowRepoMoved) WorkflowEvent

func (EvShadowRepoMoved) WorkflowEvent()

type EvSnapshotBegin

type EvSnapshotBegin struct{}

func (EvSnapshotBegin) WorkflowEvent

func (EvSnapshotBegin) WorkflowEvent()

type EvSnapshotEnd

type EvSnapshotEnd struct{}

func (EvSnapshotEnd) WorkflowEvent

func (EvSnapshotEnd) WorkflowEvent()

type EvSplitRootAnalysisCompleted

type EvSplitRootAnalysisCompleted struct {
	StatusCode    int32
	StatusMessage string // only if `StatusCode != 0`.
}

`WorkflowEvent_EV_FSO_SPLIT_ROOT_ANALYSIS_COMPLETED` aka `EvSplitRootAnalysisCompleted`. See split-root workflow aka splitrootwf.

func (EvSplitRootAnalysisCompleted) WorkflowEvent

func (EvSplitRootAnalysisCompleted) WorkflowEvent()

type EvSplitRootCommitted

type EvSplitRootCommitted struct{}

`WorkflowEvent_EV_FSO_SPLIT_ROOT_COMMITTED` aka `EvSplitRootCommitted`.

func (EvSplitRootCommitted) WorkflowEvent

func (EvSplitRootCommitted) WorkflowEvent()

type EvSplitRootCompleted

type EvSplitRootCompleted struct {
	StatusCode      int32  // only in splitrootwf
	StatusMessage   string // only in splitrootwf
	WorkflowId      uuid.I // only in workflow indexes.
	WorkflowEventId ulid.I // only in workflow indexes.
}

`WorkflowEvent_EV_FSO_SPLIT_ROOT_COMPLETED` aka `EvSplitRootCompleted`. See split-root workflow aka splitrootwf.

func (EvSplitRootCompleted) WorkflowEvent

func (EvSplitRootCompleted) WorkflowEvent()

type EvSplitRootDecisionAppended

type EvSplitRootDecisionAppended struct {
	Path     string
	Decision pb.FsoSplitRootDecision_Decision
}

`WorkflowEvent_EV_FSO_SPLIT_ROOT_DECISION_APPENDED` aka `EvSplitRootDecisionAppended`. See split-root workflow aka splitrootwf.

func (EvSplitRootDecisionAppended) WorkflowEvent

func (EvSplitRootDecisionAppended) WorkflowEvent()

type EvSplitRootDeleted

type EvSplitRootDeleted struct {
	WorkflowId uuid.I // only in workflow indexes.
}

`WorkflowEvent_EV_FSO_SPLIT_ROOT_DELETED` aka `EvSplitRootDeleted`. See split-root workflow aka splitrootwf.

func (EvSplitRootDeleted) WorkflowEvent

func (EvSplitRootDeleted) WorkflowEvent()

type EvSplitRootDuAppended

type EvSplitRootDuAppended struct {
	Path  string
	Usage int64
}

`WorkflowEvent_EV_FSO_SPLIT_ROOT_DU_APPENDED` aka `EvSplitRootDuAppended`. See split-root workflow aka splitrootwf.

func (EvSplitRootDuAppended) WorkflowEvent

func (EvSplitRootDuAppended) WorkflowEvent()

type EvSplitRootDuCompleted

type EvSplitRootDuCompleted struct {
	StatusCode    int32
	StatusMessage string // only if `StatusCode != 0`.
}

`WorkflowEvent_EV_FSO_SPLIT_ROOT_DU_COMPLETED` aka `EvSplitRootDuCompleted`. See split-root workflow aka splitrootwf.

func (EvSplitRootDuCompleted) WorkflowEvent

func (EvSplitRootDuCompleted) WorkflowEvent()

type EvSplitRootStarted

type EvSplitRootStarted struct {
	RegistryId      uuid.I // only in split-root workflow.
	WorkflowId      uuid.I // only in workflow indexes.
	WorkflowEventId ulid.I // only in workflow indexes.
	GlobalRoot      string
	Host            string
	HostRoot        string
	MaxDepth        int32 // only in split-root workflow
	MinDiskUsage    int64 // only in split-root workflow
	MaxDiskUsage    int64 // only in split-root workflow
}

`WorkflowEvent_EV_FSO_SPLIT_ROOT_STARTED` aka `EvSplitRootStarted`. See split-root workflow aka splitrootwf.

func (EvSplitRootStarted) WorkflowEvent

func (EvSplitRootStarted) WorkflowEvent()

type EvSplitRootSuggestionAppended

type EvSplitRootSuggestionAppended struct {
	Path       string
	Suggestion pb.FsoSplitRootSuggestion_Suggestion
}

`WorkflowEvent_EV_FSO_SPLIT_ROOT_SUGGESTION_APPENDED` aka `EvSplitRootSuggestionAppended`. See split-root workflow aka splitrootwf.

func (EvSplitRootSuggestionAppended) WorkflowEvent

func (EvSplitRootSuggestionAppended) WorkflowEvent()

type EvUnarchiveRepoCommitted

type EvUnarchiveRepoCommitted struct{}

`WorkflowEvent_EV_FSO_UNARCHIVE_REPO_COMMITTED` aka `EvUnarchiveRepoCommitted`.

func (EvUnarchiveRepoCommitted) WorkflowEvent

func (EvUnarchiveRepoCommitted) WorkflowEvent()

type EvUnarchiveRepoCompleted

type EvUnarchiveRepoCompleted struct {
	StatusCode      int32  // only in unarchiverepowf, repos, and registry.
	StatusMessage   string // only in unarchiverepowf, repos, and registry.
	WorkflowId      uuid.I // only in workflow indexes.
	WorkflowEventId ulid.I // only in workflow indexes.
}

`WorkflowEvent_EV_FSO_UNARCHIVE_REPO_COMPLETED` aka `EvUnarchiveRepoCompleted`. See unarchive-repo workflow aka unarchiverepowf.

func (EvUnarchiveRepoCompleted) WorkflowEvent

func (EvUnarchiveRepoCompleted) WorkflowEvent()

type EvUnarchiveRepoDeleted

type EvUnarchiveRepoDeleted struct {
	WorkflowId uuid.I // only in workflow indexes.
}

`WorkflowEvent_EV_FSO_UNARCHIVE_REPO_DELETED` aka `EvUnarchiveRepoDeleted`. See split-root workflow aka splitrootwf.

func (EvUnarchiveRepoDeleted) WorkflowEvent

func (EvUnarchiveRepoDeleted) WorkflowEvent()

type EvUnarchiveRepoFilesCommitted

type EvUnarchiveRepoFilesCommitted struct{}

`WorkflowEvent_EV_FSO_UNARCHIVE_REPO_FILES_COMMITTED` aka `EvUnarchiveRepoFilesCommitted`.

func (EvUnarchiveRepoFilesCommitted) WorkflowEvent

func (EvUnarchiveRepoFilesCommitted) WorkflowEvent()

type EvUnarchiveRepoFilesCompleted

type EvUnarchiveRepoFilesCompleted struct {
	StatusCode    int32
	StatusMessage string
}

`WorkflowEvent_EV_FSO_UNARCHIVE_REPO_FILES_COMPLETED` aka `EvUnarchiveRepoFilesCompleted`. See unarchive-repo workflow aka unarchiverepowf.

func (EvUnarchiveRepoFilesCompleted) WorkflowEvent

func (EvUnarchiveRepoFilesCompleted) WorkflowEvent()

type EvUnarchiveRepoFilesStarted

type EvUnarchiveRepoFilesStarted struct {
	AclPolicy *pb.RepoAclPolicy
}

`WorkflowEvent_EV_FSO_UNARCHIVE_REPO_FILES_STARTED` aka `EvUnarchiveRepoFilesStarted`. See unarchive-repo workflow aka unarchiverepowf.

func (EvUnarchiveRepoFilesStarted) WorkflowEvent

func (EvUnarchiveRepoFilesStarted) WorkflowEvent()

type EvUnarchiveRepoGcCompleted

type EvUnarchiveRepoGcCompleted struct{}

`WorkflowEvent_EV_FSO_UNARCHIVE_REPO_GC_COMPLETED` aka `EvUnarchiveRepoGcCompleted`.

func (EvUnarchiveRepoGcCompleted) WorkflowEvent

func (EvUnarchiveRepoGcCompleted) WorkflowEvent()

type EvUnarchiveRepoStarted

type EvUnarchiveRepoStarted struct {
	RegistryId       uuid.I // only unarchiverepowf.
	RegistryName     string // only unarchiverepowf.
	StartRegistryVid ulid.I // only unarchiverepowf (optional).
	RepoId           uuid.I // only unarchiverepowf.
	StartRepoVid     ulid.I // only unarchiverepowf (optional).
	RepoGlobalPath   string // unarchiverepowf and workflow indexes.
	RepoArchiveURL   string // only unarchiverepowf.
	TarttTarPath     string // only unarchiverepowf.
	AuthorName       string // only unarchiverepowf.
	AuthorEmail      string // only unarchiverepowf.
	WorkflowId       uuid.I // only workflow indexes.
	WorkflowEventId  ulid.I // only workflow indexes.
}

`WorkflowEvent_EV_FSO_UNARCHIVE_REPO_STARTED` aka `EvUnarchiveRepoStarted`. See unarchive-repo workflow aka unarchiverepowf.

func (EvUnarchiveRepoStarted) WorkflowEvent

func (EvUnarchiveRepoStarted) WorkflowEvent()

type EvUnarchiveRepoTarttCompleted

type EvUnarchiveRepoTarttCompleted struct {
	StatusCode    int32
	StatusMessage string
}

`WorkflowEvent_EV_FSO_UNARCHIVE_REPO_TARTT_COMPLETED` aka `EvUnarchiveRepoTarttCompleted`. See unarchive-repo workflow aka unarchiverepowf.

func (EvUnarchiveRepoTarttCompleted) WorkflowEvent

func (EvUnarchiveRepoTarttCompleted) WorkflowEvent()

type EvUnarchiveRepoTarttStarted

type EvUnarchiveRepoTarttStarted struct {
	WorkingDir string
}

`WorkflowEvent_EV_FSO_UNARCHIVE_REPO_TARTT_STARTED` aka `EvUnarchiveRepoTarttStarted`. See unarchive-repo workflow aka unarchiverepowf.

func (EvUnarchiveRepoTarttStarted) WorkflowEvent

func (EvUnarchiveRepoTarttStarted) WorkflowEvent()

type EvUnfreezeRepoCommitted

type EvUnfreezeRepoCommitted struct{}

`WorkflowEvent_EV_FSO_UNFREEZE_REPO_COMMITTED` aka `EvUnfreezeRepoCommitted`.

func (EvUnfreezeRepoCommitted) WorkflowEvent

func (EvUnfreezeRepoCommitted) WorkflowEvent()

type EvUnfreezeRepoCompleted2

type EvUnfreezeRepoCompleted2 struct {
	StatusCode      int32  // only in unfreezerepowf, repos, and registry.
	StatusMessage   string // only in unfreezerepowf, repos, and registry.
	WorkflowId      uuid.I // only in workflow indexes.
	WorkflowEventId ulid.I // only in workflow indexes.
}

`WorkflowEvent_EV_FSO_UNFREEZE_REPO_COMPLETED_2` aka `EvUnfreezeRepoCompleted2`. See unfreeze-repo workflow aka unfreezerepowf.

func (EvUnfreezeRepoCompleted2) WorkflowEvent

func (EvUnfreezeRepoCompleted2) WorkflowEvent()

type EvUnfreezeRepoDeleted

type EvUnfreezeRepoDeleted struct {
	WorkflowId uuid.I // only in workflow indexes.
}

`WorkflowEvent_EV_FSO_UNFREEZE_REPO_DELETED` aka `EvUnfreezeRepoDeleted`. See split-root workflow aka splitrootwf.

func (EvUnfreezeRepoDeleted) WorkflowEvent

func (EvUnfreezeRepoDeleted) WorkflowEvent()

type EvUnfreezeRepoFilesCompleted

type EvUnfreezeRepoFilesCompleted struct {
	StatusCode    int32
	StatusMessage string
}

`WorkflowEvent_EV_FSO_UNFREEZE_REPO_FILES_COMPLETED` aka `EvUnfreezeRepoFilesCompleted`. See unfreeze-repo workflow aka unfreezerepowf.

func (EvUnfreezeRepoFilesCompleted) WorkflowEvent

func (EvUnfreezeRepoFilesCompleted) WorkflowEvent()

type EvUnfreezeRepoFilesStarted

type EvUnfreezeRepoFilesStarted struct{}

`WorkflowEvent_EV_FSO_UNFREEZE_REPO_FILES_STARTED` aka `EvUnfreezeRepoFilesStarted`. See unfreeze-repo workflow aka unfreezerepowf.

func (EvUnfreezeRepoFilesStarted) WorkflowEvent

func (EvUnfreezeRepoFilesStarted) WorkflowEvent()

type EvUnfreezeRepoStarted2

type EvUnfreezeRepoStarted2 struct {
	RegistryId       uuid.I // only unfreezerepowf.
	RegistryName     string // only unfreezerepowf.
	StartRegistryVid ulid.I // only unfreezerepowf (optional).
	RepoId           uuid.I // only unfreezerepowf.
	StartRepoVid     ulid.I // only unfreezerepowf (optional).
	RepoGlobalPath   string // unfreezerepowf and workflow indexes.
	AuthorName       string // only unfreezerepowf.
	AuthorEmail      string // only unfreezerepowf.
	WorkflowId       uuid.I // only workflow indexes.
	WorkflowEventId  ulid.I // only workflow indexes.
}

`WorkflowEvent_EV_FSO_UNFREEZE_REPO_STARTED_2` aka `EvUnfreezeRepoStarted2`. See unfreeze-repo workflow aka unfreezerepowf.

func (EvUnfreezeRepoStarted2) WorkflowEvent

func (EvUnfreezeRepoStarted2) WorkflowEvent()

type EvWorkflowIndexSnapshotState

type EvWorkflowIndexSnapshotState struct {
	DuRoot        []*WorkflowIndexState_DuRoot
	PingRegistry  []*WorkflowIndexState_PingRegistry
	SplitRoot     []*WorkflowIndexState_SplitRoot
	FreezeRepo    []*WorkflowIndexState_FreezeRepo
	UnfreezeRepo  []*WorkflowIndexState_UnfreezeRepo
	ArchiveRepo   []*WorkflowIndexState_ArchiveRepo
	UnarchiveRepo []*WorkflowIndexState_UnarchiveRepo
}

func (EvWorkflowIndexSnapshotState) WorkflowEvent

func (EvWorkflowIndexSnapshotState) WorkflowEvent()

type Event

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

func (*Event) Id

func (e *Event) Id() ulid.I

func (*Event) MarshalProto

func (e *Event) MarshalProto() ([]byte, error)

func (*Event) Parent

func (e *Event) Parent() ulid.I

func (*Event) PbWorkflowEvent

func (e *Event) PbWorkflowEvent() *pb.WorkflowEvent

func (*Event) UnmarshalProto

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

func (Event) WithId

func (e Event) WithId(id ulid.I) events.Event

Receiver by value.

func (Event) WithParent

func (e Event) WithParent(parent ulid.I) events.Event

Receiver by value.

type WorkflowEvent

type WorkflowEvent interface {
	WorkflowEvent()
}

func MustParsePbWorkflowEvent

func MustParsePbWorkflowEvent(evpb *pb.WorkflowEvent) WorkflowEvent

func ParsePbWorkflowEvent

func ParsePbWorkflowEvent(
	evpb *pb.WorkflowEvent,
) (ev WorkflowEvent, err error)

`ParsePbWorkflowEvent()` converts a protobuf struct to an `Ev*` struct.

type WorkflowIndexState_ArchiveRepo

type WorkflowIndexState_ArchiveRepo struct {
	WorkflowId               uuid.I
	StartedWorkflowEventId   ulid.I
	CompletedWorkflowEventId ulid.I
	GlobalPath               string
}

type WorkflowIndexState_DuRoot

type WorkflowIndexState_DuRoot struct {
	WorkflowId               uuid.I
	StartedWorkflowEventId   ulid.I
	CompletedWorkflowEventId ulid.I
	GlobalRoot               string
	Host                     string
	HostRoot                 string
}

type WorkflowIndexState_FreezeRepo

type WorkflowIndexState_FreezeRepo struct {
	WorkflowId               uuid.I
	StartedWorkflowEventId   ulid.I
	CompletedWorkflowEventId ulid.I
	GlobalPath               string
}

type WorkflowIndexState_PingRegistry

type WorkflowIndexState_PingRegistry struct {
	WorkflowId               uuid.I
	StartedWorkflowEventId   ulid.I
	CompletedWorkflowEventId ulid.I
}

type WorkflowIndexState_SplitRoot

type WorkflowIndexState_SplitRoot struct {
	WorkflowId               uuid.I
	StartedWorkflowEventId   ulid.I
	CompletedWorkflowEventId ulid.I
	GlobalRoot               string
	Host                     string
	HostRoot                 string
}

type WorkflowIndexState_UnarchiveRepo

type WorkflowIndexState_UnarchiveRepo struct {
	WorkflowId               uuid.I
	StartedWorkflowEventId   ulid.I
	CompletedWorkflowEventId ulid.I
	GlobalPath               string
}

type WorkflowIndexState_UnfreezeRepo

type WorkflowIndexState_UnfreezeRepo struct {
	WorkflowId               uuid.I
	StartedWorkflowEventId   ulid.I
	CompletedWorkflowEventId ulid.I
	GlobalPath               string
}

Jump to

Keyboard shortcuts

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