Documentation
¶
Overview ¶
ANSIC = "Mon Jan _2 15:04:05 2006"
Index ¶
- Constants
- func FormatDirective(s string) (v int, err error)
- func NewAnsiCProcessor() *processor
- func NewApacheNoTZProcessor() *processor
- func NewApacheProcessor() *processor
- func NewCustom1MilliProcessor() *processor
- func NewDPKGProcessor() *processor
- func NewNGINXProcessor() *processor
- func NewRFC1123Processor() *processor
- func NewRFC1123ZProcessor() *processor
- func NewRFC3339NanoProcessor() *processor
- func NewRFC3339Processor() *processor
- func NewRFC822Processor() *processor
- func NewRFC822ZProcessor() *processor
- func NewRFC850Processor() *processor
- func NewRubyProcessor() *processor
- func NewSyslogFileProcessor() *processor
- func NewSyslogFileProcessorTZ2() *processor
- func NewSyslogProcessor() *syslogProcessor
- func NewSyslogVariant() *processor
- func NewUnixMilliTimeProcessor() *unixProcessor
- func NewUnixProcessor() *processor
- func NewUnpaddedDateTime() *processor
- func NewZonelessRFC3339() *processor
- type Config
- type Processor
- type TimeGrinder
Constants ¶
View Source
const ( AnsiC int = iota Unix int = iota Ruby int = iota RFC822 int = iota RFC822Z int = iota RFC850 int = iota RFC1123 int = iota RFC1123Z int = iota RFC3339 int = iota RFC3339Nano int = iota Apache int = iota ApacheNoTz int = iota Syslog int = iota SyslogFile int = iota SyslogFileTZ int = iota DPKG int = iota Custom1Milli int = iota NGINX int = iota UnixMilli int = iota ZonelessRFC3339 int = iota SyslogVariant int = iota UnpaddedDateTime int = iota )
View Source
const ( DEFAULT_TIMEGRINDER_SIZE int = 16 APACHE_FORMAT string = `_2/Jan/2006:15:04:05 -0700` APACHE_NO_TZ_FORMAT string = `_2/Jan/2006:15:04:05` NGINX_FORMAT string = `2006/01/02 15:04:05` SYSLOG_FORMAT string = `Jan _2 15:04:05` SYSLOG_FILE_FORMAT string = `2006-01-02T15:04:05.999999999-07:00` SYSLOG_FILE_FORMAT_TZ2 string = `2006-01-02T15:04:05.999999999-0700` DPKG_MSG_FORMAT string = `2006-01-02 15:04:05` CUSTOM1_MILLI_MSG_FORMAT string = `01-02-2006 15:04:05.0` ZONELESS_RFC3339_FORMAT string = `2006-01-02T15:04:05.999999999` SYSLOG_VARIANT string = `Jan 02 2006 15:04:05` UNPADDED_DATE_TIME string = `2006-1-2 15:04:05` )
Variables ¶
This section is empty.
Functions ¶
func FormatDirective ¶
FormatDirective tkes a string and attempts to match it against a case insensitive format directive This function is useful in taking string designations for time formats, checking if they are valid and converting them to an iota int for overriding the timegrinder
func NewAnsiCProcessor ¶
func NewAnsiCProcessor() *processor
func NewApacheNoTZProcessor ¶
func NewApacheNoTZProcessor() *processor
func NewApacheProcessor ¶
func NewApacheProcessor() *processor
func NewCustom1MilliProcessor ¶
func NewCustom1MilliProcessor() *processor
func NewDPKGProcessor ¶
func NewDPKGProcessor() *processor
func NewNGINXProcessor ¶
func NewNGINXProcessor() *processor
func NewRFC1123Processor ¶
func NewRFC1123Processor() *processor
func NewRFC1123ZProcessor ¶
func NewRFC1123ZProcessor() *processor
func NewRFC3339NanoProcessor ¶
func NewRFC3339NanoProcessor() *processor
func NewRFC3339Processor ¶
func NewRFC3339Processor() *processor
func NewRFC822Processor ¶
func NewRFC822Processor() *processor
func NewRFC822ZProcessor ¶
func NewRFC822ZProcessor() *processor
func NewRFC850Processor ¶
func NewRFC850Processor() *processor
func NewRubyProcessor ¶
func NewRubyProcessor() *processor
func NewSyslogFileProcessor ¶
func NewSyslogFileProcessor() *processor
func NewSyslogFileProcessorTZ2 ¶
func NewSyslogFileProcessorTZ2() *processor
func NewSyslogProcessor ¶
func NewSyslogProcessor() *syslogProcessor
func NewSyslogVariant ¶
func NewSyslogVariant() *processor
func NewUnixMilliTimeProcessor ¶
func NewUnixMilliTimeProcessor() *unixProcessor
func NewUnixProcessor ¶
func NewUnixProcessor() *processor
func NewUnpaddedDateTime ¶
func NewUnpaddedDateTime() *processor
func NewZonelessRFC3339 ¶
func NewZonelessRFC3339() *processor
Types ¶
type Config ¶
type Config struct { //force TimeGrinder to scan all possible formats on first entry, seeding with left most //We assume that most streams are not going to using a bunch of different timestamps //so we take the hit on the first iteration to try to get the left most time format EnableLeftMostSeed bool FormatOverride int }
type TimeGrinder ¶
type TimeGrinder struct {
// contains filtered or unexported fields
}
func NewTimeGrinder ¶
func NewTimeGrinder(c Config) (*TimeGrinder, error)
NewTimeGrinder constructs and returns a new TimeGrinder object * On error, it will return a nil and error variable * The TimeGrinder object is completely safe for concurrent use.
func (*TimeGrinder) DebugExtract ¶
DebugExtract returns a time, offset, and error. If no time was extracted, the offset is -1
Error indicates a catastrophic failure.
func (*TimeGrinder) Extract ¶
Extract returns time and error. If no time can be extracted time is the zero
value and bool is false. Error indicates a catastrophic failure.
func (*TimeGrinder) SetLocalTime ¶
func (tg *TimeGrinder) SetLocalTime()
func (*TimeGrinder) SetUTC ¶
func (tg *TimeGrinder) SetUTC()
Click to show internal directories.
Click to hide internal directories.