concurrent

package
v1.0.1-0...-4a73120 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package concurrent providers a cache container wrapper for safe concurrent access.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustNewContainer

func MustNewContainer(inner caching.Container) caching.Container

MustNewContainer is like as NewContainer but panic if inner container is nil.

func NewContainer

func NewContainer(inner caching.Container) (caching.Container, error)

NewContainer returns a new caching container for safe concurrent access.

Types

type Container

type Container struct {
	Inner caching.Container
	// contains filtered or unexported fields
}

func (*Container) Clear

func (c *Container) Clear() error

func (*Container) Get

func (c *Container) Get(key string) (*caching.Item, error)

func (*Container) Put

func (c *Container) Put(item *caching.Item) error

func (*Container) Remove

func (c *Container) Remove(key string) error

Jump to

Keyboard shortcuts

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