// create a new Graphite struct and connect to the underlying connection.
// If the connection isn't immediately successful, we timeout, we sleep, and we retry.
// if we are underbale to connect after 5 attempts, we panic.
create a new Graphite struct and connect to the underlying connection.
If the connection isn't immediately successful, we timeout, we sleep, and we retry.
if we are underbale to connect after 5 attempts, we panic.
// create a new Graphite struct and connect to the underlying connection . // If the connection isn ' t immediately successful we timeout we sleep and we retry . // if we are underbale to connect after 5 attempts we panic .
func NewGraphite(proto, endpoint string) *Graphite {
	g := &Graphite{
		proto:          proto,
		endpoint:       endpoint,
		ch:             make(chan Metric),
		connectTimeout: 5 * time.Second}
	g.getConnection()
	go g.sender()
	return g
}
func NewGraphite ( proto , endpoint string ) * Graphite { g := & Graphite { proto : proto , endpoint : endpoint , ch : make ( chan Metric ) , connectTimeout : 5 * time . Second } g . getConnection ( ) go g . sender ( ) return g }
create a new Graphite struct and connect to the underlying connection.
create a new Graphite struct and connect to the underlying connection .