Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiscordWebhook ¶ added in v1.6.0
type DiscordWebhook struct { // URL is the webhook URL. URL string // WHData represents the webhook data that // should be JSON marshaled before sending as the POST body. WHData struct { Content string `json:"content"` } }
DiscordWebhook struct.
func (*DiscordWebhook) Send ¶ added in v1.6.0
func (w *DiscordWebhook) Send(ctx context.Context, r eventprocessor.Receipt) error
Send method formats the receipt as Webhook Data for Discord and Sends it.
type EventProcessor ¶
type EventProcessor struct {
// contains filtered or unexported fields
}
EventProcessor processes new events detected by an event feed.
func New ¶
func New( parser parsing.SQLValidator, executor executor.Executor, ef eventfeed.EventFeed, chainID tableland.ChainID, opts ...eventprocessor.Option, ) (*EventProcessor, error)
New returns a new EventProcessor.
func (*EventProcessor) GetLastExecutedBlockNumber ¶
func (ep *EventProcessor) GetLastExecutedBlockNumber() int64
GetLastExecutedBlockNumber returns the last executed block number.
func (*EventProcessor) Start ¶
func (ep *EventProcessor) Start() error
Start starts processing new events from the last processed height.
type Webhook ¶ added in v1.6.0
type Webhook interface {
Send(ctx context.Context, content eventprocessor.Receipt) error
}
Webhook interface for sending webhooks to different services such as IFTTT or Discord etc.
func NewWebhook ¶ added in v1.6.0
NewWebhook function to create a new webhook.
Click to show internal directories.
Click to hide internal directories.