code: func NewEndpoint(name, url string, config EndpointConfig) *Endpoint {
  	var endpoint Endpoint
  	endpoint.name = name
  	endpoint.url = url
  	endpoint.EndpointConfig = config
  	endpoint.defaults()
  	endpoint.metrics = newSafeMetrics()
  
  	// Configures the inmemory queue, retry, http pipeline.
  	endpoint.Sink = newHTTPSink(
  		endpoint.url, endpoint.Timeout, endpoint.Headers,
  		endpoint.Transport, endpoint.metrics.httpStatusListener())
  	endpoint.Sink = newRetryingSink(endpoint.Sink, endpoint.Threshold, endpoint.Backoff)
  	endpoint.Sink = newEventQueue(endpoint.Sink, endpoint.metrics.eventQueueListener())
  	mediaTypes := append(config.Ignore.MediaTypes, config.IgnoredMediaTypes...)
  	endpoint.Sink = newIgnoredSink(endpoint.Sink, mediaTypes, config.Ignore.Actions)
  
  	register(&endpoint)
  	return &endpoint
  }
docs: // NewEndpoint returns a running endpoint, ready to receive events.