feeders

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2021 License: GPL-3.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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) 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
	Start()
	Stop()
	IsRunning() bool
	GetIdentifier() string
	// contains filtered or unexported methods
}

Feeder defines Base methods of the object

func NewFeeder

func NewFeeder(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 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) 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) 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) 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) 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 Twitter

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

Twitter is a Feeder that feeds a pipeline with tweets

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) 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