Documentation ¶
Index ¶
- func Restart() error
- type SyslogConfig
- func (slConfig *SyslogConfig) CACertPath() string
- func (slConfig *SyslogConfig) ConfigFilePath() string
- func (slConfig *SyslogConfig) LogrotateConfFile() ([]byte, error)
- func (slConfig *SyslogConfig) LogrotateConfPath() string
- func (slConfig *SyslogConfig) LogrotateHelperFile() ([]byte, error)
- func (slConfig *SyslogConfig) LogrotateHelperPath() string
- func (slConfig *SyslogConfig) Render() ([]byte, error)
- func (slConfig *SyslogConfig) ServerCertPath() string
- func (slConfig *SyslogConfig) ServerKeyPath() string
- func (slConfig *SyslogConfig) Write() error
- type SyslogConfigRenderer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SyslogConfig ¶
type SyslogConfig struct { // the directory where the config file is written. ConfigDir string // the config file name. ConfigFileName string // the name of the log file to tail. LogFileName string // the name of the logrotate configuration file. LogrotateConfFileName string // the name of the script that executes the logrotate command. LogrotateHelperFileName string // the addresses of the state server to which messages should be forwarded. StateServerAddresses []string // CA certificate file name. CACertFileName string // Server certificate file name. ServerCertFileName string // Server private key file name. ServerKeyFileName string // the port number for the listener Port int // the directory for the logfiles LogDir string // namespace is used when there are multiple environments on one machine Namespace string // contains filtered or unexported fields }
SyslogConfig provides a means to configure and generate rsyslog conf files for the state server nodes and unit nodes. rsyslog is configured to tail the specified log file.
func NewAccumulateConfig ¶
func NewAccumulateConfig(logFile, logDir string, port int, namespace string, stateServerAddresses []string) *SyslogConfig
NewAccumulateConfig creates a SyslogConfig instance used to accumulate log entries from the various unit nodes.
func NewForwardConfig ¶
func NewForwardConfig(logFile, logDir string, port int, namespace string, stateServerAddresses []string) *SyslogConfig
NewForwardConfig creates a SyslogConfig instance used on unit nodes to forward log entries to the state server nodes.
func (*SyslogConfig) CACertPath ¶
func (slConfig *SyslogConfig) CACertPath() string
func (*SyslogConfig) ConfigFilePath ¶
func (slConfig *SyslogConfig) ConfigFilePath() string
func (*SyslogConfig) LogrotateConfFile ¶
func (slConfig *SyslogConfig) LogrotateConfFile() ([]byte, error)
LogrotateConfFile returns a ready to write to disk byte array of the logrotate.conf file.
func (*SyslogConfig) LogrotateConfPath ¶
func (slConfig *SyslogConfig) LogrotateConfPath() string
LogrotateConfPath returns the the the entire logrotate.conf path including filename.
func (*SyslogConfig) LogrotateHelperFile ¶
func (slConfig *SyslogConfig) LogrotateHelperFile() ([]byte, error)
LogrotateHelperFile returns a ready to write to disk byte array of the logrotate.helper file.
func (*SyslogConfig) LogrotateHelperPath ¶
func (slConfig *SyslogConfig) LogrotateHelperPath() string
LogrotateHelperPath returns the entire logrotate.helper path including filename.
func (*SyslogConfig) Render ¶
func (slConfig *SyslogConfig) Render() ([]byte, error)
Render generates the rsyslog config.
func (*SyslogConfig) ServerCertPath ¶
func (slConfig *SyslogConfig) ServerCertPath() string
func (*SyslogConfig) ServerKeyPath ¶
func (slConfig *SyslogConfig) ServerKeyPath() string
func (*SyslogConfig) Write ¶
func (slConfig *SyslogConfig) Write() error
Write generates and writes the rsyslog config.
type SyslogConfigRenderer ¶
SyslogConfigRenderer instances are used to generate a rsyslog conf file.