sfnpoller

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package sfnpoller provides a 'generic' mechanism for to poll a StepFunction state machine for tasks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

API is the sfnpoller's API.

func New

func New() *API

New returns a reference to a new sfnpoller API.

func (*API) BeginPolling

func (a *API) BeginPolling(parentCtx context.Context) *API

BeginPolling initiates polling on registered tasks. This method blocks until all all pollers have reported that they have started.

func (*API) Done

func (a *API) Done() <-chan struct{}

Done returns a channel that blocks until all pollers have reported that they are done polling.

func (*API) RegisterTask

func (a *API) RegisterTask(task pollableiface.PollableTask) *API

RegisterTask adds the specified task to the poller's internal list of tasks to execute.

func (*API) Stop added in v1.3.0

func (a *API) Stop()

Stops them once no activity is available or current activity is finished.

Directories

Path Synopsis
Package cancellablecontext is a wrapper around context.WithCancel that exposes context.CancelFunc as a receiver.
Package cancellablecontext is a wrapper around context.WithCancel that exposes context.CancelFunc as a receiver.
cancellablecontextiface
Package cancellablecontextiface represents a context that supports cancellation.
Package cancellablecontextiface represents a context that supports cancellation.
Package pollable contains mechanisms for setting up and managing a task that can poll SFN for work.
Package pollable contains mechanisms for setting up and managing a task that can poll SFN for work.
pollableiface
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