Documentation ¶
Overview ¶
introducer is a simple obfuscated proxy that points to an instance of the menshen API. The upstream API can be publicly available or not.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHTTPClientFromIntroducer ¶
func NewHTTPClientFromIntroducer(introducer *Introducer) (*http.Client, error)
NewHTTPClientFromIntroducer returns an http.Client that will use the passed introducer.
Types ¶
type CallbackTransport ¶
type CallbackTransport struct { OriginalTransport http.RoundTripper Callback func(*http.Response) }
CallbackTransport calls a callback function after a successful 200 OK response.
type Introducer ¶
Introducer has everything we need to instantiate a http.Client that dials to the obfuscated introducer.
func NewIntroducerFromURL ¶
func NewIntroducerFromURL(introducerURL string) (*Introducer, error)
NewIntroducerFromURL returns a new Introducer after parsing the passed URL. It will also return an error if it was not possible to parse the URL correctly.
func (*Introducer) URL ¶
func (i *Introducer) URL() string
URL produces the canonical URL for this introducer. We need to make sure to use this URL in the internal storage, so that we can ensure equality regardless of parameter order.
func (*Introducer) Validate ¶
func (i *Introducer) Validate() error
Validate returns true if all the fields in this Introducer are like expected.