pollable

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package pollable contains mechanisms for setting up and managing a task that can poll SFN for work.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResourceInfo

type ResourceInfo interface {
	ARN() string
	ActivityName() string
}

ResourceInfo is the interface for any resource that knows its ARN and ActivityName.

type Task

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

Task is an action that supports polling.

func NewTask

func NewTask(handlerFn interface{}, activityArn, workerName string, heartbeatInterval time.Duration, sfnAPI sfnpoller.SFNAPI, logger logr.Logger) *Task

NewTask returns a reference to a new pollable task.

func NewTask2

func NewTask2(handlerFn interface{}, resourceInfo ResourceInfo, heartbeatInterval time.Duration, sfnAPI sfnpoller.SFNAPI, logger logr.Logger) *Task

NewTask2 returns a reference to a new pollable task using ResourceInfo.

func (*Task) Done

func (task *Task) Done() <-chan struct{}

Done returns a channel that blocks until the task is done polling.

func (*Task) Start

func (task *Task) Start(ctx cancellablecontextiface.Context)

Start initializes polling for the task.

func (*Task) Started

func (task *Task) Started() <-chan struct{}

Started returns a channel that blocks until the task has started polling.

func (*Task) Stop added in v1.3.0

func (task *Task) Stop()

Directories

Path Synopsis
Package pollableiface contains an interface for a PollableTask
Package pollableiface contains an interface for a PollableTask

Jump to

Keyboard shortcuts

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