Documentation ¶
Index ¶
- type Cache
- func (c *Cache) Add(p *points.Points)
- func (c *Cache) Confirm(p *points.Points)
- func (c *Cache) DivertToXlog(w io.Writer)
- func (c *Cache) Dump(w io.Writer) error
- func (c *Cache) Get(key string) []points.Point
- func (c *Cache) GetShard(key string) *Shard
- func (c *Cache) Len() int32
- func (c *Cache) Pop(key string) (p *points.Points, exists bool)
- func (c *Cache) PopNotConfirmed(key string) (p *points.Points, exists bool)
- func (c *Cache) SetMaxSize(maxSize uint32)
- func (c *Cache) SetWriteStrategy(s string) (err error)
- func (c *Cache) Size() int32
- func (c *Cache) Stat(send helper.StatCallback)
- func (c *Cache) Stop()
- func (c *Cache) WriteoutQueue() *WriteoutQueue
- type CarbonlinkListener
- type CarbonlinkRequest
- type Shard
- type WriteStrategy
- type WriteoutQueue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
A "thread" safe map of type string:Anything. To avoid lock bottlenecks this map is dived to several (shardCount) map shards.
func (*Cache) DivertToXlog ¶ added in v0.9.0
func (*Cache) PopNotConfirmed ¶ added in v0.9.0
func (*Cache) SetWriteStrategy ¶ added in v0.7.3
SetWriteStrategy ...
func (*Cache) Stat ¶ added in v0.8.0
func (c *Cache) Stat(send helper.StatCallback)
Collect cache metrics
func (*Cache) WriteoutQueue ¶ added in v0.9.0
func (c *Cache) WriteoutQueue() *WriteoutQueue
type CarbonlinkListener ¶
CarbonlinkListener receive cache Carbonlinkrequests from graphite-web
func NewCarbonlinkListener ¶
func NewCarbonlinkListener(cache *Cache) *CarbonlinkListener
NewCarbonlinkListener create new instance of CarbonlinkListener
func (*CarbonlinkListener) Addr ¶ added in v0.5.1
func (listener *CarbonlinkListener) Addr() net.Addr
Addr returns binded socket address. For bind port 0 in tests
func (*CarbonlinkListener) HandleConnection ¶ added in v0.8.0
func (listener *CarbonlinkListener) HandleConnection(conn framing.Conn)
func (*CarbonlinkListener) Listen ¶
func (listener *CarbonlinkListener) Listen(addr *net.TCPAddr) error
Listen bind port. Receive messages and send to out channel
func (*CarbonlinkListener) SetReadTimeout ¶
func (listener *CarbonlinkListener) SetReadTimeout(timeout time.Duration)
SetReadTimeout for read request from client
type CarbonlinkRequest ¶
CarbonlinkRequest ...
func NewCarbonlinkRequest ¶
func NewCarbonlinkRequest() *CarbonlinkRequest
NewCarbonlinkRequest creates instance of CarbonlinkRequest
func ParseCarbonlinkRequest ¶
func ParseCarbonlinkRequest(d []byte) (*CarbonlinkRequest, error)
ParseCarbonlinkRequest from pickle encoded data
type Shard ¶ added in v0.9.0
type Shard struct { sync.RWMutex // Read Write mutex, guards access to internal map. // contains filtered or unexported fields }
A "thread" safe string to anything map.
type WriteStrategy ¶ added in v0.8.0
type WriteStrategy int
const ( MaximumLength WriteStrategy = iota TimestampOrder Noop )
type WriteoutQueue ¶ added in v0.9.0
func NewWriteoutQueue ¶ added in v0.9.0
func NewWriteoutQueue(cache *Cache) *WriteoutQueue
func (*WriteoutQueue) Get ¶ added in v0.9.0
func (q *WriteoutQueue) Get(abort chan bool) *points.Points
func (*WriteoutQueue) GetNotConfirmed ¶ added in v0.9.0
func (q *WriteoutQueue) GetNotConfirmed(abort chan bool) *points.Points