refreshable

package
v2.76.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

NewBool is deprecated. Deprecated: use pkg/refreshable

View Source
var NewDefaultRefreshable = refreshable.NewDefaultRefreshable

NewDefaultRefreshable is deprecated. Deprecated: use pkg/refreshable

View Source
var NewDuration = refreshable.NewDuration

NewDuration is deprecated. Deprecated: use pkg/refreshable

NewInt is deprecated. Deprecated: use pkg/refreshable

NewString is deprecated. Deprecated: use pkg/refreshable

View Source
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 Bool

type Bool = refreshable.Bool

Bool is deprecated. Deprecated: use pkg/refreshable

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 Int

type Int = refreshable.Int

Int 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL