Help us shape the future of Go! Take the 2026 Go Developer Survey

feeders

package
v1.27.2 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: GPL-3.0 Imports: 44 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 NewImapFeeder added in v1.20.0

func NewImapFeeder(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 NewTelegramBotFeeder added in v1.27.0

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

NewTelegramBotFeeder is the factory method registered for this feeder.

func NewTelegramFeeder added in v1.26.8

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

NewTelegramFeeder is the registered method to instantiate a TelegramFeeder

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

func NewWebRSSFeeder added in v1.26.8

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

NewWebRSSFeeder is the registered method to instantiate a WebRSSFeeder

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 Imap added in v1.20.0

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

Imap is a Feeder that creates a stream from an IMAP server

func (*Imap) OnEvent added in v1.20.0

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

OnEvent is called when an event occurs

func (*Imap) Start added in v1.20.0

func (f *Imap) Start()

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

func (*Imap) Stop added in v1.20.0

func (f *Imap) 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 Telegram added in v1.26.8

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

func (*Telegram) OnEvent added in v1.26.8

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

OnEvent is called when an event occurs

func (*Telegram) Start added in v1.26.8

func (t *Telegram) Start()

Start propagates a message every time a new tweet is published

func (*Telegram) Stop added in v1.26.8

func (t *Telegram) Stop()

Stop handles the Feeder shutdown

type TelegramBot added in v1.27.0

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

TelegramBot is a Feeder that consumes Telegram Bot API updates.

func (*TelegramBot) OnEvent added in v1.27.0

func (t *TelegramBot) OnEvent(e *data.Event)

OnEvent handles bus events.

func (*TelegramBot) Start added in v1.27.0

func (t *TelegramBot) Start()

Start initializes the bot client and begins consuming updates.

func (*TelegramBot) Stop added in v1.27.0

func (t *TelegramBot) Stop()

Stop tears down the bot client and any HTTP server.

type Terminal added in v1.26.8

type Terminal struct {
	PhoneNumber string // optional, will be prompted if empty
}

func (Terminal) AcceptTermsOfService added in v1.26.8

func (Terminal) AcceptTermsOfService(ctx context.Context, tos tg.HelpTermsOfService) error

func (Terminal) Code added in v1.26.8

func (Terminal) Code(ctx context.Context, sentCode *tg.AuthSentCode) (string, error)

func (Terminal) Password added in v1.26.8

func (Terminal) Password(_ context.Context) (string, error)

func (Terminal) Phone added in v1.26.8

func (a Terminal) Phone(_ context.Context) (string, error)

func (Terminal) SignUp added in v1.26.8

func (Terminal) SignUp(ctx context.Context) (auth.UserInfo, error)

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

type WebRSS added in v1.26.8

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

WebRSS is a Feeder that scrapes a website and emits one Message per article found

func (*WebRSS) OnEvent added in v1.26.8

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

OnEvent is called when an event occurs

func (*WebRSS) Start added in v1.26.8

func (f *WebRSS) Start()

Start propagates a message every time a new article is found

func (*WebRSS) Stop added in v1.26.8

func (f *WebRSS) Stop()

Stop handles the Feeder shutdown

Jump to

Keyboard shortcuts

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