registry

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2020 License: AGPL-3.0, Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AvailableTables

func AvailableTables() (tables []*awsglue.GlueMetadata)

Return a slice containing just the Glue tables

Types

type Interface

type Interface interface {
	Elements() map[string]*LogParserMetadata
	LookupParser(logType string) (lpm *LogParserMetadata)
}

type LogParserMetadata

type LogParserMetadata struct {
	Parser      parsers.LogParser     // does the work
	EventStruct interface{}           // should be a struct that defines a log event
	Description string                // describes the  data for documentation and will be added into Glue table
	Glue        *awsglue.GlueMetadata // describes associated AWS Glue table (used to generate CF)
}

Describes each parser

func DefaultHourlyLogParser

func DefaultHourlyLogParser(p parsers.LogParser, eventStruct interface{}, description string) *LogParserMetadata

Most parsers follow this structure, these are currently assumed to all be JSON based, using LogType() as tableName

type Registry

type Registry map[string]*LogParserMetadata

func AvailableParsers

func AvailableParsers() Registry

Return a map containing all the available parsers

func (Registry) Elements

func (r Registry) Elements() map[string]*LogParserMetadata

Provides access to underlying type so 'range' will work

func (Registry) LookupParser

func (r Registry) LookupParser(logType string) (lpm *LogParserMetadata)

Provides mapping from LogType -> metadata (panics!), used in core code to ensure ALL parsers are registered

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL