support

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2018 License: BSD-3-Clause Imports: 2 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TimerCallback

type TimerCallback func(ctx activity.Context) (resume bool)

type TimerSupport

type TimerSupport interface {
	// HasTimer indicates if a timer already exists
	HasTimer(repeating bool) bool

	// CancelTimer cancels the existing timer
	CancelTimer(repeating bool)

	UpdateTimer(repeating bool)

	// CreateTimer creates a timer, note: can only have one active timer at a time for an activity
	CreateTimer(interval time.Duration, callback TimerCallback, repeating bool) error
}

TimerSupport is used to create a timer on behalf of the activity

func GetTimerSupport

func GetTimerSupport(ctx activity.Context) (TimerSupport, bool)

GetTimerSupport for the activity

Jump to

Keyboard shortcuts

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