Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OutputMetricsIfRequired ¶
OutputMetricsIfRequired will send metrics to Graphite if a non-empty graphiteTCPAddress is passed in, or to the standard log if logMetrics is true. Make sure a sensible graphitePrefix that will uniquely identify your service is passed in, e.g. "content.test.people.rw.neo4j.ftaps58938-law1a-eu-t
func RunServer ¶
func RunServer(services map[string]Service, healthHandler func(http.ResponseWriter, *http.Request), port int, serviceName string, env string)
RunServer will set up GET, PUT and DELETE endpoints for the specified path, calling the appropriate service functions: PUT -> Write GET -> Read DELETE -> Delete It will also setup the healthcheck and ping endpoints Endpoints are wrapped in a metrics timer and request loggin including transactionID, which is generated if not found on the request as X-Request-Id header
func RunServerWithConf ¶
func RunServerWithConf(conf RWConf)