Documentation
¶
Overview ¶
Package relay contains the Relay application component that combines all of the internal components and implements HTTP endpoints.
This package is not in internal/ so that the exported Relay type can be used by external code to embed Relay functionality into a customized application. See docs/in-app.md.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientFactoryFunc ¶
ClientFactoryFunc is a function that can be used with NewRelay to specify custom behavior when Relay needs to create a Go SDK client instance.
type Relay ¶
Relay represents the overall Relay Proxy application.
It can also be referenced externally in order to embed Relay Proxy functionality into a customized application; see docs/in-app.md.
This type deliberately exports no methods other than ServeHTTP and Close. Everything else is an implementation detail which is subject to change.
func NewRelay ¶
func NewRelay(c config.Config, loggers ldlog.Loggers, clientFactory ClientFactoryFunc) (*Relay, error)
NewRelay creates a new Relay given a configuration and a method to create a client.
If any metrics exporters are enabled in c.MetricsConfig, it also registers those in OpenCensus.
The clientFactory parameter can be nil and is only needed if you want to customize how Relay creates the Go SDK client instance.