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 {
// 间隔大于1秒采用timer定时加载,小于1秒用fsnotify
ReloadInterval time.Duration `comment:"0:not reload; < 1s: fsnotify; >= 1s: polling"`
Paths []string
// contains filtered or unexported fields
}
type ReloadType ¶
type ReloadType int
const ( ReloadTypeNone ReloadType = iota ReloadTypeFsNotify ReloadTypeTimer )
func (ReloadType) MarshalJSON ¶
func (t ReloadType) MarshalJSON() ([]byte, error)
func (ReloadType) MarshalText ¶
func (t ReloadType) MarshalText() ([]byte, error)
func (ReloadType) String ¶
func (t ReloadType) String() string
func (*ReloadType) UnmarshalJSON ¶
func (t *ReloadType) UnmarshalJSON(data []byte) error
func (*ReloadType) UnmarshalText ¶
func (t *ReloadType) UnmarshalText(data []byte) error
Click to show internal directories.
Click to hide internal directories.