Documentation
¶
Overview ¶
Package replicator provides very simple replication functionality which copies most recent state version from one store to another. This can be used for example when you want to replicate state from local disk to a shared (network) disk such as AWS EFS.
Index ¶
- func CopyFromTo(from codec.ReadOnlyStore, to codec.WriteOnlyStore) error
- func ReadLatest(decoder codec.Decoder, stores ...codec.ReadOnlyStore) (store.Version, error)
- func SetLoggerAdapter(adapter logger.Adapter)
- func StartFromTo(ctx context.Context, from codec.ReadOnlyStore, to codec.WriteOnlyStore, ...) error
- type Option
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyFromTo ¶
func CopyFromTo(from codec.ReadOnlyStore, to codec.WriteOnlyStore) error
func ReadLatest ¶
ReadLatest reads latest version from replicated stores.
If latest version cannot be loaded from the first store it tries to load it from the next one.
func SetLoggerAdapter ¶ added in v0.6.1
func StartFromTo ¶
func StartFromTo(ctx context.Context, from codec.ReadOnlyStore, to codec.WriteOnlyStore, options ...Option) error
StartFromTo replicates state asynchronously in one minute intervals
Types ¶
Click to show internal directories.
Click to hide internal directories.