Documentation ¶
Overview ¶
Package locked implements a delegating wrapper that protects each method of the resulting kcd.Reader or kcd.ReadWriter with a mutex, so that the result is safe for concurrent use by multiple goroutines.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotSupported = errors.New("write operation not supported")
ErrNotSupported is returned by the write methods if no Writer is available.
Functions ¶
func ReadWriteDeleter ¶
func ReadWriteDeleter(rwd kcd.ReadWriteDeleter) kcd.ReadWriteDeleter
ReadWriteDeleter returns a kcd.ReadWriteDeleter that delegates to rwd with method calls protected by a mutex.
func ReadWriter ¶
func ReadWriter(rw kcd.ReadWriter) kcd.ReadWriter
ReadWriter returns a kcd.ReadWriter that delegates to rw with method calls protected by a mutex.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.