Documentation ¶
Index ¶
- func EnableAutoReconnect(opt *ServerOption)
- func EnableHeartbeat(opt *ServerOption)
- type Item
- type Node
- type Ring
- type Server
- type ServerOperationType
- type ServerOpt
- type ServerOption
- type ServerWithBinaryProtocol
- func (s *ServerWithBinaryProtocol) Add(item *Item) error
- func (s *ServerWithBinaryProtocol) Close() error
- func (s *ServerWithBinaryProtocol) Decrement(key string, delta, expiration int) (int64, error)
- func (s *ServerWithBinaryProtocol) Delete(key string) error
- func (s *ServerWithBinaryProtocol) Flush() error
- func (s *ServerWithBinaryProtocol) Get(key string) (*Item, error)
- func (s *ServerWithBinaryProtocol) GetMulti(keys ...string) ([]*Item, error)
- func (s *ServerWithBinaryProtocol) Increment(key string, delta, expiration int) (int64, error)
- func (s *ServerWithBinaryProtocol) Name() string
- func (s *ServerWithBinaryProtocol) Reconnect() error
- func (s *ServerWithBinaryProtocol) Replace(item *Item) error
- func (s *ServerWithBinaryProtocol) Set(item *Item) error
- func (s *ServerWithBinaryProtocol) Touch(key string, expiration int) error
- func (s *ServerWithBinaryProtocol) Version() (string, error)
- type ServerWithMetaProtocol
- func (s *ServerWithMetaProtocol) Add(item *Item) error
- func (s *ServerWithMetaProtocol) Close() error
- func (s *ServerWithMetaProtocol) Decrement(key string, delta, _ int) (int64, error)
- func (s *ServerWithMetaProtocol) Delete(key string) error
- func (s *ServerWithMetaProtocol) Flush() error
- func (s *ServerWithMetaProtocol) Get(key string) (*Item, error)
- func (s *ServerWithMetaProtocol) GetMulti(keys ...string) ([]*Item, error)
- func (s *ServerWithMetaProtocol) Increment(key string, delta, _ int) (int64, error)
- func (s *ServerWithMetaProtocol) Name() string
- func (s *ServerWithMetaProtocol) Reconnect() error
- func (s *ServerWithMetaProtocol) Replace(item *Item) error
- func (s *ServerWithMetaProtocol) Set(item *Item) error
- func (s *ServerWithMetaProtocol) Touch(key string, expiration int) error
- func (s *ServerWithMetaProtocol) Version() (string, error)
- type ServerWithTextProtocol
- func (s *ServerWithTextProtocol) Add(item *Item) error
- func (s *ServerWithTextProtocol) Close() error
- func (s *ServerWithTextProtocol) Decrement(key string, delta, _ int) (int64, error)
- func (s *ServerWithTextProtocol) Delete(key string) error
- func (s *ServerWithTextProtocol) Flush() error
- func (s *ServerWithTextProtocol) Get(key string) (*Item, error)
- func (s *ServerWithTextProtocol) GetMulti(keys ...string) ([]*Item, error)
- func (s *ServerWithTextProtocol) Increment(key string, delta, _ int) (int64, error)
- func (s *ServerWithTextProtocol) Name() string
- func (s *ServerWithTextProtocol) Reconnect() error
- func (s *ServerWithTextProtocol) Replace(item *Item) error
- func (s *ServerWithTextProtocol) Set(item *Item) error
- func (s *ServerWithTextProtocol) Touch(key string, expiration int) error
- func (s *ServerWithTextProtocol) Version() (string, error)
- type SinglePool
- func (c *SinglePool) Add(item *Item) error
- func (c *SinglePool) Close() error
- func (c *SinglePool) Decrement(key string, delta, expiration int) (int64, error)
- func (c *SinglePool) Delete(key string) error
- func (c *SinglePool) Flush() error
- func (c *SinglePool) Get(key string) (*Item, error)
- func (c *SinglePool) GetMulti(keys ...string) ([]*Item, error)
- func (c *SinglePool) Increment(key string, delta, expiration int) (int64, error)
- func (c *SinglePool) Replace(item *Item) error
- func (c *SinglePool) Set(item *Item) error
- func (c *SinglePool) Touch(key string, expiration int) error
- func (c *SinglePool) Version() (map[string]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnableAutoReconnect ¶
func EnableAutoReconnect(opt *ServerOption)
func EnableHeartbeat ¶
func EnableHeartbeat(opt *ServerOption)
Types ¶
type Server ¶
type Server interface { Name() string Close() error Get(key string) (*Item, error) GetMulti(keys ...string) ([]*Item, error) Set(item *Item) error Add(item *Item) error Replace(item *Item) error Delete(key string) error Increment(key string, delta int, expiration int) (int64, error) Decrement(key string, delta int, expiration int) (int64, error) Touch(key string, expiration int) error Flush() error Version() (string, error) Reconnect() error }
type ServerOperationType ¶
type ServerOperationType string
const ( ServerDeleteOnly ServerOperationType = "delete_only" ServerWriteOnly ServerOperationType = "write_only" )
type ServerOpt ¶
type ServerOpt func(*ServerOption)
type ServerOption ¶
type ServerWithBinaryProtocol ¶
type ServerWithBinaryProtocol struct { Network string Addr string Type ServerOperationType Timeout time.Duration // contains filtered or unexported fields }
func (*ServerWithBinaryProtocol) Add ¶
func (s *ServerWithBinaryProtocol) Add(item *Item) error
func (*ServerWithBinaryProtocol) Close ¶
func (s *ServerWithBinaryProtocol) Close() error
func (*ServerWithBinaryProtocol) Decrement ¶
func (s *ServerWithBinaryProtocol) Decrement(key string, delta, expiration int) (int64, error)
func (*ServerWithBinaryProtocol) Delete ¶
func (s *ServerWithBinaryProtocol) Delete(key string) error
func (*ServerWithBinaryProtocol) Flush ¶
func (s *ServerWithBinaryProtocol) Flush() error
func (*ServerWithBinaryProtocol) Get ¶
func (s *ServerWithBinaryProtocol) Get(key string) (*Item, error)
func (*ServerWithBinaryProtocol) GetMulti ¶
func (s *ServerWithBinaryProtocol) GetMulti(keys ...string) ([]*Item, error)
func (*ServerWithBinaryProtocol) Increment ¶
func (s *ServerWithBinaryProtocol) Increment(key string, delta, expiration int) (int64, error)
func (*ServerWithBinaryProtocol) Name ¶
func (s *ServerWithBinaryProtocol) Name() string
func (*ServerWithBinaryProtocol) Reconnect ¶
func (s *ServerWithBinaryProtocol) Reconnect() error
func (*ServerWithBinaryProtocol) Replace ¶
func (s *ServerWithBinaryProtocol) Replace(item *Item) error
func (*ServerWithBinaryProtocol) Set ¶
func (s *ServerWithBinaryProtocol) Set(item *Item) error
func (*ServerWithBinaryProtocol) Touch ¶
func (s *ServerWithBinaryProtocol) Touch(key string, expiration int) error
func (*ServerWithBinaryProtocol) Version ¶
func (s *ServerWithBinaryProtocol) Version() (string, error)
type ServerWithMetaProtocol ¶
type ServerWithMetaProtocol struct { Network string Addr string Type ServerOperationType Timeout time.Duration // contains filtered or unexported fields }
func (*ServerWithMetaProtocol) Add ¶
func (s *ServerWithMetaProtocol) Add(item *Item) error
func (*ServerWithMetaProtocol) Close ¶
func (s *ServerWithMetaProtocol) Close() error
func (*ServerWithMetaProtocol) Decrement ¶
func (s *ServerWithMetaProtocol) Decrement(key string, delta, _ int) (int64, error)
Decrement is decrement value when if exist key. implement is same as textProtocol.Decr.
func (*ServerWithMetaProtocol) Delete ¶
func (s *ServerWithMetaProtocol) Delete(key string) error
func (*ServerWithMetaProtocol) Flush ¶
func (s *ServerWithMetaProtocol) Flush() error
func (*ServerWithMetaProtocol) Get ¶
func (s *ServerWithMetaProtocol) Get(key string) (*Item, error)
func (*ServerWithMetaProtocol) GetMulti ¶
func (s *ServerWithMetaProtocol) GetMulti(keys ...string) ([]*Item, error)
func (*ServerWithMetaProtocol) Increment ¶
func (s *ServerWithMetaProtocol) Increment(key string, delta, _ int) (int64, error)
Increment is increment value when if exist key. implement is same as textProtocol.Incr.
func (*ServerWithMetaProtocol) Name ¶
func (s *ServerWithMetaProtocol) Name() string
func (*ServerWithMetaProtocol) Reconnect ¶
func (s *ServerWithMetaProtocol) Reconnect() error
func (*ServerWithMetaProtocol) Replace ¶
func (s *ServerWithMetaProtocol) Replace(item *Item) error
func (*ServerWithMetaProtocol) Set ¶
func (s *ServerWithMetaProtocol) Set(item *Item) error
func (*ServerWithMetaProtocol) Touch ¶
func (s *ServerWithMetaProtocol) Touch(key string, expiration int) error
func (*ServerWithMetaProtocol) Version ¶
func (s *ServerWithMetaProtocol) Version() (string, error)
type ServerWithTextProtocol ¶
type ServerWithTextProtocol struct { Network string Addr string Type ServerOperationType Timeout time.Duration // contains filtered or unexported fields }
func (*ServerWithTextProtocol) Add ¶
func (s *ServerWithTextProtocol) Add(item *Item) error
func (*ServerWithTextProtocol) Close ¶
func (s *ServerWithTextProtocol) Close() error
func (*ServerWithTextProtocol) Decrement ¶
func (s *ServerWithTextProtocol) Decrement(key string, delta, _ int) (int64, error)
func (*ServerWithTextProtocol) Delete ¶
func (s *ServerWithTextProtocol) Delete(key string) error
func (*ServerWithTextProtocol) Flush ¶
func (s *ServerWithTextProtocol) Flush() error
func (*ServerWithTextProtocol) Get ¶
func (s *ServerWithTextProtocol) Get(key string) (*Item, error)
func (*ServerWithTextProtocol) GetMulti ¶
func (s *ServerWithTextProtocol) GetMulti(keys ...string) ([]*Item, error)
func (*ServerWithTextProtocol) Increment ¶
func (s *ServerWithTextProtocol) Increment(key string, delta, _ int) (int64, error)
func (*ServerWithTextProtocol) Name ¶
func (s *ServerWithTextProtocol) Name() string
func (*ServerWithTextProtocol) Reconnect ¶
func (s *ServerWithTextProtocol) Reconnect() error
func (*ServerWithTextProtocol) Replace ¶
func (s *ServerWithTextProtocol) Replace(item *Item) error
func (*ServerWithTextProtocol) Set ¶
func (s *ServerWithTextProtocol) Set(item *Item) error
func (*ServerWithTextProtocol) Touch ¶
func (s *ServerWithTextProtocol) Touch(key string, expiration int) error
func (*ServerWithTextProtocol) Version ¶
func (s *ServerWithTextProtocol) Version() (string, error)
type SinglePool ¶
type SinglePool struct {
// contains filtered or unexported fields
}
func NewSinglePool ¶
func NewSinglePool(servers ...Server) (*SinglePool, error)
func (*SinglePool) Add ¶
func (c *SinglePool) Add(item *Item) error
func (*SinglePool) Close ¶
func (c *SinglePool) Close() error
func (*SinglePool) Decrement ¶
func (c *SinglePool) Decrement(key string, delta, expiration int) (int64, error)
func (*SinglePool) Delete ¶
func (c *SinglePool) Delete(key string) error
func (*SinglePool) Flush ¶
func (c *SinglePool) Flush() error
func (*SinglePool) Increment ¶
func (c *SinglePool) Increment(key string, delta, expiration int) (int64, error)
func (*SinglePool) Replace ¶
func (c *SinglePool) Replace(item *Item) error
func (*SinglePool) Set ¶
func (c *SinglePool) Set(item *Item) error
Click to show internal directories.
Click to hide internal directories.