Documentation
¶
Index ¶
Constants ¶
View Source
const ( KlogRegex = `\d{4} \d{2}:\d{2}:\d{2}.\d{6}` EtcdRegex = `^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{6}` RancherRegex = `^\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2}` JournaldRegex = `^[A-Z][a-z]{2} \d{1,2} \d{2}:\d{2}:\d{2}` RancherLayout = "2006/01/02 15:05:05" KlogLayout = "0102 15:04:05.999999 MST 2006" JournaldLayout = "Jan 02 15:04:05 MST 2006" )
View Source
const ( EtcdTimestampRegex = `^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{6}` EtcdTimestampLayout = "2006-01-02 15:04:05.999999Z07:00" RFC3339Milli = "2006-01-02T15:04:05.999Z07:00" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComponentInput ¶
type DateParser ¶
type DateZoneParser ¶
type DateZoneParser struct {
// contains filtered or unexported fields
}
func NewDateZoneParser ¶
func NewDateZoneParser(timezone string, year string, datetimeRegex string, layout string) *DateZoneParser
func (*DateZoneParser) ParseTimestamp ¶
type Dateformat ¶ added in v0.1.2
type DefaultParser ¶ added in v0.1.2
type DefaultParser struct {
TimestampRegex string
}
func (*DefaultParser) ParseTimestamp ¶ added in v0.1.2
type EtcdJSONLog ¶
type LogMessage ¶
type LogMessage struct { Timestamp time.Time `json:"timestamp,omitempty"` Time time.Time `json:"time,omitempty"` Log string `json:"log,omitempty"` Agent string `json:"agent,omitempty"` LogType LogType `json:"log_type"` Component string `json:"kubernetes_component,omitempty"` ClusterID string `json:"cluster_id,omitempty"` NodeName string `json:"node_name,omitempty"` }
type MultipleParser ¶ added in v0.1.2
type MultipleParser struct { Dateformats []Dateformat StripLeadingDate bool }
func (*MultipleParser) ParseTimestamp ¶ added in v0.1.2
type OpensearchConfig ¶ added in v0.1.2
type OpensearchInput ¶ added in v0.1.2
type OpensearchInput struct { *opensearch.Client // contains filtered or unexported fields }
func NewOpensearchInput ¶ added in v0.1.2
func NewOpensearchInput( ctx context.Context, opensearchURL string, username string, password string, config OpensearchConfig, ) (*OpensearchInput, error)
func (*OpensearchInput) ComponentName ¶ added in v0.1.2
func (i *OpensearchInput) ComponentName() string
func (*OpensearchInput) Publish ¶ added in v0.1.2
func (i *OpensearchInput) Publish(parser DateParser, logType LogType) (time.Time, time.Time, error)
Click to show internal directories.
Click to hide internal directories.