Documentation
¶
Overview ¶
Package timer 群管定时器
Index ¶
- Variables
- type Clock
- type Timer
- func (m *Timer) Day() (d int)
- func (*Timer) Descriptor() ([]byte, []int)
- func (m *Timer) En() (en bool)
- func (m *Timer) GetAlert() string
- func (m *Timer) GetCron() string
- func (m *Timer) GetEn1Month4Day5Week3Hour5Min6() int32
- func (m *Timer) GetSelfid() int64
- func (ts *Timer) GetTimerInfo(grp int64) string
- func (m *Timer) GetUrl() string
- func (m *Timer) Hour() (h int)
- func (m *Timer) Marshal() (dAtA []byte, err error)
- func (m *Timer) MarshalTo(dAtA []byte) (int, error)
- func (m *Timer) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (m *Timer) Minute() (min int)
- func (m *Timer) Month() (mon time.Month)
- func (*Timer) ProtoMessage()
- func (m *Timer) Reset()
- func (m *Timer) SetDay(d int)
- func (m *Timer) SetEn(en bool)
- func (m *Timer) SetHour(h int)
- func (m *Timer) SetMinute(min int)
- func (m *Timer) SetMonth(mon time.Month)
- func (m *Timer) SetWeek(w time.Weekday)
- func (m *Timer) Size() (n int)
- func (m *Timer) String() string
- func (m *Timer) Unmarshal(dAtA []byte) error
- func (m *Timer) Week() (w time.Weekday)
- func (m *Timer) XXX_DiscardUnknown()
- func (m *Timer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Timer) XXX_Merge(src proto.Message)
- func (m *Timer) XXX_Size() int
- func (m *Timer) XXX_Unmarshal(b []byte) error
- type TimersMap
- func (*TimersMap) Descriptor() ([]byte, []int)
- func (m *TimersMap) GetTimers() map[string]*Timer
- func (m *TimersMap) Marshal() (dAtA []byte, err error)
- func (m *TimersMap) MarshalTo(dAtA []byte) (int, error)
- func (m *TimersMap) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TimersMap) ProtoMessage()
- func (m *TimersMap) Reset()
- func (m *TimersMap) Size() (n int)
- func (m *TimersMap) String() string
- func (m *TimersMap) Unmarshal(dAtA []byte) error
- func (m *TimersMap) XXX_DiscardUnknown()
- func (m *TimersMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TimersMap) XXX_Merge(src proto.Message)
- func (m *TimersMap) XXX_Size() int
- func (m *TimersMap) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Clock ¶
type Clock struct {
// contains filtered or unexported fields
}
func (*Clock) RegisterTimer ¶
RegisterTimer 注册计时器
type Timer ¶
type Timer struct {
Alert string `protobuf:"bytes,1,opt,name=alert,proto3" json:"alert,omitempty"`
Cron string `protobuf:"bytes,2,opt,name=cron,proto3" json:"cron,omitempty"`
En1Month4Day5Week3Hour5Min6 int32 `protobuf:"varint,4,opt,name=en1month4day5week3hour5min6,proto3" json:"en1month4day5week3hour5min6,omitempty"`
Selfid int64 `protobuf:"varint,8,opt,name=selfid,proto3" json:"selfid,omitempty"`
Url string `protobuf:"bytes,16,opt,name=url,proto3" json:"url,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func GetFilledCronTimer ¶
GetFilledCronTimer 获得以cron填充好的ts
func GetFilledTimer ¶
GetFilledTimer 获得填充好的ts
func (*Timer) Descriptor ¶ added in v1.2.0
func (*Timer) GetEn1Month4Day5Week3Hour5Min6 ¶ added in v1.2.0
func (*Timer) GetTimerInfo ¶
GetTimerInfo 获得标准化定时字符串
func (*Timer) MarshalToSizedBuffer ¶ added in v1.2.0
func (*Timer) ProtoMessage ¶ added in v1.2.0
func (*Timer) ProtoMessage()
func (*Timer) XXX_DiscardUnknown ¶ added in v1.2.0
func (m *Timer) XXX_DiscardUnknown()
func (*Timer) XXX_Marshal ¶ added in v1.2.0
func (*Timer) XXX_Unmarshal ¶ added in v1.2.0
type TimersMap ¶
type TimersMap struct {
Timers map[string]*Timer `` /* 153-byte string literal not displayed */
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*TimersMap) Descriptor ¶ added in v1.2.0
func (*TimersMap) MarshalToSizedBuffer ¶ added in v1.2.0
func (*TimersMap) ProtoMessage ¶ added in v1.2.0
func (*TimersMap) ProtoMessage()
func (*TimersMap) XXX_DiscardUnknown ¶ added in v1.2.0
func (m *TimersMap) XXX_DiscardUnknown()
func (*TimersMap) XXX_Marshal ¶ added in v1.2.0
func (*TimersMap) XXX_Unmarshal ¶ added in v1.2.0
Click to show internal directories.
Click to hide internal directories.