source

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseSource

type BaseSource struct {
	// contains filtered or unexported fields
}

BaseSource ...

func New

func New(sigil rune, sourceURL model.SourceURL) BaseSource

New base Source.

func (BaseSource) Sigil

func (b BaseSource) Sigil() rune

Sigil ...

func (BaseSource) Start

func (b BaseSource) Start(_ *sync.WaitGroup, _ func() bool, _ chan Event, _ chan model.SinkEvent, _ chan Error) error

Start ...

func (BaseSource) URL

func (b BaseSource) URL() model.SourceURL

URL ...

type Error

type Error struct {
	SourceURL model.SourceURL
	Error     error
}

Error ...

type Event

type Event struct {
	Source Source
	Event  string
}

Event ...

type Metadata

type Metadata struct {
	Name        string
	Type        reflect.Type
	CanHandle   func(url model.SourceURL) bool
	Creator     func(since *time.Time, sourceURL model.SourceURL) (*Source, error)
	ExampleURLs []string
}

Metadata ...

type Source

type Source interface {
	// Sigil represents the type of source in a single character.
	Sigil() rune
	// URL is the URL from which the events come.
	URL() model.SourceURL
	// Start collecting events.
	Start(wg *sync.WaitGroup, running func() bool, srcChan chan Event, snkChan chan model.SinkEvent, errChan chan Error) error
}

Source of events. Responsible for ingest and conversion to the standard format.

Directories

Path Synopsis
aws
s3
ssh

Jump to

Keyboard shortcuts

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