Documentation ¶
Index ¶
- Constants
- Variables
- func ToDisk(filename string, dumperFunc DumperFunc) error
- type Config
- func (c *Config) AddPeer(peer *Peer)
- func (c *Config) Chain() *hashchain.Chain
- func (c *Config) CopyFrom(newConfig *Config)
- func (c *Config) FindPeer(name string) (*Peer, error)
- func (c *Config) FromDisk(filename string, loaderFunc LoaderFunc) (*Config, error)
- func (c *Config) GetPublisher() *Peer
- func (c *Config) Reload() error
- func (c *Config) ReloadChan() <-chan struct{}
- func (c *Config) RemovePeer(peer *Peer)
- func (c *Config) Save() error
- func (c *Config) SaveJSON(w io.Writer) error
- func (c *Config) SaveYAML(w io.Writer) error
- func (c *Config) SetChain(chain *hashchain.Chain)
- func (c *Config) SetPeers(peers []*Peer)
- func (c *Config) SetPublisher(publisher *Peer)
- type DumperFunc
- type ListenConfig
- type LoaderFunc
- type Peer
- type Record
- type Zone
Constants ¶
View Source
const RecordTag = "record"
Variables ¶
View Source
var ( ErrDump = errors.New("while dumping configuration to disk") ErrLoad = errors.New("while loading configuration from disk") ErrPeerNotFound = errors.New("peer not found") )
View Source
var ( FileMutex sync.RWMutex EditMutex sync.RWMutex )
View Source
var HashFunc = sha512.New
Functions ¶
func ToDisk ¶
func ToDisk(filename string, dumperFunc DumperFunc) error
Types ¶
type Config ¶
type Config struct { FilenamePrefix string `json:"-"` // prefix of filename to save to and read from Publisher *Peer `json:"-"` ShutdownWait time.Duration `json:"shutdown_wait"` AuthKey *jose.JSONWebKey `json:"auth_key"` Listen ListenConfig `json:"listen"` Peers []*Peer `json:"peers"` Zones map[string]*Zone `json:"zones"` // contains filtered or unexported fields }
func (*Config) FromDisk ¶
func (c *Config) FromDisk(filename string, loaderFunc LoaderFunc) (*Config, error)
func (*Config) GetPublisher ¶
func (*Config) ReloadChan ¶
func (c *Config) ReloadChan() <-chan struct{}
func (*Config) RemovePeer ¶
func (*Config) SetPublisher ¶
type DumperFunc ¶
type ListenConfig ¶
type Peer ¶
Click to show internal directories.
Click to hide internal directories.