impl

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: MIT, Apache-2.0 Imports: 24 Imported by: 0

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

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

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.

func (*EventProcessor) Stop

func (ep *EventProcessor) Stop()

Stop stops processing new events.

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

func NewWebhook(urlStr string) (Webhook, error)

NewWebhook function to create a new webhook.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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