Documentation ¶
Index ¶
Constants ¶
View Source
const ( // MaxPriority contains the maximum priority value that a RFC5424 syslog message can have. MaxPriority = uint8(191) // MaxVersion contains the maximum version value that a RFC5424 syslog message can have. MaxVersion = uint16(999) // MaxRFC3339MicroTimestamp contains the maximum length RFC3339MICRO timestamp that a RFC5424 syslog message can have. MaxRFC3339MicroTimestamp = "2018-12-31T23:59:59.999999-23:59" )
Variables ¶
View Source
var ( // MaxHostname is a maximum length hostname that a RFC5424 syslog message can have. MaxHostname = RandomBytes(255) // MaxAppname is a maximum length app-name that a RFC5424 syslog message can have. MaxAppname = RandomBytes(48) // MaxProcID is a maximum length app-name that a RFC5424 syslog message can have. MaxProcID = RandomBytes(128) // MaxMsgID is a maximum length app-name that a RFC5424 syslog message can have. MaxMsgID = RandomBytes(32) // MaxMessage is a maximum length message that a RFC5424 syslog message can contain when all other fields are at their maximum length. MaxMessage = RandomBytes(7681) )
Functions ¶
func RandomBytes ¶
RandomBytes returns a random byte slice with length n.
func RightPad ¶
RightPad pads a string with spaces until the given limit, or it cuts the string to the given limit.
func StringAddress ¶
StringAddress returns the address of the input string.
func TimeParse ¶
TimeParse parses a time string, for the given layout, into a pointer to a time.Time instance.
func Uint8Address ¶
Uint8Address returns the address of the input uint8.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.