manager

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

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) error, fs ...UpsertFunc) error

Types

type ConflictRetry

type ConflictRetry struct {
	BaseBackoff time.Duration
	MaxTimes    uint
}

type CustomizableResourceManager

type CustomizableResourceManager interface {
	ResourceManager
	Customize(model.ResourceType, ResourceManager)
	ResourceManager(model.ResourceType) ResourceManager
}

func NewCustomizableResourceManager

func NewCustomizableResourceManager(defaultManager ResourceManager, customManagers map[model.ResourceType]ResourceManager) CustomizableResourceManager

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

Jump to

Keyboard shortcuts

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