notifier

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2017 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// NoDelay instant
	NoDelay  Delay = 0
	OneHour        = Delay(time.Hour)
	SixHours       = OneHour * 6
)

Variables

This section is empty.

Functions

func NewContext

func NewContext() (err error)

func Notify

func Notify(cmd *NotifyCmd)

Notify helper for global usage

func NotifyTxn

func NotifyTxn(txn models.Txn) (err error)

NotifyTxn get account apps and notify all apps about txn

Types

type Delay

type Delay time.Duration

type Notifier

type Notifier interface {
	Notify(*NotifyCmd) error
	Start() error
}

type NotifyCmd

type NotifyCmd struct {
	URL   string
	Delay Delay
	Txn   models.Txn
}

func NewCmd

func NewCmd(url string, txn models.Txn) *NotifyCmd

NewCmd returns new cmd with zero delay

func (NotifyCmd) NextDelay

func (nc NotifyCmd) NextDelay() Delay

Jump to

Keyboard shortcuts

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