feeders

package
v1.16.1 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: GPL-3.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Apt added in v1.11.3

type Apt struct {
	Base
	// contains filtered or unexported fields
}

Apt is a Feeder that creates a stream from a Apt feed

func (*Apt) OnEvent added in v1.11.3

func (f *Apt) OnEvent(event *data.Event)

OnEvent is called when an event occurs

func (*Apt) Start added in v1.11.3

func (f *Apt) Start()

Start propagates a message every time a new row is published

func (*Apt) Stop added in v1.11.3

func (f *Apt) Stop()

Stop handles the Feeder shutdown

type Base

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

Base is inherited from the feeders

func (*Base) GetIdentifier

func (f *Base) GetIdentifier() string

GetIdentifier returns the Node identifier ID used in the bus

func (*Base) IsRunning

func (f *Base) IsRunning() bool

IsRunning returns true if the Node is up and running

func (*Base) Name

func (f *Base) Name() string

Name returns the name of the Node

func (*Base) Propagate

func (f *Base) Propagate(data *data.Message)

Propagate sends the Message to the connected Filters

func (*Base) Rule added in v1.14.0

func (f *Base) Rule() string

Rule returns the rule in which the Feeder is found

func (*Base) Start

func (f *Base) Start()

Start initializes the Node

func (*Base) Stop

func (f *Base) Stop()

Stop stops the Node

type Feeder

type Feeder interface {
	Name() string
	Rule() string
	Start()
	Stop()
	IsRunning() bool
	GetIdentifier() string
	OnEvent(e *data.Event)
	// contains filtered or unexported methods
}

Feeder defines Base methods of the object

func NewAptFeeder added in v1.11.3

func NewAptFeeder(conf map[string]string) (Feeder, error)

NewAptFeeder is the registered method to instantiate a AptFeeder

func NewFeeder

func NewFeeder(rule string, name string, conf map[string]string, bus EventBus.Bus, id int32) (Feeder, error)

NewFeeder creates a new registered Feeder from it's name

func NewFileFeeder

func NewFileFeeder(conf map[string]string) (Feeder, error)

NewFileFeeder is the registered method to instantiate a FileFeeder

func NewFolderFeeder added in v0.10.0

func NewFolderFeeder(conf map[string]string) (Feeder, error)

NewFolderFeeder is the registered method to instantiate a FolderFeeder

func NewRSSFeeder

func NewRSSFeeder(conf map[string]string) (Feeder, error)

NewRSSFeeder is the registered method to instantiate a RSSFeeder

func NewSlackFeeder added in v0.9.1

func NewSlackFeeder(conf map[string]string) (Feeder, error)

NewSlackFeeder is the registered method to instantiate a SlackFeeder

func NewTimerFeeder added in v1.1.7

func NewTimerFeeder(conf map[string]string) (Feeder, error)

NewTimerFeeder is the registered method to instantiate a TimerFeeder

func NewTwitterFeeder

func NewTwitterFeeder(conf map[string]string) (Feeder, error)

NewTwitterFeeder is the registered method to instantiate a TwitterFeeder https://developer.twitter.com/en/docs/tweets/filter-realtime/guides/basic-stream-parameters

func NewWebFeeder

func NewWebFeeder(conf map[string]string) (Feeder, error)

NewWebFeeder is the registered method to instantiate a WebFeeder

type FeederFactory

type FeederFactory func(conf map[string]string) (Feeder, error)

FeederFactory identifies a function to instantiate a Feeder using the Factory

type File

type File struct {
	Base
	// contains filtered or unexported fields
}

File is a Feeder that creates a stream from a file

func (*File) OnEvent added in v1.3.1

func (f *File) OnEvent(event *data.Event)

OnEvent is called when an event occurs

func (*File) Start

func (f *File) Start()

Start propagates a message every time a new line is read

func (*File) Stop

func (f *File) Stop()

Stop handles the Feeder shutdown

type Folder added in v0.10.0

type Folder struct {
	Base
	// contains filtered or unexported fields
}

Folder is a Feeder that creates a stream from a folder

func (*Folder) OnEvent added in v1.3.1

func (f *Folder) OnEvent(event *data.Event)

OnEvent is called when an event occurs

func (*Folder) Start added in v0.10.0

func (f *Folder) Start()

Start propagates a message every time a new fs event happens in the folder

func (*Folder) Stop added in v0.10.0

func (f *Folder) Stop()

Stop handles the Feeder shutdown

type RSS

type RSS struct {
	Base
	// contains filtered or unexported fields
}

RSS is a Feeder that creates a stream from a RSS feed

func (*RSS) OnEvent added in v1.3.1

func (f *RSS) OnEvent(event *data.Event)

OnEvent is called when an event occurs

func (*RSS) Start

func (f *RSS) Start()

Start propagates a message every time a new row is published

func (*RSS) Stop

func (f *RSS) Stop()

Stop handles the Feeder shutdown

type Slack added in v0.9.1

type Slack struct {
	Base

	Team   string
	User   string
	TeamID string
	UserID string
	BotID  string
	// contains filtered or unexported fields
}

Slack is a Feeder that get events from Slack

func (*Slack) GetClient added in v0.9.1

func (s *Slack) GetClient() *slack.Client

GetClient return the slack.client pointer

func (*Slack) OnEvent added in v1.3.1

func (s *Slack) OnEvent(event *data.Event)

OnEvent is called when an event occurs

func (*Slack) Start added in v0.9.1

func (s *Slack) Start()

Start propagates a message every time a new tweet is published

func (*Slack) Stop added in v0.9.1

func (s *Slack) Stop()

Stop handles the Feeder shutdown

type Timer added in v1.1.7

type Timer struct {
	Base
	// contains filtered or unexported fields
}

Timer is a Feeder that triggers the pipeline using a timer

func (*Timer) OnEvent added in v1.3.1

func (f *Timer) OnEvent(event *data.Event)

OnEvent is called when an event occurs

func (*Timer) Start added in v1.1.7

func (f *Timer) Start()

Start propagates a message every time the ticker is fired

func (*Timer) Stop added in v1.1.7

func (f *Timer) Stop()

Stop handles the Feeder shutdown

type Twitter

type Twitter struct {
	Base
	// contains filtered or unexported fields
}

Twitter is a Feeder that feeds a pipeline with tweets

func (*Twitter) OnEvent added in v1.3.1

func (t *Twitter) OnEvent(event *data.Event)

OnEvent is called when an event occurs

func (*Twitter) Start

func (t *Twitter) Start()

Start propagates a message every time a new tweet is published

func (*Twitter) Stop

func (t *Twitter) Stop()

Stop handles the Feeder shutdown

type Web

type Web struct {
	Base
	// contains filtered or unexported fields
}

Web is a Feeder that creates a stream from an URL

func (*Web) OnEvent added in v1.3.1

func (f *Web) OnEvent(event *data.Event)

OnEvent is called when an event occurs

func (*Web) Start

func (f *Web) Start()

Start propagates a message every time the URL is read

func (*Web) Stop

func (f *Web) Stop()

Stop handles the Feeder shutdown

Jump to

Keyboard shortcuts

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