locked

package
v0.0.38 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: Apache-2.0, NCSA Imports: 5 Imported by: 0

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.

func Reader

func Reader(r kcd.Reader) kcd.Reader

Reader returns a kcd.Reader that delegates to r with method calls protected by a mutex.

Types

This section is empty.

Jump to

Keyboard shortcuts

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