Documentation
¶
Index ¶
Constants ¶
View Source
const ( ReloadTypeNoneName = "none" ReloadTypeFsNotifyName = "fsnotify" ReloadTypeTimerName = "timer" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Loader ¶
type Loader struct { AutoReloadType ReloadType `json:"autoReloadType" comment:"none,fsnotify,timer"` // 本地分为fsnotify和timer,fsnotify采用系统调用通知,timer定时器去查文件是否变更 TimerInterval time.Duration `json:"timerInterval" comment:"timer interval"` }
func (*Loader) SetAutoReloadType ¶
func (ld *Loader) SetAutoReloadType(autoReloadType ReloadType, interval time.Duration)
type ReloadType ¶
type ReloadType int
const ( ReloadTypeNone ReloadType = iota ReloadTypeFsNotify ReloadTypeTimer )
func (ReloadType) MarshalJSON ¶ added in v0.8.0
func (t ReloadType) MarshalJSON() ([]byte, error)
func (ReloadType) MarshalText ¶ added in v0.8.0
func (t ReloadType) MarshalText() ([]byte, error)
func (ReloadType) String ¶ added in v0.8.0
func (t ReloadType) String() string
func (*ReloadType) UnmarshalJSON ¶ added in v0.8.0
func (t *ReloadType) UnmarshalJSON(data []byte) error
func (*ReloadType) UnmarshalText ¶ added in v0.8.0
func (t *ReloadType) UnmarshalText(data []byte) error
Click to show internal directories.
Click to hide internal directories.