host_rule_conf

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HostTableConfCheck

func HostTableConfCheck(conf HostTableConf) error

HostTableConfCheck check HostTableConf config

Types

type Host2HostTag

type Host2HostTag map[string]string // hostname => host-tag

type HostConf

type HostConf struct {
	Version        string          // version of the config
	DefaultProduct string          // default product
	HostMap        Host2HostTag    // hostname => host-tag
	HostTagMap     HostTag2Product // host-tag => product
}

func HostRuleConfLoad

func HostRuleConfLoad(filename string) (HostConf, error)

HostRuleConfLoad loads config of host table from file.

type HostTableConf

type HostTableConf struct {
	Version        *string           // version of the config
	DefaultProduct *string           // default product
	Hosts          *HostTagToHost    // host-tag => hosts
	HostTags       *ProductToHostTag // product => host-tags
}

func (*HostTableConf) LoadAndCheck

func (conf *HostTableConf) LoadAndCheck(filename string) (string, error)

type HostTag2Product

type HostTag2Product map[string]string // host-tag => product

type HostTagList

type HostTagList []string // list of host-tag

type HostTagToHost

type HostTagToHost map[string]*HostnameList // host-tag => hosts

type HostnameList

type HostnameList []string // list of hostname

type ProductToHostTag

type ProductToHostTag map[string]*HostTagList // product => host-tags

Jump to

Keyboard shortcuts

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