Documentation ¶
Index ¶
- func NewEnvelopeSourceFactory(ocr2Reader ocr2.OCR2Reader) relayMonitoring.SourceFactory
- func NewMonitorPrometheusOnly(rootCtx context.Context, log commonMonitor.Logger, ...) (*commonMonitor.Monitor, error)
- func NewNodeBalancesExporterFactory(log commonMonitoring.Logger, metrics Metrics) commonMonitoring.ExporterFactory
- func NewNodeBalancesSourceFactory(erc20Reader erc20.ERC20Reader) *nodeBalancesSourceFactory
- func NewPrometheusExporterFactory(metrics Metrics) relayMonitoring.ExporterFactory
- func NewProxySourceFactory(ocr2Reader ocr2.OCR2Reader) relayMonitoring.SourceFactory
- func NewTransmissionDetailsExporterFactory(metrics Metrics) relayMonitoring.ExporterFactory
- func NewTransmissionDetailsSourceFactory(ocr2Reader ocr2.OCR2Reader) relayMonitoring.SourceFactory
- func NewTxResultsSourceFactory(ocr2Reader ocr2.OCR2Reader) relayMonitoring.SourceFactory
- func StarknetFeedsParser(buf io.ReadCloser) ([]relayMonitoring.FeedConfig, error)
- func StarknetNodesParser(buf io.ReadCloser) ([]commonMonitoring.NodeConfig, error)
- type BalanceEnvelope
- type ContractAddress
- type ContractAddressWithBalance
- type Metrics
- type MyConfig
- type ProxyData
- type StarknetConfig
- func (s StarknetConfig) GetChainID() string
- func (s StarknetConfig) GetLinkTokenAddress() string
- func (s StarknetConfig) GetNetworkID() string
- func (s StarknetConfig) GetNetworkName() string
- func (s StarknetConfig) GetPollInterval() time.Duration
- func (s StarknetConfig) GetRPCApiKey() string
- func (s StarknetConfig) GetRPCEndpoint() string
- func (s StarknetConfig) GetReadTimeout() time.Duration
- func (s StarknetConfig) GetStrkTokenAddress() *felt.Felt
- func (s StarknetConfig) ToMapping() map[string]interface{}
- type StarknetFeedConfig
- func (s StarknetFeedConfig) GetContractAddress() string
- func (s StarknetFeedConfig) GetContractAddressBytes() []byte
- func (s StarknetFeedConfig) GetContractStatus() string
- func (s StarknetFeedConfig) GetContractType() string
- func (s StarknetFeedConfig) GetFeedPath() string
- func (s StarknetFeedConfig) GetHeartbeatSec() int64
- func (s StarknetFeedConfig) GetID() string
- func (s StarknetFeedConfig) GetMultiply() *big.Int
- func (s StarknetFeedConfig) GetName() string
- func (s StarknetFeedConfig) GetPath() string
- func (s StarknetFeedConfig) GetSymbol() string
- func (s StarknetFeedConfig) ToMapping() map[string]interface{}
- type StarknetNodeConfig
- type TransmissionInfo
- type TransmissionsEnvelope
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEnvelopeSourceFactory ¶
func NewEnvelopeSourceFactory( ocr2Reader ocr2.OCR2Reader, ) relayMonitoring.SourceFactory
func NewMonitorPrometheusOnly ¶
func NewMonitorPrometheusOnly( rootCtx context.Context, log commonMonitor.Logger, chainConfig commonMonitor.ChainConfig, envelopeSourceFactory commonMonitor.SourceFactory, txResultsSourceFactory commonMonitor.SourceFactory, feedsParser commonMonitor.FeedsParser, nodesParser commonMonitor.NodesParser, ) (*commonMonitor.Monitor, error)
Builds monitor instance with only the prometheus exporter. Does not contain kafka exporter.
func NewNodeBalancesExporterFactory ¶
func NewNodeBalancesExporterFactory(log commonMonitoring.Logger, metrics Metrics) commonMonitoring.ExporterFactory
func NewNodeBalancesSourceFactory ¶
func NewNodeBalancesSourceFactory(erc20Reader erc20.ERC20Reader) *nodeBalancesSourceFactory
func NewPrometheusExporterFactory ¶
func NewPrometheusExporterFactory( metrics Metrics, ) relayMonitoring.ExporterFactory
NewPrometheusExporterFactory builds an implementation of the Exporter for prometheus.
func NewProxySourceFactory ¶
func NewProxySourceFactory( ocr2Reader ocr2.OCR2Reader, ) relayMonitoring.SourceFactory
func NewTransmissionDetailsExporterFactory ¶
func NewTransmissionDetailsExporterFactory( metrics Metrics, ) relayMonitoring.ExporterFactory
NewPrometheusExporterFactory builds an implementation of the Exporter for prometheus.
func NewTransmissionDetailsSourceFactory ¶
func NewTransmissionDetailsSourceFactory( ocr2Reader ocr2.OCR2Reader, ) relayMonitoring.SourceFactory
func NewTxResultsSourceFactory ¶
func NewTxResultsSourceFactory( ocr2Reader ocr2.OCR2Reader, ) relayMonitoring.SourceFactory
func StarknetFeedsParser ¶
func StarknetFeedsParser(buf io.ReadCloser) ([]relayMonitoring.FeedConfig, error)
func StarknetNodesParser ¶
func StarknetNodesParser(buf io.ReadCloser) ([]commonMonitoring.NodeConfig, error)
Types ¶
type BalanceEnvelope ¶
type BalanceEnvelope struct { Contracts []ContractAddressWithBalance Decimals *big.Int }
type ContractAddress ¶
func NewContractAddress ¶
func NewContractAddress(address string, name string) (ContractAddress, error)
type ContractAddressWithBalance ¶
type ContractAddressWithBalance struct { ContractAddress Balance *big.Int }
type Metrics ¶
type Metrics interface { SetReportObservations(answer float64, accountAddress, feedID, chainID, contractStatus, contractType, feedName, feedPath, networkID, networkName string) CleanupReportObservations(accountAddress, feedID, chainID, contractStatus, contractType, feedName, feedPath, networkID, networkName string) SetProxyAnswersRaw(answer float64, proxyContractAddress, feedID, chainID, contractStatus, contractType, feedName, feedPath, networkID, networkName string) SetProxyAnswers(answer float64, proxyContractAddress, feedID, chainID, contractStatus, contractType, feedName, feedPath, networkID, networkName string) CleanupProxy(proxyContractAddress, feedID, chainID, contractStatus, contractType, feedName, feedPath, networkID, networkName string) SetBalance(answer float64, contractAddress, alias, networkId, networkName, chainID string) CleanupBalance(contractAddress, alias, networkId, networkName, chainID string) }
Metrics is an interface for prometheus metrics. Makes testing easier.
type MyConfig ¶
func ParseWithoutKafka ¶
type StarknetConfig ¶
type StarknetConfig struct {
// contains filtered or unexported fields
}
func ParseStarknetConfig ¶
func ParseStarknetConfig() (StarknetConfig, error)
func (StarknetConfig) GetChainID ¶
func (s StarknetConfig) GetChainID() string
func (StarknetConfig) GetLinkTokenAddress ¶
func (s StarknetConfig) GetLinkTokenAddress() string
func (StarknetConfig) GetNetworkID ¶
func (s StarknetConfig) GetNetworkID() string
func (StarknetConfig) GetNetworkName ¶
func (s StarknetConfig) GetNetworkName() string
func (StarknetConfig) GetPollInterval ¶
func (s StarknetConfig) GetPollInterval() time.Duration
func (StarknetConfig) GetRPCApiKey ¶
func (s StarknetConfig) GetRPCApiKey() string
func (StarknetConfig) GetRPCEndpoint ¶
func (s StarknetConfig) GetRPCEndpoint() string
func (StarknetConfig) GetReadTimeout ¶
func (s StarknetConfig) GetReadTimeout() time.Duration
func (StarknetConfig) GetStrkTokenAddress ¶
func (s StarknetConfig) GetStrkTokenAddress() *felt.Felt
func (StarknetConfig) ToMapping ¶
func (s StarknetConfig) ToMapping() map[string]interface{}
type StarknetFeedConfig ¶
type StarknetFeedConfig struct { Name string `json:"name,omitempty"` Path string `json:"path,omitempty"` Symbol string `json:"symbol,omitempty"` HeartbeatSec int64 `json:"heartbeat,omitempty"` ContractType string `json:"contract_type,omitempty"` ContractStatus string `json:"status,omitempty"` MultiplyRaw string `json:"multiply,omitempty"` Multiply *big.Int `json:"-"` ContractAddress string `json:"contract_address,omitempty"` ProxyAddress string `json:"proxy_address,omitempty"` }
func (StarknetFeedConfig) GetContractAddress ¶
func (s StarknetFeedConfig) GetContractAddress() string
func (StarknetFeedConfig) GetContractAddressBytes ¶
func (s StarknetFeedConfig) GetContractAddressBytes() []byte
func (StarknetFeedConfig) GetContractStatus ¶
func (s StarknetFeedConfig) GetContractStatus() string
func (StarknetFeedConfig) GetContractType ¶
func (s StarknetFeedConfig) GetContractType() string
func (StarknetFeedConfig) GetFeedPath ¶
func (s StarknetFeedConfig) GetFeedPath() string
func (StarknetFeedConfig) GetHeartbeatSec ¶
func (s StarknetFeedConfig) GetHeartbeatSec() int64
func (StarknetFeedConfig) GetID ¶
func (s StarknetFeedConfig) GetID() string
GetID returns the state account's address as that uniquely identifies a feed on Starknet. In Starknet, a program is stateless and we use the same program for all feeds so we can't use the program account's address.
func (StarknetFeedConfig) GetMultiply ¶
func (s StarknetFeedConfig) GetMultiply() *big.Int
func (StarknetFeedConfig) GetName ¶
func (s StarknetFeedConfig) GetName() string
func (StarknetFeedConfig) GetPath ¶
func (s StarknetFeedConfig) GetPath() string
func (StarknetFeedConfig) GetSymbol ¶
func (s StarknetFeedConfig) GetSymbol() string
func (StarknetFeedConfig) ToMapping ¶
func (s StarknetFeedConfig) ToMapping() map[string]interface{}
type StarknetNodeConfig ¶
type StarknetNodeConfig struct { ID string `json:"id,omitempty"` NodeAddress []string `json:"nodeAddress,omitempty"` }
func (StarknetNodeConfig) GetAccount ¶
func (s StarknetNodeConfig) GetAccount() types.Account
func (StarknetNodeConfig) GetName ¶
func (s StarknetNodeConfig) GetName() string
type TransmissionInfo ¶
type TransmissionsEnvelope ¶
type TransmissionsEnvelope struct {
Transmissions []TransmissionInfo
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.