config

package
v2.12.1-mercury06182024 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 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 mercuryutils.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 utils.PlainHexBytes `json:"serverPubKey" toml:"serverPubKey"`

	// Multi mercury servers
	// This is the preferred way to specify mercury server(s)
	Servers map[string]utils.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   *mercuryutils.FeedID `json:"linkFeedID" toml:"linkFeedID"`
	NativeFeedID *mercuryutils.FeedID `json:"nativeFeedID" toml:"nativeFeedID"`
}

func (PluginConfig) GetServers added in v2.11.0

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

type Server added in v2.11.0

type Server struct {
	URL    string
	PubKey utils.PlainHexBytes
}

Jump to

Keyboard shortcuts

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