mvmap

package
v0.0.0-...-ea486a4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MVMap

type MVMap struct {
	// contains filtered or unexported fields
}

MVMap stores multiple value for a given key with minimum GC overhead. A given key can store multiple values. It is not thread-safe, should only be used in one goroutine.

func NewMVMap

func NewMVMap() *MVMap

NewMVMap creates a new multi-value map.

func (*MVMap) Get

func (m *MVMap) Get(key []byte) [][]byte

Get gets the values of the key.

func (*MVMap) Put

func (m *MVMap) Put(key, value []byte)

Put puts the key/value pairs to the MVMap, if the key already exists, old value will not be overwritten, values are stored in a list.

Jump to

Keyboard shortcuts

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