webhooksserver

package
v0.0.0-...-864a747 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Header = "Computantis-Web-Hooks"
)

Variables

View Source
var (
	ErrNotAuthorized     = errors.New("not authorized")
	ErrProcessingFailure = errors.New("processing failed")
)

Functions

func Run

Run initializes webhooks server and GRPC API server. It will block until the context is canceled.

Types

type Config

type Config struct {
	Port int `yaml:"port"` // port on which validator will listen for http requests
}

Config contains configuration of the validator.

type NodesCommunicationSubscriber

type NodesCommunicationSubscriber interface {
	SubscribeNewTransactionsForAddresses(call transaction.TrxAddressesSubscriberCallback, log logger.Logger) error
}

NodesCommunicationSubscriber provides facade access to communication between nodes publisher endpoint.

type WebhookCreateRemovePoster

type WebhookCreateRemovePoster interface {
	CreateWebhook(trigger byte, address string, h webhooks.Hook) error
	RemoveWebhook(trigger byte, address string, h webhooks.Hook) error
	PostWebhookNewTransaction(publicAddresses []string, storingNodeURL string)
}

WebhookCreateRemovePoster provides methods to create, remove webhooks and post messages to webhooks.

Jump to

Keyboard shortcuts

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