syslog

package
v0.0.0-...-f19ae85 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2015 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Restart

func Restart() error

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

type SyslogConfigRenderer interface {
	Render() ([]byte, error)
}

SyslogConfigRenderer instances are used to generate a rsyslog conf file.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL