Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v0.2.0
type Config struct { // Network is the type of Network, which can be one of ["tcp", "tcp4", "tcp6"]. Network string // Ttl is the life of connection. Ttl time.Duration // GcDuration is the duration between two gc operations. GcDuration time.Duration // NumberOfReplicas is the number of hash replicas. // Notice that it should equals to server. NumberOfReplicas int // MaxRetryTimes is the max retry times when something wrong happens. MaxRetryTimes int // UpdateCircleDuration is the duration between two circle updating operations. UpdateCircleDuration time.Duration }
Config is the type of config.
func DefaultConfig ¶ added in v0.2.0
func DefaultConfig() Config
DefaultConfig returns a default config.
type Status ¶
type Status struct { // Count records how many entries storing in kafo. Count int `json:"count"` // KeySize records the size of keys. KeySize int64 `json:"keySize"` // ValueSize records the size of value. ValueSize int64 `json:"valueSize"` }
Status is the status of kafo.
type TCPClient ¶
type TCPClient struct {
// contains filtered or unexported fields
}
TCPClient is the client of tcp Network.
func NewTCPClient ¶
NewTCPClient returns a new tcp client with given config and an error if failed.
Click to show internal directories.
Click to hide internal directories.