sync

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSyncStorage

func NewSyncStorage(rwStorage storage.Storage, wStorages ...storage.Storage) storage.Storage

NewSyncStorage constructs a new SyncStorage

Types

type SyncStorage

type SyncStorage struct {
	storage.Storage
	// contains filtered or unexported fields
}

SyncStorage is a Storage implementation taking in multiple Storages and keeping them in sync. Any write operation executed on the SyncStorage is propagated to all of the Storages it manages (including the embedded one). For any retrieval or generation operation, the embedded Storage will be used (it is treated as read-write). As all other Storages only receive write operations, they can be thought of as write-only.

func (*SyncStorage) Close

func (ss *SyncStorage) Close() error

func (*SyncStorage) Delete

func (ss *SyncStorage) Delete(gvk schema.GroupVersionKind, uid runtime.UID) error

Delete is propagated to all Storages

func (*SyncStorage) GetUpdateStream

func (ss *SyncStorage) GetUpdateStream() UpdateStream

func (*SyncStorage) Patch

func (ss *SyncStorage) Patch(gvk schema.GroupVersionKind, uid runtime.UID, patch []byte) error

Patch is propagated to all Storages

func (*SyncStorage) Set

Set is propagated to all Storages

type UpdateStream

type UpdateStream chan update.Update

Jump to

Keyboard shortcuts

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