Documentation ¶
Overview ¶
Package network handles the network config file.
Index ¶
Constants ¶
View Source
const DefaultPath = "/etc/tsp-controller/network"
Variables ¶
View Source
var ( // DefaultConfig is the default configuration, served in absence of the config file. DefaultConfig = defaultConfig() // DefaultRestrictions is the default resrict ruleset of Config. It is effective in absence // of ruleset in the config file, or in absence of the config file itself. In this mode, // controller's scope is maximal: it handles every declared host. DefaultRestrictions = []*Restriction{ {Host: regexp.MustCompile(".")}, } )
Functions ¶
This section is empty.
Types ¶
type Aggregator ¶
type Aggregator struct {
Host string `xml:"host,attr"`
}
Aggregator specifies the aggregator node, a node that exports the indirect site feed.
type Config ¶
type Config struct { // Network topology. Aggregator *Aggregator Subscriber []*Subscriber // contains filtered or unexported fields }
Config contains network configuration details.
func (*Config) UnmarshalXML ¶
type Restriction ¶
A Restriction is a rule used to reduce scope of the controller.
func (*Restriction) UnmarshalXML ¶
func (r *Restriction) UnmarshalXML(dec *xml.Decoder, start xml.StartElement) error
type Subscriber ¶
type Subscriber struct { ID string `xml:"id,attr"` Host string `xml:"host,attr"` Direct bool `xml:"direct,attr"` Dedup bool `xml:"dedup,attr"` }
Subscriber represents a consumer of the site feed. The feed arrives in the aggregated form (unless Direct is true), and without any pre-processing (unless Dedup is true).
Click to show internal directories.
Click to hide internal directories.