Documentation ¶
Overview ¶
Package task Date: 2023/7/19 15:30 Author: Amu Description:
Package task Date: 2023/7/19 15:30 Author: Amu Description:
Package task Date: 2023/7/19 15:45 Author: Amu Description:
Package task Date: 2023/4/4 16:51 Author: Amu Description:
Index ¶
- Constants
- func AddMonth(addTime time.Time, duration int) time.Time
- func NewManager(ctx context.Context, m *Manager)
- type AtomicStatus
- func (a *AtomicStatus) IsRefresh() bool
- func (a *AtomicStatus) IsRun() bool
- func (a *AtomicStatus) IsStart() bool
- func (a *AtomicStatus) IsStop() bool
- func (a *AtomicStatus) RefreshToRun() bool
- func (a *AtomicStatus) SetRefreshStatus()
- func (a *AtomicStatus) SetRunStatus()
- func (a *AtomicStatus) SetStopStatus()
- func (a *AtomicStatus) ToClose() bool
- func (a *AtomicStatus) ToStart() bool
- type HandlerStruct
- type Manager
- type Plan
- type Task
Constants ¶
View Source
const ( DurationMS uint8 = iota + 1 DurationMonth DurationYear )
Variables ¶
This section is empty.
Functions ¶
func NewManager ¶
Types ¶
type AtomicStatus ¶
type AtomicStatus struct {
// contains filtered or unexported fields
}
AtomicStatus atmoic status struct
func (*AtomicStatus) IsRefresh ¶
func (a *AtomicStatus) IsRefresh() bool
IsRefresh judge if status is refreshStatus
func (*AtomicStatus) IsStart ¶
func (a *AtomicStatus) IsStart() bool
func (*AtomicStatus) IsStop ¶
func (a *AtomicStatus) IsStop() bool
func (*AtomicStatus) RefreshToRun ¶
func (a *AtomicStatus) RefreshToRun() bool
RefreshToRun change status to runStatus from refreshStatus
func (*AtomicStatus) SetRefreshStatus ¶
func (a *AtomicStatus) SetRefreshStatus()
SetRefreshStatus set status to refreshStatus
func (*AtomicStatus) SetRunStatus ¶
func (a *AtomicStatus) SetRunStatus()
SetRunStatus set status to runStatus
func (*AtomicStatus) SetStopStatus ¶
func (a *AtomicStatus) SetStopStatus()
SetStopStatus set status to stopStatus
func (*AtomicStatus) ToClose ¶
func (a *AtomicStatus) ToClose() bool
ToClose change status to stopStatus from runStatus
func (*AtomicStatus) ToStart ¶
func (a *AtomicStatus) ToStart() bool
ToStart change status to startStatus
type HandlerStruct ¶
type Plan ¶
type Plan struct {
// contains filtered or unexported fields
}
func (*Plan) GetFirstDuration ¶
Click to show internal directories.
Click to hide internal directories.