Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExtraHotReloadOptions ¶
type ExtraHotReloadOptions func(*HotReload)
func WithBackendETCD ¶
func WithBackendETCD(cfg backend.ConfigBackendETCD) ExtraHotReloadOptions
WithBackendETCD is an option which sets up the backend ETCD for hot reload.
func WithBackendLocalAPI ¶
func WithBackendLocalAPI(cfg backend.ConfigBackendLocalAPI) ExtraHotReloadOptions
WithBackendLocalAPI is an option which sets up the backend local API for hot reload.
func WithCustomInterval ¶
func WithCustomInterval(interval int) ExtraHotReloadOptions
WithCustomInterval is an option which sets up the custom interval for hot reload. if this option is not used the default interval is used.
func WithNoHotReload ¶
func WithNoHotReload() ExtraHotReloadOptions
WithNoHotReload is an option which sets up the hot reload is disabled. if this option is not used the default hot reload is disabled.
type HotReload ¶
type HotReload struct {
Enabled bool // hot reload is enabled
Ticker func() *time.Ticker // ticker for hot reload
Interval int // interval for requesting value
DoneLoop chan bool // done loop for hot reload
HotReloader func() (Reloader, error) // hot Reloader
Chan chan data.DataHotReload // chan for hot reload
}
func (*HotReload) LoopHotReload ¶
func (h *HotReload) LoopHotReload()
loopHotReload is a goroutine which is used to hot reload the zr.
type Reloader ¶
type Reloader interface {
Reload() data.DataHotReload
Shutdown() error
}
Click to show internal directories.
Click to hide internal directories.