Documentation
¶
Overview ¶
Package config ...
This package reads the user configurations and if any details missed from the configurations default values are used
Index ¶
- type Configuration
- func (c *Configuration) GetApplicationName() string
- func (c *Configuration) GetDebugEnabled() bool
- func (c *Configuration) GetHostName() string
- func (c *Configuration) GetHostPort() int
- func (c *Configuration) GetInterval() int
- func (c *Configuration) GetLogPath() string
- func (c *Configuration) SetApplicationName(appName string)
- func (c *Configuration) SetDebugEnabled(debugEnabled bool)
- func (c *Configuration) SetHostName(hostName string)
- func (c *Configuration) SetHostPort(hostPort int)
- func (c *Configuration) SetInterval(interval int)
- func (c *Configuration) SetLogPath(logPath string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { AppName string HostName string HostPort int LogPath string DebugEnabled bool Interval int }
Configuration ... Contains all the details that the SDK uses and can be configured by the user in the file config.json AppName -- This is the application name that will be displayed in the EM/ATC, if this is not configured default name 'goProbe' will be taken HostName -- This is the IA HostName and this shoule be a valid one, if invalid error is logged and process exits HostPort -- This is the IA HostPort and this shoule ba valid one, if invalid error is logged and process exits LogPath -- A valid path that includes the filename(error.log), if invalid the log is redirected to standard output DebugEnabled -- true/false, this enable to write the debugging logs Interval -- This is the runtime interval to capture the runtime metrics by the SDK, if not configured default 120 seconds is used
func ReadConfig ¶
func ReadConfig() (Configuration, logger.Logger)
ReadConfig is used to read the configurations and sets the logger for the SDK
func (*Configuration) GetApplicationName ¶
func (c *Configuration) GetApplicationName() string
GetApplicationName function gets the AppName of the configuration
func (*Configuration) GetDebugEnabled ¶
func (c *Configuration) GetDebugEnabled() bool
GetDebugEnabled function gets the DebugEnabled of the configuration
func (*Configuration) GetHostName ¶
func (c *Configuration) GetHostName() string
GetHostName function gets the HostName of the configuration
func (*Configuration) GetHostPort ¶
func (c *Configuration) GetHostPort() int
GetHostPort function gets the HostPort of the configuration
func (*Configuration) GetInterval ¶
func (c *Configuration) GetInterval() int
GetInterval function gets the Interval of the configuration
func (*Configuration) GetLogPath ¶
func (c *Configuration) GetLogPath() string
GetLogPath function gets the LogPath of the configuration
func (*Configuration) SetApplicationName ¶
func (c *Configuration) SetApplicationName(appName string)
SetApplicationName function sets the AppName of the configuration
func (*Configuration) SetDebugEnabled ¶
func (c *Configuration) SetDebugEnabled(debugEnabled bool)
SetDebugEnabled function sets the DebugEnabled of the configuration
func (*Configuration) SetHostName ¶
func (c *Configuration) SetHostName(hostName string)
SetHostName function sets the HostName of the configuration
func (*Configuration) SetHostPort ¶
func (c *Configuration) SetHostPort(hostPort int)
SetHostPort function sets the HostPort of the configuration
func (*Configuration) SetInterval ¶
func (c *Configuration) SetInterval(interval int)
SetInterval function sets the Interval of the configuration
func (*Configuration) SetLogPath ¶
func (c *Configuration) SetLogPath(logPath string)
SetLogPath function sets the LogPath of the configuration