code: func CreateRiemannSink(uri *url.URL) (*RiemannSink, error) {
  	// Default configuration
  	c := RiemannConfig{
  		Host:      "riemann-heapster:5555",
  		Ttl:       60.0,
  		State:     "",
  		Tags:      make([]string, 0),
  		BatchSize: 1000,
  	}
  	// check host
  	if len(uri.Host) > 0 {
  		c.Host = uri.Host
  	}
  	options := uri.Query()
  	// check ttl
  	if len(options["ttl"]) > 0 {
  		var ttl, err = strconv.ParseFloat(options["ttl"][0], 32)
  		if err != nil {
  			return nil, err
  		}
  		c.Ttl = float32(ttl)
  	}
  	// check batch size
  	if len(options["batchsize"]) > 0 {
  		var batchSize, err = strconv.Atoi(options["batchsize"][0])
  		if err != nil {
  			return nil, err
  		}
  		c.BatchSize = batchSize
  	}
  	// check state
  	if len(options["state"]) > 0 {
  		c.State = options["state"][0]
  	}
  	// check tags
  	if len(options["tags"]) > 0 {
  		c.Tags = options["tags"]
  	} else {
  		c.Tags = []string{"heapster"}
  	}
  
  	glog.Infof("Riemann sink URI: '%+v', host: '%+v', options: '%+v', ", uri, c.Host, options)
  	rs := &RiemannSink{
  		Client: nil,
  		Config: c,
  	}
  	client, err := GetRiemannClient(rs.Config)
  	if err != nil {
  		glog.Warningf("Riemann sink not connected: %v", err)
  		// Warn but return the sink => the client in the sink can be nil
  	}
  	rs.Client = client
  
  	return rs, nil
  }
docs: // creates a Riemann sink. Returns a riemannSink