common

package
v0.0.0-...-22430d5 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2016 License: MIT Imports: 7 Imported by: 9

Documentation

Index

Constants

View Source
const (
	LOCK_SH = 1
	LOCK_EX = 2
	LOCK_NB = 4 // non-blocking
	LOCK_UN = 8
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Flock

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

func LockDir

func LockDir(dir string) (*Flock, error)

func NewFlock

func NewFlock(dir string) (*Flock, error)

func (*Flock) Unlock

func (f *Flock) Unlock() error

type LRUBytes

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

func NewLRUBytes

func NewLRUBytes(size int, block int) *LRUBytes

func (*LRUBytes) Get

func (l *LRUBytes) Get(off int64) *LRUItem

type LRUItem

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

func (*LRUItem) Get

func (l *LRUItem) Get(r io.ReaderAt, off int64, n int) ([]byte, error)

func (*LRUItem) Len

func (l *LRUItem) Len() int

Jump to

Keyboard shortcuts

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