Documentation ¶
Overview ¶
Package configclient implements a configuration fetcher.
Index ¶
Constants ¶
View Source
const MaxReadBody = 1048576
MaxReadBody is the maximum size of the body that is transferred.
Variables ¶
View Source
var ( // ErrHashWrong is returned if the cacert could not be verified. ErrHashWrong = errors.New("configclient: CACert hash wrong") // ErrNoServers is returned if no valid servers were configured. ErrNoServers = errors.New("configclient: no available servers") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { PublicKey []byte // Public key of configd. Decoded/binary URLList string // The list of the configd urls. "10,www.google.com:3912;20,8.8.8.8:80;10,irl.com:1020" CACert []byte // The current CACert, if any. Will always be set after config update Map map[string]string // The configuration map. If set it will be overwritten LastSignDate uint64 // The last signdate, will be updated Timeout int64 // Timeout, can be zero (will be set to 30) // contains filtered or unexported fields }
Config contains configuration data for the config call, and it's result.
Directories ¶
Path | Synopsis |
---|---|
Package cahash verifies a pem-encoded certificate and returns the hash
|
Package cahash verifies a pem-encoded certificate and returns the hash |
Package roundrobin implements the round-robin server selection used in the configclient package.
|
Package roundrobin implements the round-robin server selection used in the configclient package. |
Package sortedmap implements sorted and signed maps.
|
Package sortedmap implements sorted and signed maps. |
Click to show internal directories.
Click to hide internal directories.