source

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 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 event.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 event.SinkEvent, _ chan Error) error

Start ...

func (BaseSource) URL

func (b BaseSource) URL() event.SourceURL

URL ...

type Creator added in v1.3.7

type Creator func(since *time.Time, sourceURL event.SourceURL) ([]Source, error)

Source ...

func Single added in v1.3.7

func Single(f func(since *time.Time, sourceURL event.SourceURL) (*Source, error)) Creator

type Error

type Error struct {
	SourceURL event.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 event.SourceURL) bool
	Creator     Creator
	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() event.SourceURL
	// Start collecting events.
	Start(wg *sync.WaitGroup, running func() bool, srcChan chan Event, snkChan chan event.SinkEvent, errChan chan Error) error
}

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

Directories

Path Synopsis
aws
s3
local
Package local provides a source that tails a local file.
Package local provides a source that tails a local file.
ssh
Package ssh provides a source for reading from a remote file over SSH.
Package ssh provides a source for reading from a remote file over SSH.

Jump to

Keyboard shortcuts

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