Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Meta MetaConfig `yaml:"meta" json:"meta"` Listen map[string]ListenEntry `yaml:"listen" json:"listen"` Connect map[string]ConnectEntry `yaml:"connect" json:"connect"` }
Config represents the xconnect data section of a YAML document. See spec-xconnect.yaml.
type ConnectEntry ¶
type ConnectEntry struct { Scheme string `yaml:"scheme,omitempty" json:"scheme,omitempty"` TLS *bool `yaml:"tls,omitempty" json:"tls,omitempty"` Host string `yaml:"host,omitempty" json:"host,omitempty"` Port *int `yaml:"port,omitempty" json:"port,omitempty"` URL string `yaml:"url,omitempty" json:"url,omitempty"` Disabled bool `yaml:"disabled,omitempty" json:"disabled,omitempty"` ExtraFields map[string]interface{} `yaml:"-,inline"` }
ConnectEntry is a list element in the xconnect.connect config.
func (ConnectEntry) FindInt ¶ added in v0.4.0
func (e ConnectEntry) FindInt(path string) int
FindInt returns an int for a given path (using slashes).
func (ConnectEntry) FindString ¶ added in v0.4.0
func (e ConnectEntry) FindString(path string) string
FindString return a string for a give dotted path.
type Document ¶
type Document struct {
Config Config `yaml:"xconnect"`
}
Document is the root YAML element
type K8SConfiguration ¶
type K8SConfiguration struct { APIVersion string `yaml:"apiVersion"` Data map[string]interface{} `yaml:"data"` Kind string `yaml:"kind" ` Metadata struct { Name string `yaml:"name" ` Namespace string `yaml:"namespace"` CreationTimestamp time.Time `yaml:"creationTimestamp"` } `yaml:"metadata"` }
K8SConfiguration represents a Kubernetes configuration.
func (K8SConfiguration) ExtractConfig ¶
func (k K8SConfiguration) ExtractConfig() (x Config, err error)
ExtractConfig expects a "xconnect" key in the data map and parses that part into a xconnect.Config.
type ListenEntry ¶
type ListenEntry struct { Scheme string `yaml:"scheme,omitempty" json:"scheme,omitempty"` Host string `yaml:"host,omitempty" json:"host,omitempty"` Port *int `yaml:"port,omitempty" json:"port,omitempty"` TLS *bool `yaml:"tls,omitempty" json:"tls,omitempty"` Disabled bool `yaml:"disabled,omitempty" json:"disabled,omitempty"` ExtraFields map[string]interface{} `yaml:"-,inline"` }
ListenEntry is a list element in the xconnect.accept config.
func (ListenEntry) FindInt ¶ added in v0.4.0
func (e ListenEntry) FindInt(path string) int
FindInt returns an int for a given path (using slashes).
func (ListenEntry) FindString ¶ added in v0.4.0
func (e ListenEntry) FindString(path string) string
FindString return a string for a given path (using slashes).
type MetaConfig ¶
type MetaConfig struct { Name string `yaml:"name,omitempty" json:"name,omitempty"` Version string `yaml:"version,omitempty" json:"version,omitempty"` Owner string `yaml:"owner,omitempty" json:"owner,omitempty"` Labels []string `yaml:"labels,omitempty" json:"labels,omitempty"` ExtraFields map[string]interface{} `yaml:"-,inline"` }
MetaConfig represents the meta element in the xconnect data section.
func (MetaConfig) FindString ¶ added in v0.4.0
func (m MetaConfig) FindString(path string) string
FindString return a string for a given slash path.