Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithLogger ¶
WithLogger option to allow passing of custom logger
func WithShutdownTask ¶
func WithShutdownTask(t SchedulerTask) option
WithShutdownTask option to allow passing of custom shutdown task
func WithSnoozeNotificationTask ¶
func WithSnoozeNotificationTask(t SchedulerTask) option
WithSnoozeNotificationTask option to allow passing of custom snooze notification task, Scheduler.Snooze function can snooze it
Types ¶
type Config ¶
type Config struct { SnoozeInterval int StartTime string Notification struct { Before int Duration int } }
Config for shutdown scheduler
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
Scheduler for auto shutdown the computer
func NewScheduler ¶
NewScheduler to create scheduler to shutdown the computer
func (*Scheduler) ShutdownTime ¶
ShutdownTime get next shutdown time
func (*Scheduler) ShutdownTimeChangedChan ¶
ShutdownTimeChangedChan get channel of latest shutdown time
type SchedulerTask ¶
SchedulerTask for scheduler to shutdown or notify for snooze
Click to show internal directories.
Click to hide internal directories.