func RequireCollectorUri(collectorUri string) func(e *Emitter) {
	return func(e *Emitter) { e.CollectorUri = collectorUri }
}
--- Require
RequireCollectorUri sets the Emitters collector URI.
package tracker
import (
	"bytes"
	"errors"
	"fmt"
	"io"
	"io/ioutil"
	"log"
	"net/http"
	"net/url"
	"time"
)
const (
	DEFAULT_REQ_TYPE        = "POST"
	DEFAULT_PROTOCOL        = "http"
	DEFAULT_SEND_LIMIT      = 500
	DEFAULT_BYTE_LIMIT_GET  = 40000
	DEFAULT_BYTE_LIMIT_POST = 40000
	DEFAULT_DB_NAME         = "events.db"
	POST_WRAPPER_BYTES      = 88  
	POST_STM_BYTES          = 22  
)
type SendResult struct {
	ids    []int
	status int
}
type CallbackResult struct {
	Count  int
	Status int
}
type Emitter struct {
	CollectorUri  string
	CollectorUrl  url.URL
	RequestType   string
	Protocol      string
	SendLimit     int
	ByteLimitGet  int
	ByteLimitPost int
	DbName        string
	Storage       Storage
	SendChannel   chan bool
	Callback      func(successCount []CallbackResult, failureCount []CallbackResult)
	HttpClient    *http.Client
}
func InitEmitter(options ...func(*Emitter)) *Emitter {
	e := &Emitter{}
	e.RequestType = DEFAULT_REQ_TYPE
	e.Protocol = DEFAULT_PROTOCOL
	e.SendLimit = DEFAULT_SEND_LIMIT
	e.ByteLimitGet = DEFAULT_BYTE_LIMIT_GET
	e.ByteLimitPost = DEFAULT_BYTE_LIMIT_POST
	e.DbName = DEFAULT_DB_NAME
	for _, op := range options {
		op(e)
	}
	if e.CollectorUri == "" {
		panic("FATAL: CollectorUri cannot be empty.")
	} else {
		collectorUrl, err := returnCollectorUrl(e.RequestType, e.Protocol, e.CollectorUri)
		if err != nil {
			panic(err.Error())
		} else {
			e.CollectorUrl = *collectorUrl
		}
	}
	if e.Storage == nil {
		e.Storage = *InitStorageSQLite3(e.DbName)
	}
	if e.HttpClient == nil {
		defaultRoundTripper := http.DefaultTransport
		defaultTransportPointer, ok := defaultRoundTripper.(*http.Transport)
		if !ok {
			panic(fmt.Sprintf("defaultRoundTripper not an *http.Transport"))
		}
		defaultTransport := *defaultTransportPointer
		defaultTransport.MaxIdleConns = 100
		defaultTransport.MaxIdleConnsPerHost = 100
		timeout := time.Duration(5 * time.Second)
		e.HttpClient = &http.Client{
			Timeout:   timeout,
			Transport: &defaultTransport,
		}
	}
	return e
}