service

package
v0.0.0-...-eef6afc Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	TimerName     string
	TimerDuration time.Duration
}

Event posted when a timer changes

type Service

type Service interface {
	AddTimer(names ...string) error
	ListTimer() []string
	StartTimer(name string) error
	OnEvent() chan Event
	StopCurrentTimer()
	GetTimer(name string) *timer.Timer
}

Service for managing the timers

func New

func New() (Service, error)

New creates a new service

Jump to

Keyboard shortcuts

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