Documentation ¶
Index ¶
- Variables
- type Bucket
- type Client
- func (c *Client) Close() error
- func (c *Client) DelBytes(key string) error
- func (c *Client) DelUint(key string) error
- func (c *Client) GetBytes(key string) ([]byte, error)
- func (c *Client) GetBytesInto(key string, dst []byte) (uint32, error)
- func (c *Client) GetBytesRange(key string, start, end uint32) ([]byte, error)
- func (c *Client) GetBytesRangeInto(key string, start, end uint32, dst []byte) (uint32, error)
- func (c *Client) GetUint(key string) (uint32, error)
- func (c *Client) SetBytes(key string, data []byte)
- func (c *Client) SetBytesRange(key string, start uint32, data []byte)
- func (c *Client) SetUint(key string, val uint32)
- func (c *Client) SetUintIfMax(key string, val uint32)
- func (c *Client) Shutdown()
- func (c *Client) TruncateBytes(key string, size uint32) error
- type ConsistentHash
- type Hash
- type Message
- type Ring
- func (r *Ring) Close() error
- func (r *Ring) DelBytes(key string) error
- func (r *Ring) DelUint(key string) error
- func (r *Ring) GetBytes(key string) ([]byte, error)
- func (r *Ring) GetBytesRange(key string, start, end uint32) ([]byte, error)
- func (r *Ring) GetBytesRangeUinto(key string, start, end uint32, dst []byte) (uint32, error)
- func (r *Ring) GetBytesUinto(key string, dst []byte) (uint32, error)
- func (r *Ring) GetClient(key string) *Client
- func (r *Ring) GetUint(key string) (uint32, error)
- func (r *Ring) SetBytes(key string, data []byte)
- func (r *Ring) SetBytesRange(key string, start uint32, data []byte)
- func (r *Ring) SetUint(key string, val uint32)
- func (r *Ring) SetUintIfMax(key string, val uint32)
- func (r *Ring) TruncateBytes(key string, size uint32) error
- type Server
- type ServerOptions
- type Store
- func (s *Store) DelBytes(bucket *Bucket, key string, conn net.Conn)
- func (s *Store) DelUint(bucket *Bucket, key string, conn net.Conn)
- func (s *Store) GetBytes(bucket *Bucket, key string, conn net.Conn)
- func (s *Store) GetBytesInto(bucket *Bucket, key string, conn net.Conn)
- func (s *Store) GetBytesRange(bucket *Bucket, key string, conn net.Conn)
- func (s *Store) GetBytesRangeInto(bucket *Bucket, key string, conn net.Conn)
- func (s *Store) GetUint(bucket *Bucket, key string, conn net.Conn)
- func (s *Store) SetBytes(bucket *Bucket, key string, conn net.Conn)
- func (s *Store) SetBytesRange(bucket *Bucket, key string, conn net.Conn)
- func (s *Store) SetUint(bucket *Bucket, key string, conn net.Conn)
- func (s *Store) SetUintIfMax(bucket *Bucket, key string, conn net.Conn)
- func (s *Store) TruncateBytes(bucket *Bucket, key string, conn net.Conn)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrKeyNotFound is raised when the key requested by the client is not found ErrKeyNotFound = errors.New("key not found") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client ...
func (*Client) GetBytesInto ¶
GetBytesInto ...
func (*Client) GetBytesRange ¶
GetBytesRange ...
func (*Client) GetBytesRangeInto ¶
GetBytesRangeInto ...
func (*Client) SetBytesRange ¶
SetBytesRange ...
func (*Client) SetUintIfMax ¶
SetUintIfMax ...
type ConsistentHash ¶
type ConsistentHash struct {
// contains filtered or unexported fields
}
ConsistentHash ...
func NewConsistentHash ¶
func NewConsistentHash(replicas int, fn Hash) *ConsistentHash
NewConsistentHash ...
func (*ConsistentHash) Add ¶
func (m *ConsistentHash) Add(keys ...string)
Add some keys to the hash.
func (*ConsistentHash) Get ¶
func (m *ConsistentHash) Get(key string) string
Get the closest item in the hash to the provided key.
func (*ConsistentHash) IsEmpty ¶
func (m *ConsistentHash) IsEmpty() bool
IsEmpty returns true if there are no items available.
type Ring ¶
type Ring struct {
// contains filtered or unexported fields
}
Ring ...
func (*Ring) GetBytesRange ¶
GetBytesRange ...
func (*Ring) GetBytesRangeUinto ¶
GetBytesRangeUinto ...
func (*Ring) GetBytesUinto ¶
GetBytesUinto ...
func (*Ring) SetBytesRange ¶
SetBytesRange ...
type ServerOptions ¶
ServerOptions ...
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store manages requests and buckets
func (*Store) GetBytesInto ¶
GetBytesInto ...
func (*Store) GetBytesRange ¶
GetBytesRange ...
func (*Store) GetBytesRangeInto ¶
GetBytesRangeInto ...
func (*Store) SetBytesRange ¶
SetBytesRange ...
func (*Store) SetUintIfMax ¶
SetUintIfMax ...
Click to show internal directories.
Click to hide internal directories.