TimeListener

package
v0.0.0-...-97f3c37 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Frequency

type Frequency byte
const (
	ONCE        Frequency = 0
	HOURLY      Frequency = 1
	DAILY       Frequency = 2
	WEEKLY      Frequency = 3
	MONTHLY     Frequency = 4
	YEARLY      Frequency = 5
	EveryMinute Frequency = 6
)

type SubscribeMsg

type SubscribeMsg struct {
	Id            int
	TimeArr       []byte
	Frequency     Frequency
	Interval      time.Duration
	GetStatusChan chan bool
}

type TimeListener

type TimeListener struct {
	Subscribers []*subscriber
	// contains filtered or unexported fields
}

func NewTimeListener

func NewTimeListener() *TimeListener

func (*TimeListener) Subscribe

func (listener *TimeListener) Subscribe(msg *SubscribeMsg)

func (*TimeListener) Unsubscribe

func (listener *TimeListener) Unsubscribe(id int)

type UnsubscribeMsg

type UnsubscribeMsg struct {
	Id int
}

Jump to

Keyboard shortcuts

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