cache

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DriverV1ClientGetter added in v0.4.0

type DriverV1ClientGetter func(ctx context.Context) (driver.Connection, error)

type DriverV1DiscoveryAdapter added in v0.4.0

type DriverV1DiscoveryAdapter struct {
	// contains filtered or unexported fields
}

func (*DriverV1DiscoveryAdapter) Discover added in v0.4.0

type LeaderDiscovery

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

func NewDriverV1DiscoveryAdapter added in v0.4.0

func NewDriverV1DiscoveryAdapter(fn DriverV1ClientGetter) LeaderDiscovery

NewDriverV1DiscoveryAdapter accepts a function which returns driver.Connection and returns a compatible LeaderDiscovery implementation

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