truncindex

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2014 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoID = errors.New("prefix can't be empty")
)

Functions

This section is empty.

Types

type TruncIndex

type TruncIndex struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

TruncIndex allows the retrieval of string identifiers by any of their unique prefixes. This is used to retrieve image and container IDs by more convenient shorthand prefixes.

func NewTruncIndex

func NewTruncIndex(ids []string) (idx *TruncIndex)

func (*TruncIndex) Add

func (idx *TruncIndex) Add(id string) error

func (*TruncIndex) Delete

func (idx *TruncIndex) Delete(id string) error

func (*TruncIndex) Get

func (idx *TruncIndex) Get(s string) (string, error)

Jump to

Keyboard shortcuts

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