config

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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