configclient

package
v0.0.0-...-30b4a77 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2016 License: BSD-3-Clause Imports: 12 Imported by: 0

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.

func (*Config) Update

func (c *Config) Update() error

Update a configuration structure.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL