time_switch

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

功能:时间开关-配置项 说明:

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HandlerStart

type HandlerStart func() //开启函数

type HandlerStop

type HandlerStop func() //停止函数

type Option

type Option func(*TimeSwitch)

func WithStarHandler

func WithStarHandler(start HandlerStart) Option

WithStarHandler 开启函数

func WithStopHandler

func WithStopHandler(stop HandlerStop) Option

WithStopHandler 停止函数

type TimeSwitch

type TimeSwitch struct {
	xservice.Service //
	// contains filtered or unexported fields
}

TimeSwitch 时间开关

func NewTimeSwitch

func NewTimeSwitch(stop_time string, start_time string, options ...Option) *TimeSwitch

NewTimeSwitch 创建

func (*TimeSwitch) Manual_start

func (t *TimeSwitch) Manual_start()

Manual_start 人工启动

func (*TimeSwitch) Manual_stop

func (t *TimeSwitch) Manual_stop()

Manual_stop 人工停止

func (*TimeSwitch) Service_start

func (t *TimeSwitch) Service_start()

Service_start 服务启动

func (*TimeSwitch) Service_stop

func (t *TimeSwitch) Service_stop()

Service_stop 服务停止

Jump to

Keyboard shortcuts

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