Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler handling connection data and shift it to lineChan channel
func NewConnectionsHandler ¶
NewConnectionsHandler creates new Handler
func (*Handler) HandleConnection ¶
HandleConnection convert every line from connection to metric and send it to lineChan channel
func (*Handler) StopHandlingConnections ¶
func (handler *Handler) StopHandlingConnections()
StopHandlingConnections closes all open connections and wait for handling remaining metrics
type MetricsListener ¶
type MetricsListener struct {
// contains filtered or unexported fields
}
MetricsListener is facade for standard net.MetricsListener and accept connection for handling it
func NewListener ¶
func NewListener(port string, logger moira.Logger, metrics *graphite.FilterMetrics) (*MetricsListener, error)
NewListener creates new listener
func (*MetricsListener) Listen ¶
func (listener *MetricsListener) Listen() chan []byte
Listen waits for new data in connection and handles it in ConnectionHandler All handled data sets to lineChan
func (*MetricsListener) Stop ¶
func (listener *MetricsListener) Stop() error
Stop stops listening connection
Click to show internal directories.
Click to hide internal directories.