time

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: May 15, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DistributedTicker

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

func NewDistributedTicker

func NewDistributedTicker(partition, name string, d time.Duration, registry state.Registry, storage state.Storage, lockerGenerator locker.SyncLockerGenerator, qf queue.Factory) (*DistributedTicker, error)

func (*DistributedTicker) Close

func (d *DistributedTicker) Close()

func (*DistributedTicker) SetEnabled

func (d *DistributedTicker) SetEnabled(enabled bool)

func (*DistributedTicker) Tick

func (d *DistributedTicker) Tick() <-chan time.Time

type Ticker

type Ticker interface {
	Close()
	SetEnabled(enabled bool)
	Tick() <-chan time.Time
}

type TickerState

type TickerState struct {
	state.GormModel
	state.BaseState
	Name         string
	LastTickTime time.Time
}

func MustNewTickerState

func MustNewTickerState(lockerGenerator locker.SyncLockerGenerator, partition, name string) *TickerState

func (*TickerState) StateIDComponents

func (u *TickerState) StateIDComponents() state.StateIDComponents

Jump to

Keyboard shortcuts

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