Documentation ¶
Index ¶
- type Cache
- func (c *Cache) Add(p *points.Points)
- func (c *Cache) Confirm() chan *points.Points
- func (c *Cache) Dump(w io.Writer) error
- func (c *Cache) Get() *points.Points
- func (c *Cache) In() chan *points.Points
- func (c *Cache) Out() chan *points.Points
- func (c *Cache) Pop() *points.Points
- func (c *Cache) Query() chan *Query
- func (c *Cache) Remove(key string, size int)
- func (c *Cache) SetInputCapacity(size int)
- func (c *Cache) SetMaxSize(maxSize uint32)
- func (c *Cache) SetOutputChanSize(size int)
- func (c *Cache) SetWriteStrategy(s string) (err error)
- func (c *Cache) Size() uint32
- func (c *Cache) Start() error
- func (c *Cache) Stat(send helper.StatCallback)
- type CarbonlinkListener
- func (listener *CarbonlinkListener) Addr() net.Addr
- func (listener *CarbonlinkListener) HandleConnection(conn framing.Conn)
- func (listener *CarbonlinkListener) Listen(addr *net.TCPAddr) error
- func (listener *CarbonlinkListener) SetQueryTimeout(timeout time.Duration)
- func (listener *CarbonlinkListener) SetReadTimeout(timeout time.Duration)
- type CarbonlinkRequest
- type Query
- type WriteStrategy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
Cache stores and aggregate metrics in memory
func (*Cache) SetInputCapacity ¶
SetInputCapacity set buffer size of input channel. Call before In() getter
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
type CarbonlinkListener ¶
CarbonlinkListener receive cache Carbonlinkrequests from graphite-web
func NewCarbonlinkListener ¶
func NewCarbonlinkListener(queryChan chan *Query) *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) SetQueryTimeout ¶
func (listener *CarbonlinkListener) SetQueryTimeout(timeout time.Duration)
SetQueryTimeout for queries to cache
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 Query ¶
type Query struct { Metric string Wait chan bool // close after finish collect reply CacheData *points.Points // from cache InFlightData []*points.Points // from confirm tracker }
Query request from carbonlink
type WriteStrategy ¶ added in v0.8.0
type WriteStrategy int
const ( MaximumLength WriteStrategy = iota TimestampOrder Noop )