Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SanityCheckLocalConfig ¶
func SanityCheckLocalConfig(c types.LocalConfig) (err error)
Types ¶
type BootstrapNode ¶
type BootstrapNode struct {
// contains filtered or unexported fields
}
BootstrapNode connects to a particular feed and listens for config changes, but does not participate in the protocol. It merely acts as a bootstrap node for peer discovery.
func NewBootstrapNode ¶
func NewBootstrapNode(args BootstrapNodeArgs) (*BootstrapNode, error)
func (*BootstrapNode) Close ¶
func (b *BootstrapNode) Close() error
Close shuts down a BootstrapNode. Can safely be called multiple times.
type BootstrapNodeArgs ¶
type BootstrapNodeArgs struct { BootstrapperFactory types.BootstrapperFactory V1Bootstrappers []string V2Bootstrappers []commontypes.BootstrapperLocator ContractConfigTracker types.ContractConfigTracker Database types.Database LocalConfig types.LocalConfig Logger commontypes.Logger MonitoringEndpoint commontypes.MonitoringEndpoint }
type Oracle ¶
type Oracle struct {
// contains filtered or unexported fields
}
func NewOracle ¶
func NewOracle(args OracleArgs) (*Oracle, error)
NewOracle returns a newly initialized Oracle using the provided services and configuration.
type OracleArgs ¶
type OracleArgs struct { // A factory for producing network endpoints. A network endpoints consists of // networking methods a consumer must implement to allow a node to // communicate with other participating nodes. BinaryNetworkEndpointFactory types.BinaryNetworkEndpointFactory // V1Bootstrappers is the list of bootstrap node addresses & IDs in the multiaddr format for the v1 networking stack V1Bootstrappers []string // V2Bootstrappers is the list of bootstrap node addresses and IDs for the v2 stack V2Bootstrappers []commontypes.BootstrapperLocator // Enables locally overriding certain configuration parameters. This is // useful for e.g. hibernation mode. This may be nil. ConfigOverrider types.ConfigOverrider // Interfaces with the OffchainAggregator smart contract's transmission related logic ContractTransmitter types.ContractTransmitter // Tracks configuration changes ContractConfigTracker types.ContractConfigTracker // Database provides persistent storage Database types.Database // Used to make observations of value the nodes are to come to consensus on Datasource types.DataSource // LocalConfig contains oracle-specific configuration details which are not // mandated by the on-chain configuration specification via OffchainAggregatoo.SetConfig LocalConfig types.LocalConfig // Logger logs stuff Logger commontypes.Logger // Used to send logs to a monitor. This may be nil. MonitoringEndpoint commontypes.MonitoringEndpoint // PrivateKeys contains the secret keys needed for the OCR protocol, and methods // which use those keys without exposing them to the rest of the application. PrivateKeys types.PrivateKeys }
OracleArgs contains the configuration and services a caller must provide, in order to run the offchainreporting protocol.
All fields are expected to be non-nil unless otherwise noted.
Directories ¶
Path | Synopsis |
---|---|
Package confighelper provides helpers for converting between the gethwrappers/OffchainAggregator.SetConfig event and types.ContractConfig
|
Package confighelper provides helpers for converting between the gethwrappers/OffchainAggregator.SetConfig event and types.ContractConfig |
internal
|
|
managed
Package managed provides "managed" versions of Oracle and BootstrapNode that perform garbage collection, track on-chain configuration changes, serializes messages to binary, etc...
|
Package managed provides "managed" versions of Oracle and BootstrapNode that perform garbage collection, track on-chain configuration changes, serializes messages to binary, etc... |
protocol/observation
Package observation contains the data structures and logic for handling observations provided by the client DataSource.
|
Package observation contains the data structures and logic for handling observations provided by the client DataSource. |
shim
Package shim contains implementations of internal types in terms of the external types
|
Package shim contains implementations of internal types in terms of the external types |
Package types contains the types and interfaces a consumer of the OCR library needs to be aware of
|
Package types contains the types and interfaces a consumer of the OCR library needs to be aware of |
Click to show internal directories.
Click to hide internal directories.