Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudFrontLogLine ¶
type CloudFrontLogLine struct { Comment bool Timestamp time.Time EdgeLocation string ResponseSize int // in bytes Method string Status int CloudFrontURL url.URL AccessURL url.URL ResultType string Referer string TimeTaken float64 // in seconds EdgeRequestID string }
CloudFrontLogLine is the struct representing one line of a CF log.
type CloudFrontLogScanner ¶
CloudFrontLogScanner extends a bufio.Scanner with CloudFront log reading cababilities.
func NewCloudFrontScanner ¶
func NewCloudFrontScanner(r io.Reader) CloudFrontLogScanner
NewCloudFrontScanner creates a new CloudFront log scanner with a Reader. The reader must point to an uncompressed CloudFront log.
func (*CloudFrontLogScanner) LogLine ¶
func (s *CloudFrontLogScanner) LogLine() CloudFrontLogLine
LogLine parses the current scanner's Text() into a CF log line. See http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html#BasicDistributionFileFormat for information about fields.
type LogfmtScanner ¶
LogfmtScanner extends a bufio.Scanner to make it capable of parsing Logfmt formatted logs.
func NewLogfmtScanner ¶
func NewLogfmtScanner(r io.Reader) LogfmtScanner
NewLogfmtScanner creates a new logfmt scanner from the given reader. Assumes the stream is uncompressed.
func (*LogfmtScanner) LogLineKV ¶
func (s *LogfmtScanner) LogLineKV() LogfmtKV
LogLineKV reads the current logfmt log line into a LogfmtKV