Documentation
¶
Index ¶
- Constants
- Variables
- type Client
- func (c *Client) Delete(key string) error
- func (c *Client) DiscoveryService(serviceName string) ([]Instance, error)
- func (c *Client) Get(key string) (*themis.KV, error)
- func (c *Client) Heartbeat(instance *Instance) error
- func (c *Client) Info() Info
- func (c *Client) ListAllKV() ([]*themis.KV, error)
- func (c *Client) NodeInfo(name string) (NodeInfo, error)
- func (c *Client) RegisterInstance(instance *Instance) error
- func (c *Client) RegisterInstanceWithHeartbeat(instance *Instance, heartbeatTimeout time.Duration) error
- func (c *Client) RegisterInstanceWithIP(serviceName, ip string, port int) error
- func (c *Client) RegisterInstanceWithIPCluster(serviceName, clusterName, ip string, port int) error
- func (c *Client) SearchByPrefix(prefix string) ([]*themis.KV, error)
- func (c *Client) SearchKVListFromNodeName(name string) ([]*themis.KV, error)
- func (c *Client) Set(key string, value interface{}) error
- func (c *Client) SetWithExpireTime(key string, value interface{}, ttl time.Duration) error
- func (c *Client) Watch(key string, op OperateType, callback WatchCallback) error
- func (c *Client) WatchStream(key string, op OperateType, callback WatchCallback) error
- type Config
- type Info
- type Instance
- type NodeInfo
- type OperateType
- type Option
- type WatchCallback
Constants ¶
View Source
const ( ServiceMark = "service" DefaultClusterName = "/" )
Variables ¶
View Source
var DefaultConfigration = func() *Config { return &Config{ LoadBalancerName: loadbalance.DefaultName, RetryNum: 3, } }
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) DiscoveryService ¶
func (*Client) RegisterInstanceWithHeartbeat ¶
func (*Client) RegisterInstanceWithIP ¶
func (*Client) RegisterInstanceWithIPCluster ¶
func (*Client) SearchByPrefix ¶
func (*Client) SearchKVListFromNodeName ¶
func (*Client) SetWithExpireTime ¶
func (*Client) Watch ¶
func (c *Client) Watch(key string, op OperateType, callback WatchCallback) error
func (*Client) WatchStream ¶
func (c *Client) WatchStream(key string, op OperateType, callback WatchCallback) error
type Config ¶
type Instance ¶
type NodeInfo ¶
type OperateType ¶
type OperateType int32
const ( ALL OperateType = 0 Set OperateType = 1 Get OperateType = 2 Delete OperateType = 3 Write OperateType = 4 Expire OperateType = 5 )
type WatchCallback ¶
type WatchCallback func(preKV, kv *themis.KV, t OperateType) error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.