Documentation ¶
Index ¶
- func JoinKeyPrefix(prefixes ...string) string
- func KeyPrefixForAPIVersion(apiVersion string) string
- func KeyPrefixForAPIVersionKind(apiVersion, kind string) string
- func KeyPrefixForAPIVersionKindNamespace(apiVersion, kind, namespace string) string
- func NewInstrumentedAsyncRevisionInterface(r AsyncWriteRevisionInterface) *instrumentedAsyncRevisionInterface
- func NewInstrumentedRevisionInterface(r RevisionInterface) *instrumentedRevisionInterface
- func NewInstrumentedRevisionPurger(r RevisionPurger) *instrumentedRevisionPurger
- func NewRevisionPurger(s *RevisionStore) *revisionPurger
- func ResourceKey(apiVersion, kind, namespace, name string) string
- func RevisionKey(resourceKey string, revisionKey string) string
- func StripMetadata(u *unstructured.Unstructured)
- type AsyncResponse
- type AsyncWriteRevisionInterface
- type ConcreteRevision
- func (c *ConcreteRevision) APIVersion() string
- func (c *ConcreteRevision) Content() (*unstructured.Unstructured, error)
- func (c *ConcreteRevision) Deleted() bool
- func (r ConcreteRevision) Key() string
- func (c *ConcreteRevision) Kind() string
- func (c *ConcreteRevision) MarshalJSON() ([]byte, error)
- func (c *ConcreteRevision) Name() string
- func (c *ConcreteRevision) Namespace() string
- func (r ConcreteRevision) ResourceKey() string
- func (c *ConcreteRevision) ResourceVersion() int
- func (r ConcreteRevision) RevisionKey() string
- func (c *ConcreteRevision) RevisionTimestamp() time.Time
- func (c *ConcreteRevision) SetDeleted(deleted bool)
- func (c *ConcreteRevision) String() string
- func (c *ConcreteRevision) TypeMeta() metav1.TypeMeta
- type InMemoryRevisionGetter
- func (s *InMemoryRevisionGetter) Backend() string
- func (s *InMemoryRevisionGetter) PurgeRevision(ctx context.Context, rev Revision) error
- func (s *InMemoryRevisionGetter) PurgeRevisions(ctx context.Context, revs RevisionList) (RevisionList, error)
- func (s *InMemoryRevisionGetter) Revisions(namespace string) RevisionInterface
- func (s *InMemoryRevisionGetter) State(ctx context.Context, o StateOptions) (State, error)
- type LazyLoadingRevision
- func (l *LazyLoadingRevision) APIVersion() string
- func (l *LazyLoadingRevision) Content() (*unstructured.Unstructured, error)
- func (l *LazyLoadingRevision) Deleted() bool
- func (r LazyLoadingRevision) Key() string
- func (l *LazyLoadingRevision) Kind() string
- func (l *LazyLoadingRevision) MarshalJSON() ([]byte, error)
- func (l *LazyLoadingRevision) Name() string
- func (l *LazyLoadingRevision) Namespace() string
- func (r LazyLoadingRevision) ResourceKey() string
- func (l *LazyLoadingRevision) ResourceVersion() int
- func (r LazyLoadingRevision) RevisionKey() string
- func (l *LazyLoadingRevision) RevisionTimestamp() time.Time
- func (l *LazyLoadingRevision) SetDeleted(deleted bool)
- func (l *LazyLoadingRevision) String() string
- func (l *LazyLoadingRevision) TypeMeta() metav1.TypeMeta
- type OptionFunc
- func WithBackend(backend backend.Backend) OptionFunc
- func WithCache(shouldCache bool) OptionFunc
- func WithConcurrentWrites(concurrentWrites int) OptionFunc
- func WithConfigger(configger config.Configger) OptionFunc
- func WithDeleteUntracked(deleteUntracked bool) OptionFunc
- func WithEncrypter(e crypt.Encrypter) OptionFunc
- type PurgingRevisionGetter
- type ReadWriteStore
- func (s *ReadWriteStore) Backend() string
- func (s *ReadWriteStore) PurgeRevision(ctx context.Context, rev Revision) error
- func (s *ReadWriteStore) PurgeRevisions(ctx context.Context, revs RevisionList) (RevisionList, error)
- func (s *ReadWriteStore) Revisions(namespace string) RevisionInterface
- func (s *ReadWriteStore) State(ctx context.Context, o StateOptions) (State, error)
- func (s *ReadWriteStore) Sync(ctx context.Context, handlers handler.ResourceHandlers) (State, RevisionList, error)
- type Revision
- type RevisionClient
- type RevisionGetter
- type RevisionInterface
- type RevisionList
- type RevisionPurger
- type RevisionStore
- func (s *RevisionStore) Backend() string
- func (s *RevisionStore) Close(ctx context.Context) error
- func (s *RevisionStore) Revisions(namespace string) RevisionInterface
- func (s *RevisionStore) State(ctx context.Context, o StateOptions) (State, error)
- func (s *RevisionStore) Sync(ctx context.Context, handlers handler.ResourceHandlers) (State, RevisionList, error)
- type State
- type StateOptions
- type Stater
- type Storer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JoinKeyPrefix ¶
func KeyPrefixForAPIVersion ¶
func NewInstrumentedAsyncRevisionInterface ¶
func NewInstrumentedAsyncRevisionInterface(r AsyncWriteRevisionInterface) *instrumentedAsyncRevisionInterface
func NewInstrumentedRevisionInterface ¶
func NewInstrumentedRevisionInterface(r RevisionInterface) *instrumentedRevisionInterface
func NewInstrumentedRevisionPurger ¶
func NewInstrumentedRevisionPurger(r RevisionPurger) *instrumentedRevisionPurger
func NewRevisionPurger ¶
func NewRevisionPurger(s *RevisionStore) *revisionPurger
func ResourceKey ¶
func RevisionKey ¶
func StripMetadata ¶
func StripMetadata(u *unstructured.Unstructured)
Types ¶
type AsyncResponse ¶
type AsyncWriteRevisionInterface ¶
type AsyncWriteRevisionInterface interface { RevisionInterface AsyncCreate(context.Context, Revision) (<-chan AsyncResponse, error) AsyncUpdate(context.Context, Revision) (<-chan AsyncResponse, error) AsyncDelete(context.Context, Revision) (<-chan AsyncResponse, error) }
type ConcreteRevision ¶
type ConcreteRevision struct {
// contains filtered or unexported fields
}
func RevisionFrom ¶
func RevisionFrom(u *unstructured.Unstructured) *ConcreteRevision
func (*ConcreteRevision) APIVersion ¶
func (c *ConcreteRevision) APIVersion() string
func (*ConcreteRevision) Content ¶
func (c *ConcreteRevision) Content() (*unstructured.Unstructured, error)
func (*ConcreteRevision) Deleted ¶
func (c *ConcreteRevision) Deleted() bool
func (*ConcreteRevision) Kind ¶
func (c *ConcreteRevision) Kind() string
func (*ConcreteRevision) MarshalJSON ¶
func (c *ConcreteRevision) MarshalJSON() ([]byte, error)
func (*ConcreteRevision) Name ¶
func (c *ConcreteRevision) Name() string
func (*ConcreteRevision) Namespace ¶
func (c *ConcreteRevision) Namespace() string
func (ConcreteRevision) ResourceKey ¶
func (r ConcreteRevision) ResourceKey() string
func (*ConcreteRevision) ResourceVersion ¶
func (c *ConcreteRevision) ResourceVersion() int
func (ConcreteRevision) RevisionKey ¶
func (r ConcreteRevision) RevisionKey() string
func (*ConcreteRevision) RevisionTimestamp ¶
func (c *ConcreteRevision) RevisionTimestamp() time.Time
func (*ConcreteRevision) SetDeleted ¶
func (c *ConcreteRevision) SetDeleted(deleted bool)
func (*ConcreteRevision) String ¶
func (c *ConcreteRevision) String() string
func (*ConcreteRevision) TypeMeta ¶
func (c *ConcreteRevision) TypeMeta() metav1.TypeMeta
type InMemoryRevisionGetter ¶
type InMemoryRevisionGetter struct {
// contains filtered or unexported fields
}
func NewInMemoryGetter ¶
func NewInMemoryGetter() *InMemoryRevisionGetter
func (*InMemoryRevisionGetter) Backend ¶
func (s *InMemoryRevisionGetter) Backend() string
func (*InMemoryRevisionGetter) PurgeRevision ¶
func (s *InMemoryRevisionGetter) PurgeRevision(ctx context.Context, rev Revision) error
func (*InMemoryRevisionGetter) PurgeRevisions ¶
func (s *InMemoryRevisionGetter) PurgeRevisions(ctx context.Context, revs RevisionList) (RevisionList, error)
func (*InMemoryRevisionGetter) Revisions ¶
func (s *InMemoryRevisionGetter) Revisions(namespace string) RevisionInterface
func (*InMemoryRevisionGetter) State ¶
func (s *InMemoryRevisionGetter) State(ctx context.Context, o StateOptions) (State, error)
TODO support label selectors for cached backend? not really needed right now
type LazyLoadingRevision ¶
type LazyLoadingRevision struct {
// contains filtered or unexported fields
}
func (*LazyLoadingRevision) APIVersion ¶
func (l *LazyLoadingRevision) APIVersion() string
func (*LazyLoadingRevision) Content ¶
func (l *LazyLoadingRevision) Content() (*unstructured.Unstructured, error)
func (*LazyLoadingRevision) Deleted ¶
func (l *LazyLoadingRevision) Deleted() bool
func (*LazyLoadingRevision) Kind ¶
func (l *LazyLoadingRevision) Kind() string
func (*LazyLoadingRevision) MarshalJSON ¶
func (l *LazyLoadingRevision) MarshalJSON() ([]byte, error)
func (*LazyLoadingRevision) Name ¶
func (l *LazyLoadingRevision) Name() string
func (*LazyLoadingRevision) Namespace ¶
func (l *LazyLoadingRevision) Namespace() string
func (LazyLoadingRevision) ResourceKey ¶
func (r LazyLoadingRevision) ResourceKey() string
func (*LazyLoadingRevision) ResourceVersion ¶
func (l *LazyLoadingRevision) ResourceVersion() int
func (LazyLoadingRevision) RevisionKey ¶
func (r LazyLoadingRevision) RevisionKey() string
func (*LazyLoadingRevision) RevisionTimestamp ¶
func (l *LazyLoadingRevision) RevisionTimestamp() time.Time
func (*LazyLoadingRevision) SetDeleted ¶
func (l *LazyLoadingRevision) SetDeleted(deleted bool)
func (*LazyLoadingRevision) String ¶
func (l *LazyLoadingRevision) String() string
func (*LazyLoadingRevision) TypeMeta ¶
func (l *LazyLoadingRevision) TypeMeta() metav1.TypeMeta
type OptionFunc ¶
type OptionFunc func(*RevisionStore)
func WithBackend ¶
func WithBackend(backend backend.Backend) OptionFunc
func WithCache ¶
func WithCache(shouldCache bool) OptionFunc
func WithConcurrentWrites ¶
func WithConcurrentWrites(concurrentWrites int) OptionFunc
func WithConfigger ¶
func WithConfigger(configger config.Configger) OptionFunc
func WithDeleteUntracked ¶
func WithDeleteUntracked(deleteUntracked bool) OptionFunc
func WithEncrypter ¶
func WithEncrypter(e crypt.Encrypter) OptionFunc
type PurgingRevisionGetter ¶
type PurgingRevisionGetter interface { RevisionGetter RevisionPurger }
type ReadWriteStore ¶
type ReadWriteStore struct { Storer // contains filtered or unexported fields }
func (*ReadWriteStore) Backend ¶
func (s *ReadWriteStore) Backend() string
func (*ReadWriteStore) PurgeRevision ¶
func (s *ReadWriteStore) PurgeRevision(ctx context.Context, rev Revision) error
func (*ReadWriteStore) PurgeRevisions ¶
func (s *ReadWriteStore) PurgeRevisions(ctx context.Context, revs RevisionList) (RevisionList, error)
func (*ReadWriteStore) Revisions ¶
func (s *ReadWriteStore) Revisions(namespace string) RevisionInterface
func (*ReadWriteStore) State ¶
func (s *ReadWriteStore) State(ctx context.Context, o StateOptions) (State, error)
func (*ReadWriteStore) Sync ¶
func (s *ReadWriteStore) Sync(ctx context.Context, handlers handler.ResourceHandlers) (State, RevisionList, error)
type Revision ¶
type Revision interface { json.Marshaler fmt.Stringer Content() (*unstructured.Unstructured, error) Namespace() string Name() string ResourceVersion() int RevisionTimestamp() time.Time APIVersion() string Kind() string RevisionKey() string ResourceKey() string Key() string SetDeleted(bool) Deleted() bool TypeMeta() metav1.TypeMeta }
type RevisionClient ¶
type RevisionClient interface { PurgingRevisionGetter Stater }
type RevisionGetter ¶
type RevisionGetter interface {
Revisions(namespace string) RevisionInterface
}
type RevisionInterface ¶
type RevisionInterface interface { Create(context.Context, Revision) (Revision, error) Update(context.Context, Revision) (Revision, error) Delete(context.Context, Revision) error Get(context.Context, Revision) (Revision, error) List(context.Context, metav1.TypeMeta, string, metav1.ListOptions) (RevisionList, error) }
type RevisionList ¶
type RevisionList []Revision
func (RevisionList) Cut ¶
func (revs RevisionList) Cut(i, j int) RevisionList
func (RevisionList) Len ¶
func (revs RevisionList) Len() int
func (RevisionList) Less ¶
func (revs RevisionList) Less(x, y int) bool
func (RevisionList) MarshalJSONWithContent ¶
func (revs RevisionList) MarshalJSONWithContent(prefix, indent string) ([]byte, error)
func (RevisionList) String ¶
func (revs RevisionList) String() string
func (RevisionList) Swap ¶
func (revs RevisionList) Swap(x, y int)
type RevisionPurger ¶
type RevisionPurger interface { PurgeRevision(context.Context, Revision) error PurgeRevisions(context.Context, RevisionList) (RevisionList, error) }
type RevisionStore ¶
type RevisionStore struct { config.Configger RevisionPurger // contains filtered or unexported fields }
func (*RevisionStore) Backend ¶
func (s *RevisionStore) Backend() string
func (*RevisionStore) Revisions ¶
func (s *RevisionStore) Revisions(namespace string) RevisionInterface
func (*RevisionStore) State ¶
func (s *RevisionStore) State(ctx context.Context, o StateOptions) (State, error)
func (*RevisionStore) Sync ¶
func (s *RevisionStore) Sync(ctx context.Context, handlers handler.ResourceHandlers) (State, RevisionList, error)
type StateOptions ¶
type Storer ¶
type Storer interface { RevisionClient config.Configger // PurgeObject(tm metav1.TypeMeta, namespace, name string) error Sync(context.Context, handler.ResourceHandlers) (State, RevisionList, error) Close(context.Context) error Backend() string }
func NewReadWriteStorer ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.