Documentation ¶
Index ¶
- type Datapoint
- type Route
- type Routes
- func (routes *Routes) Add(key, patt, addr string, spool, pickle bool, instrument *statsd.Client) error
- func (routes *Routes) Del(key string) error
- func (routes *Routes) Dispatch(buf []byte, first_only bool) (routed bool)
- func (routes *Routes) List() map[string]Route
- func (routes *Routes) Run() error
- func (routes *Routes) Update(key string, addr, patt *string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Route ¶
type Route struct { // basic properties in init and copy Key string // to identify in stats/logs Patt string // regex string Addr string // tcp dest Spool bool // spool metrics to disk while endpoint down? Pickle bool // send in pickle format? Online bool // state of connection online/offline // set automatically in init, passed on in copy Reg *regexp.Regexp // compiled version of patt // contains filtered or unexported fields }
func NewRoute ¶
func NewRoute(key, patt, addr, spoolDir string, spool, pickle bool, instrument *statsd.Client) (*Route, error)
after creating, run Run()!
Click to show internal directories.
Click to hide internal directories.