Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteAllResources

func DeleteAllResources(manager ResourceManager, ctx context.Context, list model.ResourceList, fs ...store.DeleteAllOptionsFunc) error

func IsMeshNotFound

func IsMeshNotFound(err error) bool

func MeshNotFound

func MeshNotFound(meshName string) error

func Upsert

func Upsert(manager ResourceManager, key model.ResourceKey, resource model.Resource, fn func(resource model.Resource), fs ...UpsertFunc) error

Types

type ConflictRetry

type ConflictRetry struct {
	BaseBackoff time.Duration
	MaxTimes    uint
}

type MeshNotFoundError

type MeshNotFoundError struct {
	Mesh string
}

func (*MeshNotFoundError) Error

func (m *MeshNotFoundError) Error() string

type ReadOnlyResourceManager

type ReadOnlyResourceManager interface {
	Get(context.Context, model.Resource, ...store.GetOptionsFunc) error
	List(context.Context, model.ResourceList, ...store.ListOptionsFunc) error
}

func NewCachedManager

func NewCachedManager(delegate ReadOnlyResourceManager, expirationTime time.Duration, metrics metrics.Metrics) (ReadOnlyResourceManager, error)

type UpsertFunc

type UpsertFunc func(opts *UpsertOpts)

func WithConflictRetry

func WithConflictRetry(baseBackoff time.Duration, maxTimes uint) UpsertFunc

type UpsertOpts

type UpsertOpts struct {
	ConflictRetry ConflictRetry
}

func NewUpsertOpts

func NewUpsertOpts(fs ...UpsertFunc) UpsertOpts