code: func appendEvent(events []riemanngo.Event, sink *RiemannSink, host, name string, value interface{}, labels map[string]string, timestamp int64) []riemanngo.Event {
  	event := riemanngo.Event{
  		Time:        timestamp,
  		Service:     name,
  		Host:        host,
  		Description: "",
  		Attributes:  labels,
  		Metric:      value,
  		Ttl:         sink.config.Ttl,
  		State:       sink.config.State,
  		Tags:        sink.config.Tags,
  	}
  	// state everywhere
  	events = append(events, event)
  	if len(events) >= sink.config.BatchSize {
  		err := riemannCommon.SendData(sink.client, events)
  		if err != nil {
  			glog.Warningf("Error sending events to Riemann: %v", err)
  			// client will reconnect later
  			sink.client = nil
  		}
  		events = nil
  	}
  	return events
  }
docs: // Receives a list of riemanngo.Event, the sink, and parameters.
  // Creates a new event using the parameters and the sink config, and add it into the Event list.
  // Can send events if events is full
  // Return the list.