Documentation ¶
Index ¶
- Variables
- func NewFileRefreshable(ctx context.Context, filePath string) (refreshable.Refreshable, error)
- func NewFileRefreshableWithDuration(ctx context.Context, filePath string, duration time.Duration) (refreshable.Refreshable, error)
- type Bool
- type DefaultRefreshable
- type Duration
- type Int
- type Refreshable
- type String
- type ValidatingRefreshable
Constants ¶
This section is empty.
Variables ¶
var NewBool = refreshable.NewBool
NewBool is deprecated. Deprecated: use pkg/refreshable
var NewDefaultRefreshable = refreshable.NewDefaultRefreshable
NewDefaultRefreshable is deprecated. Deprecated: use pkg/refreshable
var NewDuration = refreshable.NewDuration
NewDuration is deprecated. Deprecated: use pkg/refreshable
var NewInt = refreshable.NewInt
NewInt is deprecated. Deprecated: use pkg/refreshable
var NewString = refreshable.NewString
NewString is deprecated. Deprecated: use pkg/refreshable
var NewValidatingRefreshable = refreshable.NewValidatingRefreshable
NewValidatingRefreshable is deprecated. Deprecated: use pkg/refreshable
Functions ¶
func NewFileRefreshable ¶
func NewFileRefreshable(ctx context.Context, filePath string) (refreshable.Refreshable, error)
NewFileRefreshable is identical to NewFileRefreshableWithDuration except it defaults to use defaultRefreshableSyncPeriod for how often the file is checked
func NewFileRefreshableWithDuration ¶
func NewFileRefreshableWithDuration(ctx context.Context, filePath string, duration time.Duration) (refreshable.Refreshable, error)
NewFileRefreshableWithDuration returns a new Refreshable whose current value is the bytes of the file at the provided path. The file is checked every duration time.Duration as an argument. Calling this function also starts a goroutine which updates the value of the refreshable whenever the specified file is changed. The goroutine will terminate when the provided context is done or when the returned cancel function is called.
Types ¶
type DefaultRefreshable ¶
type DefaultRefreshable = refreshable.DefaultRefreshable
DefaultRefreshable is deprecated. Deprecated: use pkg/refreshable
type Duration ¶
type Duration = refreshable.Duration
Duration is deprecated. Deprecated: use pkg/refreshable
type Refreshable ¶
type Refreshable = refreshable.Refreshable
Refreshable is deprecated. Deprecated: use pkg/refreshable
type String ¶
type String = refreshable.String
String is deprecated. Deprecated: use pkg/refreshable
type ValidatingRefreshable ¶
type ValidatingRefreshable = refreshable.ValidatingRefreshable
ValidatingRefreshable is deprecated. Deprecated: use pkg/refreshable