whiz

package module
v0.0.0-...-4faa728 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: MIT Imports: 10 Imported by: 0

README

whiz

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorCeiling

func ErrorCeiling(t time.Duration) func(*Worker) error

func ExternalPolling

func ExternalPolling() func(*Worker) error

func LockName

func LockName(s string) func(*Worker) error

func PollingInterval

func PollingInterval(t time.Duration) func(*Worker) error

func ReadOnlyDatabase

func ReadOnlyDatabase(dbRO *sql.DB) func(*Worker) error

option for providing a read replica

Types

type ErrorWithCause

type ErrorWithCause interface {
	error
	Cause() error
}

type SubscriberEvents

type SubscriberEvents []models.Eventz

func (SubscriberEvents) Len

func (se SubscriberEvents) Len() int

func (SubscriberEvents) Less

func (se SubscriberEvents) Less(i, j int) bool

func (SubscriberEvents) Swap

func (se SubscriberEvents) Swap(i, j int)

type Worker

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

func NewWorker

func NewWorker(dbRW *sql.DB, reg subscribers.Registry, loggeroutput io.Writer, options ...func(*Worker) error) (*Worker, error)

func (*Worker) PollNow

func (w *Worker) PollNow()

func (*Worker) ReProcessSubscriberEvent

func (w *Worker) ReProcessSubscriberEvent(eventid string, timeout int)

func (*Worker) Shutdown

func (w *Worker) Shutdown()

func (*Worker) StartPolling

func (w *Worker) StartPolling()

func (Worker) Status

func (w Worker) Status() WorkerStatus

type WorkerStatus

type WorkerStatus struct {
	Started         time.Time
	PollingInterval time.Duration
	LastPolled      time.Time
	LastRun         time.Time
	DBRW            string
	DBRO            string
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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