Documentation ¶
Overview ¶
Package wbstore implements a wrapper for a blob.Store that caches non-replacement writes of in a buffer and pushes them to the base store concurrently in the background.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
Store implements the blob.Store interface by delegating to a base store. Non-replacement writes to blob.KV instances derived from the base store are buffered and written back to the underlying store by a background worker that runs concurrently with the store.
func New ¶
New constructs a blob.Store wrapper that delegates to base and uses buf as a local buffer store. New will panic if base == nil or buf == nil. The ctx value governs the operation of the background writer, which will run until the store is closed or ctx terminates.
func (Store) Close ¶
Close implements part of the blob.StoreCloser interface.