tasks

package
v0.0.0-...-611bec0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Topology queues.Topology
	Table    table
	Queues   queueService
	Topics   topicService
	Services serviceControl

	Worker    string
	WorkerURL string
	Client    *http.Client
}

type Consumption

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

func NewConsumption

func NewConsumption(engine *Engine, client receivingQueues) *Consumption

func (*Consumption) Run

func (c *Consumption) Run(ctx context.Context) error

type Engine

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

func New

func New(cfg Config) *Engine

func NewAWS

func NewAWS(cfg aws.Config, topology queues.Topology, worker, workerURL string) *Engine

func (*Engine) Deliver

func (e *Engine) Deliver(ctx context.Context, event events.SQSEvent) events.SQSEventResponse

func (*Engine) FireCron

func (e *Engine) FireCron(ctx context.Context, task string, scheduled time.Time) error

func (*Engine) Tasks

func (e *Engine) Tasks() runs.Tasks

func (*Engine) Topics

func (e *Engine) Topics() runs.Topics

type Queue

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

func NewQueue

func NewQueue(topology queues.Topology, queueClient queueService, topicClient topicService, services serviceControl) *Queue

func (*Queue) Release

func (q *Queue) Release(ctx context.Context, topic, consumer, handle string) error

func (*Queue) Send

func (q *Queue) Send(ctx context.Context, msg runs.Message) error

type Receiver

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

func NewReceiver

func NewReceiver(queue *Queue, client receivingQueues, fireCron func(ctx context.Context, task string, scheduled time.Time) error) *Receiver

func (*Receiver) Ack

func (r *Receiver) Ack(ctx context.Context, topic, consumer string, handles []string) error

func (*Receiver) Extend

func (r *Receiver) Extend(ctx context.Context, topic, consumer string, handles []string, hidden time.Duration) error

func (*Receiver) Hide

func (r *Receiver) Hide(ctx context.Context, topic, consumer, handle string, hidden time.Duration) error

func (*Receiver) Receive

func (r *Receiver) Receive(ctx context.Context, req runs.ReceiveRequest) ([]runs.Received, error)

type Slots

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

func NewSlots

func NewSlots(db table, tableName, prefix string) Slots

func (Slots) Release

func (s Slots) Release(ctx context.Context, slot runs.Slot) error

func (Slots) Renew

func (s Slots) Renew(ctx context.Context, slot runs.Slot, until time.Time) error

func (Slots) Take

func (s Slots) Take(ctx context.Context, set runs.SlotSet, holder string, until time.Time) (runs.Slot, bool, error)

type Store

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

func NewStore

func NewStore(db table, tableName, prefix string) Store

func (Store) CountRuns

func (s Store) CountRuns(ctx context.Context, filter runs.RunFilter) (int64, error)

func (Store) CreateRun

func (s Store) CreateRun(ctx context.Context, run runs.Run) (records.Revision, error)

func (Store) DeleteRecord

func (s Store) DeleteRecord(ctx context.Context, record provider.ExpiringRecord) error

func (Store) DeleteRun

func (s Store) DeleteRun(ctx context.Context, run runs.Run) error

func (Store) EnsureRecord

func (s Store) EnsureRecord(ctx context.Context, record provider.ExpiringRecord) (provider.ExpiringRecord, bool, error)

func (Store) ListRuns

func (s Store) ListRuns(ctx context.Context, filter runs.RunFilter) (runs.RunPage, error)

func (Store) ReadRun

func (s Store) ReadRun(ctx context.Context, topic, execution string) (runs.Run, error)

func (Store) ReplaceRecord

func (s Store) ReplaceRecord(ctx context.Context, record provider.ExpiringRecord, held json.RawMessage) error

func (Store) WriteRun

func (s Store) WriteRun(ctx context.Context, run runs.Run) (records.Revision, error)

Jump to

Keyboard shortcuts

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