config

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidatePluginConfig

func ValidatePluginConfig(config PluginConfig, feedID mercury.FeedID) (merr error)

Types

type PluginConfig

type PluginConfig struct {

	// Single mercury server
	// LEGACY: This is the old way of specifying a mercury server
	RawServerURL string            `json:"serverURL" toml:"serverURL"`
	ServerPubKey hex.PlainHexBytes `json:"serverPubKey" toml:"serverPubKey"`

	// Multi mercury servers
	// This is the preferred way to specify mercury server(s)
	Servers map[string]hex.PlainHexBytes `json:"servers" toml:"servers"`

	// InitialBlockNumber allows to set a custom "validFromBlockNumber" for
	// the first ever report in the case of a brand new feed, where the mercury
	// server does not have any previous reports. For a brand new feed, this
	// effectively sets the "first" validFromBlockNumber.
	InitialBlockNumber null.Int64 `json:"initialBlockNumber" toml:"initialBlockNumber"`

	LinkFeedID   *mercury.FeedID `json:"linkFeedID" toml:"linkFeedID"`
	NativeFeedID *mercury.FeedID `json:"nativeFeedID" toml:"nativeFeedID"`
}

func (PluginConfig) GetServers

func (p PluginConfig) GetServers() (servers []Server)

type Server

type Server struct {
	URL    string
	PubKey hex.PlainHexBytes
}

Jump to

Keyboard shortcuts

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