vltemp

package
v0.0.0-...-fbc9bfd Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DiscWFUpdateNameBootstrap = "DiscWFUpdateBootstrap"
)
View Source
const Light = "light"

Queue for lightweight tasks.

View Source
const (
	VideoUpdateBootstrap = "video-update-bootstrap"
)
View Source
const VolumeWFUpdateNameDiscoverNewDiscs = "VolumeWFUpdateDiscoverNewDiscs"

Variables

View Source
var ErrInvalidWorkflowId = errors.New("invalid workflow id")

Functions

func DiscPath

func DiscPath(ctx context.Context, discWfId DiscWfId) string

func DiscWF

func DiscWF(ctx workflow.Context, state *DiscWFState) error

func VideoPath

func VideoPath(ctx context.Context, videoWfId VideoWfId) string

func VolumePath

func VolumePath(ctx context.Context, volumeWfId VolumeWfId) string

func VolumeWF

func VolumeWF(ctx workflow.Context, state *VolumeWFState) error

Types

type DiscWFState

type DiscWFState struct {
	Videos []VideoWfId `json:"videos"`
}

type DiscWfId

type DiscWfId string

A more-refined string to handle Temporal Workflow IDs for Disc workflows.

Use NewDiscWfId() to create a new DiscWfId. You can also directly case from a string with `DiscWfId("my-disc")`, but this will not validate the ID. You can validate the ID with the Validate() method. Any other methods called on an invalid DiscWfId will panic.

func NewDiscWfId

func NewDiscWfId(volumeWfId VolumeWfId, discFilename string) (DiscWfId, error)

func (DiscWfId) Name

func (id DiscWfId) Name() string

Returns the name of the Disc.

Panics if the DiscWfId is invalid.

func (DiscWfId) Validate

func (id DiscWfId) Validate() error

Validates the DiscWfId.

func (DiscWfId) VolumeWfId

func (id DiscWfId) VolumeWfId() VolumeWfId

Returns the VolumeWfId of the DiscWfId.

Panics if the DiscWfId is invalid.

type VideoWfId

type VideoWfId string

func NewVideoWfIdFromDisc

func NewVideoWfIdFromDisc(discWfId DiscWfId, videoFileName string) (VideoWfId, error)

Create a new VideoWfId for videos contained within a given disc.

func NewVideoWfIdFromFilepath

func NewVideoWfIdFromFilepath(filepath string) (VideoWfId, error)

Create a new VideoWfId for videos represented in the system by a raw file path.

func (VideoWfId) FromDisc

func (id VideoWfId) FromDisc() (discWfId DiscWfId, videoFilename string, ok bool)

func (VideoWfId) FromFilepath

func (id VideoWfId) FromFilepath() (filepath string, ok bool)

func (VideoWfId) Protocol

func (id VideoWfId) Protocol() string

func (VideoWfId) Validate

func (id VideoWfId) Validate() error

type VolumeWFState

type VolumeWFState struct {
	Discs []DiscWfId `json:"discs"`
}

type VolumeWFUpdateDiscoverNewDiscsResponse

type VolumeWFUpdateDiscoverNewDiscsResponse struct {
	// The workflow IDs of any newly-discovered Discs.
	Discovered []DiscWfId `json:"discovered"`
}

type VolumeWfId

type VolumeWfId string

A more-refined string to handle Temporal Workflow IDs for Volume workflows.

Use NewVolumeWfId() to create a new VolumeWfId. You can also directly case from a string with `VolumeWfId("my-volume")`, but this will not validate the ID. You can validate the ID with the Validate() method. Any other methods called on an invalid VolumeWfId will panic.

func NewVolumeWfId

func NewVolumeWfId(name string) (VolumeWfId, error)

Returns a VolumeWfId for the given workflow name, or an error if the name is invalid.

func (VolumeWfId) Name

func (id VolumeWfId) Name() string

Returns the name of the Volume.

Panics if the VolumeWfId is invalid.

func (VolumeWfId) Validate

func (id VolumeWfId) Validate() error

Checks if the VolumeWfId is valid.

Jump to

Keyboard shortcuts

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