Documentation
¶
Index ¶
- Constants
- Variables
- type Cache
- type CacheWrapper
- func (wrapper *CacheWrapper) Fetch(ctx context.Context, object utilobject.Key, oldResourceVersion string, ...) (*Patch, error)
- func (wrapper *CacheWrapper) FetchSnapshot(ctx context.Context, object utilobject.Key, snapshotName string) (*Snapshot, error)
- func (wrapper *CacheWrapper) GetCommonOptions() *CommonOptions
- func (wrapper *CacheWrapper) List(ctx context.Context, object utilobject.Key, limit int) ([]string, error)
- func (wrapper *CacheWrapper) Store(ctx context.Context, object utilobject.Key, patch *Patch)
- func (wrapper *CacheWrapper) StoreSnapshot(ctx context.Context, object utilobject.Key, snapshotName string, ...)
- type CommonOptions
- type Patch
- type Snapshot
Constants ¶
View Source
const ( SnapshotNameCreation = "creation" SnapshotNameDeletion = "deletion" )
Variables ¶
View Source
var VerbToSnapshotName = map[string]string{ "create": SnapshotNameCreation, "delete": SnapshotNameDeletion, }
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface { GetCommonOptions() *CommonOptions Store(ctx context.Context, object utilobject.Key, patch *Patch) Fetch(ctx context.Context, object utilobject.Key, oldResourceVersion string, newResourceVersion *string) (*Patch, error) StoreSnapshot(ctx context.Context, object utilobject.Key, snapshotName string, snapshot *Snapshot) FetchSnapshot(ctx context.Context, object utilobject.Key, snapshotName string) (*Snapshot, error) List(ctx context.Context, object utilobject.Key, limit int) ([]string, error) }
type CacheWrapper ¶
type CacheWrapper struct {
// contains filtered or unexported fields
}
func (*CacheWrapper) Fetch ¶
func (wrapper *CacheWrapper) Fetch( ctx context.Context, object utilobject.Key, oldResourceVersion string, newResourceVersion *string, ) (*Patch, error)
func (*CacheWrapper) FetchSnapshot ¶
func (wrapper *CacheWrapper) FetchSnapshot( ctx context.Context, object utilobject.Key, snapshotName string, ) (*Snapshot, error)
func (*CacheWrapper) GetCommonOptions ¶
func (wrapper *CacheWrapper) GetCommonOptions() *CommonOptions
func (*CacheWrapper) List ¶
func (wrapper *CacheWrapper) List(ctx context.Context, object utilobject.Key, limit int) ([]string, error)
List always penetrates the cache because we cannot get notified of new keys
func (*CacheWrapper) Store ¶
func (wrapper *CacheWrapper) Store(ctx context.Context, object utilobject.Key, patch *Patch)
func (*CacheWrapper) StoreSnapshot ¶
func (wrapper *CacheWrapper) StoreSnapshot( ctx context.Context, object utilobject.Key, snapshotName string, snapshot *Snapshot, )
type CommonOptions ¶
type CommonOptions struct { PatchTtl time.Duration SnapshotTtl time.Duration EnableCacheWrapper bool }
func (*CommonOptions) Setup ¶
func (options *CommonOptions) Setup(fs *pflag.FlagSet)
Click to show internal directories.
Click to hide internal directories.