Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateSyslog ¶
Types ¶
type Params ¶
type Params struct {
// If TimeLayout is empty, "Jan _2 15:04:05" will be used.
TimeLayout string
StartTime time.Time
SecondLogTime time.Time
// LogBasename is a name like "mylog", can be "/path/to/mylog" as well.
// The first (older) log will have the ".1" appended to it.
LogBasename string
// NumLogs specifies the max amount of logs to generate. If 0, we never stop
// generating logs, and once caught up with the current time (time.Now()), it
// switches to the real-time mode and continues there forever, waiting for
// appropriate durations before printing every line.
NumLogs int
MinDelayMS int
MaxDelayMS int
RandomSeed int
// SkipIfPrevLogSizeIs and SkipIfLastLogSizeIs are an optimization:
// if the log files already exist and are of these exact sizes, don't
// generate anything.
SkipIfPrevLogSizeIs int64
SkipIfLastLogSizeIs int64
Spikes []Spike
}
type Spike ¶
type Spike struct {
StartTime time.Time
// All of SyslogParts fields are optional; what is not specified, will be random
SyslogParts SyslogParts
Phases []SpikePhase
}
type SpikePhase ¶
Click to show internal directories.
Click to hide internal directories.