Documentation ¶
Index ¶
- type Cluster
- type SMetric
- type Server
- type Servermetrics
- type VoldemortConn
- func (conn *VoldemortConn) Close()
- func (conn *VoldemortConn) Do(input []byte) (output []byte, err error)
- func (conn *VoldemortConn) Get(store string, key string) (value string, err error)
- func (vc *VoldemortConn) Metrics() (reg metrics.Registry)
- func (conn *VoldemortConn) Put(store string, key string, value string) (b bool, err error)
- func (vc *VoldemortConn) Server() (name string)
- type VoldemortPool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct { // Name of Voldemort cluster Name string `xml:"name"` // Array of Voldemort servers Servers []Server `xml:"server"` }
The cluster struct holds all the information taken from the Voldemort cluster when it's first connected
type Server ¶
type Server struct { Id int `xml:"id"` Host string `xml:"host"` Http int `xml:"http-port"` Socket int `xml:"socket-port"` Partitions string `xml:"partitions"` State bool }
The server struct holds all the information about a Voldermort server
type Servermetrics ¶
type Servermetrics struct {
Servers []*SMetric
}
type VoldemortConn ¶
type VoldemortConn struct { GetMetrics metrics.Timer PutMetrics metrics.Timer // contains filtered or unexported fields }
The VoldemortConn struct is used to hold all the data for the Voldemort cluster you need to query
func Dial ¶
func Dial(raddr *net.TCPAddr, proto string, reg metrics.Registry) (c *VoldemortConn, err error)
Returns a VoldemortConn that can be used to talk to a Voldemort cluster
func (*VoldemortConn) Close ¶
func (conn *VoldemortConn) Close()
func (*VoldemortConn) Do ¶
func (conn *VoldemortConn) Do(input []byte) (output []byte, err error)
creates the voldemort request <4 byte length, big endian encoded><message bytes> and receives the same
func (*VoldemortConn) Get ¶
func (conn *VoldemortConn) Get(store string, key string) (value string, err error)
Nice getter for a string key returning a string value
func (*VoldemortConn) Metrics ¶
func (vc *VoldemortConn) Metrics() (reg metrics.Registry)
func (*VoldemortConn) Server ¶
func (vc *VoldemortConn) Server() (name string)
type VoldemortPool ¶
type VoldemortPool struct { Metrics metrics.Registry // contains filtered or unexported fields }
func (*VoldemortPool) Empty ¶
func (vp *VoldemortPool) Empty()
func (*VoldemortPool) GetConn ¶
func (vp *VoldemortPool) GetConn() (vc *VoldemortConn, err error)
Get a VoldemortConn struct from the channel and return it
func (*VoldemortPool) Metricdata ¶
func (vp *VoldemortPool) Metricdata() (Ss *Servermetrics)
func (*VoldemortPool) ReleaseConn ¶
func (vp *VoldemortPool) ReleaseConn(vc *VoldemortConn, state bool)
Click to show internal directories.
Click to hide internal directories.