Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler interface { IncrHit() IncrMiss() IncrLocalHit() IncrLocalMiss() IncrRemoteHit() IncrRemoteMiss() IncrQuery() IncrQueryFail(err error) }
Handler defines the interface that the Transport uses to collect cache metrics. Note that implementations of this interface must be thread-safe; the methods of a Handler can be called from concurrent goroutines.
func NewHandles ¶
NewHandles creates a new instance of Handlers.
func NewStatsLogger ¶
type Handlers ¶
type Handlers struct {
// contains filtered or unexported fields
}
func (*Handlers) IncrLocalHit ¶
func (hs *Handlers) IncrLocalHit()
func (*Handlers) IncrLocalMiss ¶
func (hs *Handlers) IncrLocalMiss()
func (*Handlers) IncrQueryFail ¶
func (*Handlers) IncrRemoteHit ¶
func (hs *Handlers) IncrRemoteHit()
func (*Handlers) IncrRemoteMiss ¶
func (hs *Handlers) IncrRemoteMiss()
type Option ¶
type Option func(o *Options)
Option defines the method to customize an Options.
func WithStatsInterval ¶
type Stats ¶
type Stats struct { Options Name string Hit uint64 Miss uint64 LocalHit uint64 LocalMiss uint64 RemoteHit uint64 RemoteMiss uint64 Query uint64 QueryFail uint64 }
func (*Stats) IncrLocalHit ¶
func (s *Stats) IncrLocalHit()
func (*Stats) IncrLocalMiss ¶
func (s *Stats) IncrLocalMiss()
func (*Stats) IncrQueryFail ¶
func (*Stats) IncrRemoteHit ¶
func (s *Stats) IncrRemoteHit()
func (*Stats) IncrRemoteMiss ¶
func (s *Stats) IncrRemoteMiss()
Click to show internal directories.
Click to hide internal directories.