Documentation
¶
Index ¶
- func DeleteAllResources(manager ResourceManager, ctx context.Context, list model.ResourceList, ...) error
- func IsMeshNotFound(err error) bool
- func MeshNotFound(meshName string) error
- func Upsert(manager ResourceManager, key model.ResourceKey, resource model.Resource, ...) error
- type ConflictRetry
- type CustomizableResourceManager
- type MeshNotFoundError
- type ReadOnlyResourceManager
- type ResourceManager
- type UpsertFunc
- type UpsertOpts
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
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
}
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 ResourceManager ¶
type ResourceManager interface {
ReadOnlyResourceManager
Create(context.Context, model.Resource, ...store.CreateOptionsFunc) error
Update(context.Context, model.Resource, ...store.UpdateOptionsFunc) error
Delete(context.Context, model.Resource, ...store.DeleteOptionsFunc) error
DeleteAll(context.Context, model.ResourceList, ...store.DeleteAllOptionsFunc) error
}
func NewResourceManager ¶
func NewResourceManager(store store.ResourceStore) ResourceManager
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
Click to show internal directories.
Click to hide internal directories.