Documentation ¶
Index ¶
- type Logger
- type MemdClient
- type PingHelper
- func (ph *PingHelper) Count() int
- func (ph *PingHelper) Errors() int
- func (ph *PingHelper) Max() time.Duration
- func (ph *PingHelper) Mean() time.Duration
- func (ph *PingHelper) Min() time.Duration
- func (ph *PingHelper) StartOne() PingState
- func (ph *PingHelper) StopOne(state PingState, err error)
- func (ph *PingHelper) Successes() int
- type PingState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger provides aggregated logging
func (Logger) PrintSummary ¶
func (l Logger) PrintSummary()
PrintSummary prints a summary of the emitted logs
type MemdClient ¶
type MemdClient struct {
// contains filtered or unexported fields
}
MemdClient provides a memcached client
func Dial ¶
func Dial(host string, port int, bucket, user, pass string, tlsConfig *tls.Config) (*MemdClient, error)
Dial will dial a particular host and return a MemdClient
func (*MemdClient) GetConfig ¶
func (client *MemdClient) GetConfig() ([]byte, error)
GetConfig will fetch a config via CCCP
func (*MemdClient) Ping ¶
func (client *MemdClient) Ping() error
Ping will send a ping and wait for a response
type PingHelper ¶
type PingHelper struct {
// contains filtered or unexported fields
}
PingHelper provides a helper for the statistics of pinging
func (*PingHelper) Count ¶
func (ph *PingHelper) Count() int
Count returns the number of pings performed
func (*PingHelper) Errors ¶
func (ph *PingHelper) Errors() int
Errors returns the number of ping errors
func (*PingHelper) Max ¶
func (ph *PingHelper) Max() time.Duration
Max returns the maximum duration of a ping
func (*PingHelper) Mean ¶
func (ph *PingHelper) Mean() time.Duration
Mean returns the average duration of the pings
func (*PingHelper) Min ¶
func (ph *PingHelper) Min() time.Duration
Min returns the minimum duration of a ping
func (*PingHelper) StopOne ¶
func (ph *PingHelper) StopOne(state PingState, err error)
StopOne will stop a ping and add it to the statistics
func (*PingHelper) Successes ¶
func (ph *PingHelper) Successes() int
Successes returns the number of successful pings