sink

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventPayload

type EventPayload struct {
	RuleID   string
	Chain    string
	SourceID string
	Height   uint64
	Hash     string
	TxHash   string
	AppID    uint64
	LogIndex *uint
	Args     map[string]any
}

EventPayload is the data passed to sinks.

type Sender

type Sender interface {
	Send(ctx context.Context, payload EventPayload) error
}

func NewSlackSender

func NewSlackSender(url, tmpl string) (Sender, error)

NewSlackSender builds a Slack-compatible webhook sink.

func NewTeamsSender

func NewTeamsSender(url, tmpl string) (Sender, error)

NewTeamsSender builds a Teams-compatible webhook sink.

func NewWebhookSender

func NewWebhookSender(url, method, tmpl string, headers map[string]string) (Sender, error)

NewWebhookSender builds a generic HTTP sink.

Jump to

Keyboard shortcuts

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