cache

package
v0.0.0-...-db6c267 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2015 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Address      = "/tmp/passman.sock" // Socket path
	Network      = "unix"              // Unix domain socket
	ChecksumSize = 256
)

Variables

This section is empty.

Functions

func CacheKey

func CacheKey(key []byte) error

Types

type Cache

type Cache map[Checksum][]byte

func (Cache) RequestKey

func (c Cache) RequestKey(sum Checksum, reply *KeyReply) error

func (Cache) SetKey

func (c Cache) SetKey(pair SumKeyPair, reply *bool) error

type Checksum

type Checksum [ChecksumSize]byte

type KeyReply

type KeyReply struct {
	Key       []byte
	Available bool
}

func GetKey

func GetKey() (reply *KeyReply, err error)

type SumKeyPair

type SumKeyPair struct {
	Sum Checksum
	Key []byte
}

Jump to

Keyboard shortcuts

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