Documentation
¶
Index ¶
- Constants
- Variables
- func ClusterConfigFile() string
- func CollectorSentDir() string
- func CreateMandatoryDirectories() error
- func DNSUDSDir() string
- func DNSUDSFile() string
- func Load(env map[string]string)
- func NodeConfigFile() string
- func NodeVarDir() string
- func ReloadForTest(rootPath string) func()
- type AgentPaths
- type T
Constants ¶
View Source
const (
// Program is the name of the project and module
Program = "opensvc"
)
Variables ¶
View Source
var ( Colorize *palette.ColorPaletteFunc Color *palette.ColorPalette Paths AgentPaths )
View Source
var ( RegexpScope = regexp.MustCompile(`(@[\w.-_]+)`) RegexpReference = regexp.MustCompile(`({[\w#.-_:]+})`) )
Functions ¶
func ClusterConfigFile ¶
func ClusterConfigFile() string
func CollectorSentDir ¶
func CollectorSentDir() string
func CreateMandatoryDirectories ¶
func CreateMandatoryDirectories() error
func DNSUDSFile ¶
func DNSUDSFile() string
func NodeConfigFile ¶
func NodeConfigFile() string
func NodeVarDir ¶
func NodeVarDir() string
func ReloadForTest ¶
func ReloadForTest(rootPath string) func()
ReloadForTest can be used during tests to force a reload of config after root path populated cleanup function is returned to reset rawconfig from default.
Usage example:
func TestSomething(t *testing.T) {
env := testhelper.Setup(t)
env.InstallFile("../../testdata/cluster.conf", "etc/cluster.conf")
defer rawconfig.ReloadForTest(env.Root)()
...
Types ¶
type AgentPaths ¶
type AgentPaths struct {
Python string `mapstructure:"python"`
Root string `mapstructure:"root"`
Bin string `mapstructure:"bin"`
Var string `mapstructure:"var"`
VarNs string `mapstructure:"varns"`
Lock string `mapstructure:"lock"`
Lsnr string `mapstructure:"lsnr"`
Cache string `mapstructure:"cache"`
Certs string `mapstructure:"certs"`
CACRL string `mapstructure:"cacrl"`
Log string `mapstructure:"log"`
LogNs string `mapstructure:"logns"`
Etc string `mapstructure:"etc"`
EtcNs string `mapstructure:"etcns"`
LastShutdown string `mapstructure:"last_shutdown"`
Capabilities string `mapstructure:"capabilities"`
Run string `mapstructure:"run"`
Tmp string `mapstructure:"tmp"`
TmpNs string `mapstructure:"tmpns"`
Doc string `mapstructure:"doc"`
HTML string `mapstructure:"html"`
Drivers string `mapstructure:"drivers"`
Compliance string `mapstructure:"compliance"`
Backup string `mapstructure:"varbck"`
}
AgentPaths abstracts all paths of the agent file organisation
type T ¶
type T struct {
Data *orderedmap.OrderedMap
}
func (T) MarshalJSON ¶
MarshalJSON marshals the enum as a quoted json string
func (*T) UnmarshalJSON ¶
UnmarshalJSON unmarshals a quoted json string to the enum value
Click to show internal directories.
Click to hide internal directories.