cache

package
v0.0.0-...-540bb61 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(cmd *cobra.Command) error

Types

type Config

type Config struct {
	RefreshDelay    time.Duration
	RefreshInterval time.Duration
}

func GlobalConfig

func GlobalConfig() Config

type LeaderDiscovery

type LeaderDiscovery interface {
	Discover(ctx context.Context) (conn.Connection, error)
}

type StateLoader

type StateLoader[T interface{}] interface {
	State() (*T, uint64, bool)

	Invalidate()
	Valid() bool

	UpdateTime() time.Time

	Refresh(ctx context.Context, discovery LeaderDiscovery) error
}

Jump to

Keyboard shortcuts

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