netkv

package
v0.0.0-...-060dca9 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NetKVMap

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

func (*NetKVMap) Get

func (n *NetKVMap) Get(bucket []byte) *Session

func (*NetKVMap) GetBucketList

func (n *NetKVMap) GetBucketList() []string

func (*NetKVMap) GetLocalBuckets

func (n *NetKVMap) GetLocalBuckets() (r []string)

func (*NetKVMap) GetWithInfo

func (n *NetKVMap) GetWithInfo(bucket []byte) (sess *Session, global bool)

func (*NetKVMap) Init

func (n *NetKVMap) Init()

func (*NetKVMap) IsNet

func (n *NetKVMap) IsNet(bucket []byte) (has, global bool)

func (*NetKVMap) Offer

func (n *NetKVMap) Offer(provider string, bucket, meta []byte, global bool) bool

func (*NetKVMap) Remove

func (n *NetKVMap) Remove(bucket []byte)

type Provider

type Provider func(bucket, meta []byte) (*Session, error)

func (Provider) RegisterAs

func (p Provider) RegisterAs(pname string)

Used to register providers. Call this only during the init() phase.

type Session

type Session struct {
	Closer   io.Closer
	Reader   bucketstore.BucketR
	Writer   bucketstore.BucketW
	WriterEx bucketstore.BucketWEx
}

func (*Session) Close

func (s *Session) Close() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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