registry

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2020 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AvailableTables

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

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
	GlueTableMetadata *awsglue.GlueTableMetadata // describes associated AWS Glue table (used to generate CF)
}

Describes each parser

func DefaultLogParser added in v1.0.0

func DefaultLogParser(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