Documentation
¶
Index ¶
- Constants
- func AddParm(loc interface{}, defaultValue interface{}, parmType int, cliName string, ...)
- func AsBool(s string, def bool) bool
- func CopyDeprecatedParmIfNotSetBool(section string, name string, val bool) bool
- func CopyDeprecatedParmIfNotSetStr(section string, name string, val string) string
- func CopyDeprecatedParmIfNotSetStrArray(section string, name string, val []string) string
- func CopyParmIfNotSetBool(section string, name string, val bool) bool
- func CopyParmIfNotSetInt(section string, name string, val int) int
- func CopyParmIfNotSetStr(section string, name string, val string) string
- func CopyParmIfNotSetStrArray(section string, name string, val []string) string
- func CopyYamlConfig(cm *Config, cyg ConfigYGlobal, cyc ConfigYConnection, cyo ConfigYObjects, ...)
- func GetPasswordFromFile(file string, removeFile bool) (string, error)
- func GetPasswordFromStdin(prompt string) string
- func InitConfig(cm *Config)
- func InitLog(cm Config)
- func MqGolangVersion() string
- func ParseParms() error
- func PrintInfo(title string, stamp string, commit string, buildPlatform string)
- func ReadConfigFile(f string, cmy interface{}) error
- func VerifyConfig(cm *Config, fullCf interface{}) error
- type Config
- type ConfigMoved
- type ConfigParm
- type ConfigYConnection
- type ConfigYFilters
- type ConfigYGlobal
- type ConfigYObjects
Constants ¶
const ( CP_STR = 0 CP_INT = 1 CP_BOOL = 2 )
Variables ¶
This section is empty.
Functions ¶
func AsBool ¶ added in v5.5.4
The Go YAML parsing is not what you might expect for booleans - you are apparently unable to set a default of "true" for missing fields. So we read it as a string and parse that. The caller also sends in the default value if the string cannot be decoded.
func CopyDeprecatedParmIfNotSetBool ¶ added in v5.3.0
func CopyDeprecatedParmIfNotSetStr ¶ added in v5.3.0
func CopyDeprecatedParmIfNotSetStrArray ¶ added in v5.3.0
func CopyParmIfNotSetBool ¶ added in v5.2.0
If the parameter has already been set by env var or cli, then the value in the main config structure is returned. Otherwise the value passed as the "val" parameter - from the YAML version of the configuration elements - is returned
func CopyParmIfNotSetInt ¶ added in v5.2.0
func CopyParmIfNotSetStr ¶ added in v5.2.0
func CopyParmIfNotSetStrArray ¶ added in v5.2.0
func CopyYamlConfig ¶
func CopyYamlConfig(cm *Config, cyg ConfigYGlobal, cyc ConfigYConnection, cyo ConfigYObjects, cyf ConfigYFilters)
This handles the configuration parameters that are common to all the collectors. The individual collectors call similar code for their own specific attributes
func GetPasswordFromStdin ¶
func InitConfig ¶
func InitConfig(cm *Config)
func MqGolangVersion ¶ added in v5.5.0
func MqGolangVersion() string
func ParseParms ¶ added in v5.2.0
func ParseParms() error
func ReadConfigFile ¶
func VerifyConfig ¶
Types ¶
type Config ¶
type Config struct {
ConfigFile string
QMgrName string
ReplyQ string
ReplyQ2 string
MetaPrefix string
TZOffsetString string
Locale string
MonitoredQueues string
MonitoredQueuesFile string
MonitoredChannels string
MonitoredChannelsFile string
MonitoredAMQPChannels string
MonitoredAMQPChannelsFile string
MonitoredMQTTChannels string
MonitoredMQTTChannelsFile string
MonitoredTopics string
MonitoredTopicsFile string
MonitoredSubscriptions string
MonitoredSubscriptionsFile string
QueueSubscriptionSelector string
MetadataTagsArray []string
MetadataValuesArray []string
LogLevel string
PollIntervalDuration time.Duration
RediscoverDuration time.Duration
// Might be mounted into a container
PasswordFile string
CC mqmetric.ConnectionConfig
// contains filtered or unexported fields
}
Configuration attributes shared by all the monitor sample programs
type ConfigMoved ¶ added in v5.3.0
type ConfigParm ¶ added in v5.2.0
type ConfigParm struct {
// contains filtered or unexported fields
}
type ConfigYConnection ¶
type ConfigYConnection struct {
QueueManager string `yaml:"queueManager"`
User string
Client string `yaml:"clientConnection" default:"false"`
Password string
PasswordFile string `yaml:"passwordFile"`
ReplyQueue string `yaml:"replyQueue" `
ReplyQueue2 string `yaml:"replyQueue2"`
DurableSubPrefix string `yaml:"durableSubPrefix"`
CcdtUrl string `yaml:"ccdtUrl"`
ConnName string `yaml:"connName"`
Channel string `yaml:"channel"`
WaitInterval string `yaml:"waitInterval"`
MetadataTags []string `yaml:"metadataTags"`
MetadataValues []string `yaml:"metadataValues"`
MetadataMap map[string]string `yaml:"metadataMap"`
}
type ConfigYFilters ¶ added in v5.3.0
type ConfigYFilters struct {
HideSvrConnJobname string `yaml:"hideSvrConnJobname" default:"false"`
HideAMQPClientId string `yaml:"hideAMQPClientId" default:"false"`
HideMQTTClientId string `yaml:"hideMQTTClientId" default:"false"`
ShowInactiveChannels string `yaml:"showInactiveChannels" default:"false"`
ShowCustomAttribute string `yaml:"showCustomAttribute" default:"false"`
QueueSubscriptionSelector []string `yaml:"queueSubscriptionSelector"`
}
type ConfigYGlobal ¶
type ConfigYGlobal struct {
UseObjectStatus string `yaml:"useObjectStatus" default:"true"`
UseResetQStats string `yaml:"useResetQStats" default:"false"`
UsePublications string `yaml:"usePublications" default:"true"`
LogLevel string `yaml:"logLevel"`
MetaPrefix string
PollInterval string `yaml:"pollInterval"`
RediscoverInterval string `yaml:"rediscoverInterval"`
TZOffset string `yaml:"tzOffset"`
Locale string
}
type ConfigYObjects ¶
type ConfigYObjects struct {
Queues []string
Channels []string
AMQPChannels []string `yaml:"amqpChannels"`
MQTTChannels []string `yaml:"mqttChannels"`
Topics []string
Subscriptions []string
// These are left here for now so they can be recognised but will cause an error because the
// real values have moved
QueueSubscriptionSelector []string `yaml:"queueSubscriptionSelector"`
ShowInactiveChannels string `yaml:"showInactiveChannels" default:"false"`
}