Documentation ¶
Index ¶
- func Restart() error
- type SyslogConfig
- func (slConfig *SyslogConfig) CACertPath() string
- func (slConfig *SyslogConfig) ConfigFilePath() 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 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) *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) 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.
Click to show internal directories.
Click to hide internal directories.