app

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventTypeTaskStarted  = EventType("task-started")
	EventTypeTaskFinished = EventType("task-finished")

	ErrEventNotFound = Error("event not found")
)
View Source
const (
	ErrTaskAlreadyStarted = Error("task already started")
	ErrTaskNotStarted     = Error("task not started")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error string

func (Error) Error

func (e Error) Error() string

type Event

type Event struct {
	ID        uuid.UUID
	Type      EventType
	TaskName  string
	CreatedAt time.Time
}

type EventFinder

type EventFinder interface {
	LatestByName(ctx context.Context, taskName string) (Event, error)
}

type EventStore

type EventStore interface {
	Store(ctx context.Context, event Event) error
}

type EventType

type EventType string

type TaskFinisher

type TaskFinisher interface {
	Finish(ctx context.Context, taskName string) error
}

type TaskStarter

type TaskStarter interface {
	Start(ctx context.Context, taskName string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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