Documentation ¶
Overview ¶
Package core contains core definitions for the transport package, the most salient of which is likely the Identity type. This type is used to build a Transport instance.
The TLS configurations provided here are designed for three scenarios: mutual authentication for a clients, mutual authentication for servers, and a general-purpose server configuration applicable where mutual authentication is not appropriate.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var CipherSuites = []uint16{
0xc030,
0xc02c,
0xc02f,
0xc02b,
}
CipherSuites are the TLS cipher suites that should be used by CloudFlare programs.
var DefaultBefore = 24 * time.Hour
DefaultBefore is a sensible default; attempt to regenerate certificates the day before they expire.
var DefaultInterval = 5 * time.Minute
DefaultInterval is used when a Backoff is initialised with a zero-value Interval.
var DefaultMaxDuration = 6 * time.Hour
DefaultMaxDuration is maximum amount of time that the backoff will delay for.
Functions ¶
This section is empty.
Types ¶
type Backoff ¶
type Backoff struct { // MaxDuration is the largest possible duration that can be // returned from a call to Duration. MaxDuration time.Duration // Interval controls the time step for backing off. Interval time.Duration // Jitter controls whether to use the "Full Jitter" // improvement to attempt to smooth out spikes in a high // contention scenario. Jitter bool // contains filtered or unexported fields }
A Backoff contains the information needed to intelligently backoff and retry operations using an exponential backoff algorithm. It may be initialised with all zero values and it will behave sanely.
type Identity ¶
type Identity struct { // Request contains metadata for constructing certificate requests. Request *csr.CertificateRequest `json:"request"` // Roots contains a list of sources for trusted roots. Roots []*Root `json:"roots"` // ClientRoots contains a list of sources for trusted client // certificates. ClientRoots []*Root `json:"client_roots"` // Profiles contains a dictionary of names to dictionaries; // this is intended to allow flexibility in supporting // multiple configurations. Profiles map[string]map[string]string `json:"profiles"` }
Identity is used to store information about a particular transport.