Documentation
¶
Index ¶
- Constants
- func NewGenericWatchStorage(s storage.Storage) (update.EventStorage, error)
- func NewManifestStorage(manifestDir string, ser serializer.Serializer) (update.EventStorage, error)
- type GenericWatchStorage
- func (s *GenericWatchStorage) Close() error
- func (s *GenericWatchStorage) Create(obj runtime.Object) error
- func (s *GenericWatchStorage) Delete(key storage.ObjectKey) error
- func (s *GenericWatchStorage) Patch(key storage.ObjectKey, patch []byte) error
- func (s *GenericWatchStorage) SetUpdateStream(eventStream update.UpdateStream)
- func (s *GenericWatchStorage) Update(obj runtime.Object) error
Constants ¶
const EventDeleteObjectName = "<deleted>"
EventDeleteObjectName is used as the name of an object sent to the GenericWatchStorage's event stream when the the object has been deleted
Variables ¶
This section is empty.
Functions ¶
func NewGenericWatchStorage ¶
func NewGenericWatchStorage(s storage.Storage) (update.EventStorage, error)
NewGenericWatchStorage is an extended Storage implementation, which provides a watcher for watching changes in the directory managed by the embedded Storage's RawStorage. If the RawStorage is a MappedRawStorage instance, it's mappings will automatically be updated by the WatchStorage. Update events are sent to the given event stream. Note: This WatchStorage only works for one-frame files (i.e. only one YAML document per file is supported).
func NewManifestStorage ¶
func NewManifestStorage(manifestDir string, ser serializer.Serializer) (update.EventStorage, error)
NewManifestStorage returns a pre-configured GenericWatchStorage backed by a storage.GenericStorage, and a GenericMappedRawStorage for the given manifestDir and Serializer. This should be sufficient for most users that want to watch changes in a directory with manifests.
Types ¶
type GenericWatchStorage ¶
GenericWatchStorage implements the WatchStorage interface
func (*GenericWatchStorage) Close ¶
func (s *GenericWatchStorage) Close() error
func (*GenericWatchStorage) Create ¶
func (s *GenericWatchStorage) Create(obj runtime.Object) error
Suspend modify events during Create
func (*GenericWatchStorage) Delete ¶
func (s *GenericWatchStorage) Delete(key storage.ObjectKey) error
Suspend delete events during Delete
func (*GenericWatchStorage) Patch ¶
func (s *GenericWatchStorage) Patch(key storage.ObjectKey, patch []byte) error
Suspend modify events during Patch
func (*GenericWatchStorage) SetUpdateStream ¶
func (s *GenericWatchStorage) SetUpdateStream(eventStream update.UpdateStream)