Documentation ¶
Overview ¶
This file contains data generators and utilities to simplify tests. The data generated here shouldn't be used to run OCR instances
Index ¶
- Variables
- func MakeConfigSetSimplifiedMapping(envelope Envelope, _ ChainConfig, feedConfig FeedConfig) (map[string]interface{}, error)
- func MakeTransmissionMapping(envelope Envelope, chainConfig ChainConfig, feedConfig FeedConfig) (map[string]interface{}, error)
- func SubjectFromTopic(topic string) string
- type ChainConfig
- type ChainMetrics
- type Envelope
- type Exporter
- type ExporterFactory
- type ExporterFactoryMock
- type ExporterFactoryMock_Expecter
- type ExporterFactoryMock_NewExporter_Call
- func (_c *ExporterFactoryMock_NewExporter_Call) Return(_a0 Exporter, _a1 error) *ExporterFactoryMock_NewExporter_Call
- func (_c *ExporterFactoryMock_NewExporter_Call) Run(run func(_a0 ExporterParams)) *ExporterFactoryMock_NewExporter_Call
- func (_c *ExporterFactoryMock_NewExporter_Call) RunAndReturn(run func(ExporterParams) (Exporter, error)) *ExporterFactoryMock_NewExporter_Call
- type ExporterMock
- type ExporterMock_Cleanup_Call
- type ExporterMock_Expecter
- type ExporterMock_Export_Call
- func (_c *ExporterMock_Export_Call) Return() *ExporterMock_Export_Call
- func (_c *ExporterMock_Export_Call) Run(run func(ctx context.Context, data interface{})) *ExporterMock_Export_Call
- func (_c *ExporterMock_Export_Call) RunAndReturn(run func(context.Context, interface{})) *ExporterMock_Export_Call
- type ExporterParams
- type FeedConfig
- type FeedMetrics
- type FeedMonitor
- type FeedsParser
- type HTTPServer
- type Logger
- type ManagedFunc
- type Manager
- type Mapper
- type Metrics
- type MetricsMock
- func (_m *MetricsMock) Cleanup(networkName string, networkID string, chainID string, oracleName string, ...)
- func (_m *MetricsMock) EXPECT() *MetricsMock_Expecter
- func (_m *MetricsMock) HTTPHandler() http.Handler
- func (_m *MetricsMock) IncOffchainAggregatorAnswersTotal(contractAddress string, feedID string, chainID string, contractStatus string, ...)
- func (_m *MetricsMock) SetFeedContractLinkBalance(balance float64, contractAddress string, feedID string, chainID string, ...)
- func (_m *MetricsMock) SetFeedContractMetadata(chainID string, contractAddress string, feedID string, contractStatus string, ...)
- func (_m *MetricsMock) SetFeedContractTransactionsFailed(numFailed float64, contractAddress string, feedID string, chainID string, ...)
- func (_m *MetricsMock) SetFeedContractTransactionsSucceeded(numSucceeded float64, contractAddress string, feedID string, chainID string, ...)
- func (_m *MetricsMock) SetHeadTrackerCurrentHead(blockNumber float64, networkName string, chainID string, networkID string)
- func (_m *MetricsMock) SetLinkAvailableForPayment(amount float64, feedID string, chainID string, contractStatus string, ...)
- func (_m *MetricsMock) SetNodeMetadata(chainID string, networkID string, networkName string, oracleName string, ...)
- func (_m *MetricsMock) SetOffchainAggregatorAnswerStalled(isSet bool, contractAddress string, feedID string, chainID string, ...)
- func (_m *MetricsMock) SetOffchainAggregatorAnswers(answer float64, contractAddress string, feedID string, chainID string, ...)
- func (_m *MetricsMock) SetOffchainAggregatorAnswersRaw(answer float64, contractAddress string, feedID string, chainID string, ...)
- func (_m *MetricsMock) SetOffchainAggregatorJuelsPerFeeCoin(juelsPerFeeCoin float64, contractAddress string, feedID string, chainID string, ...)
- func (_m *MetricsMock) SetOffchainAggregatorJuelsPerFeeCoinRaw(juelsPerFeeCoin float64, contractAddress string, feedID string, chainID string, ...)
- func (_m *MetricsMock) SetOffchainAggregatorJuelsPerFeeCoinReceivedValues(value float64, contractAddress string, feedID string, sender string, ...)
- func (_m *MetricsMock) SetOffchainAggregatorRoundID(aggregatorRoundID float64, contractAddress string, feedID string, ...)
- func (_m *MetricsMock) SetOffchainAggregatorSubmissionReceivedValues(value float64, contractAddress string, feedID string, sender string, ...)
- type MetricsMock_Cleanup_Call
- type MetricsMock_Expecter
- func (_e *MetricsMock_Expecter) Cleanup(networkName interface{}, networkID interface{}, chainID interface{}, ...) *MetricsMock_Cleanup_Call
- func (_e *MetricsMock_Expecter) HTTPHandler() *MetricsMock_HTTPHandler_Call
- func (_e *MetricsMock_Expecter) IncOffchainAggregatorAnswersTotal(contractAddress interface{}, feedID interface{}, chainID interface{}, ...) *MetricsMock_IncOffchainAggregatorAnswersTotal_Call
- func (_e *MetricsMock_Expecter) SetFeedContractLinkBalance(balance interface{}, contractAddress interface{}, feedID interface{}, ...) *MetricsMock_SetFeedContractLinkBalance_Call
- func (_e *MetricsMock_Expecter) SetFeedContractMetadata(chainID interface{}, contractAddress interface{}, feedID interface{}, ...) *MetricsMock_SetFeedContractMetadata_Call
- func (_e *MetricsMock_Expecter) SetFeedContractTransactionsFailed(numFailed interface{}, contractAddress interface{}, feedID interface{}, ...) *MetricsMock_SetFeedContractTransactionsFailed_Call
- func (_e *MetricsMock_Expecter) SetFeedContractTransactionsSucceeded(numSucceeded interface{}, contractAddress interface{}, feedID interface{}, ...) *MetricsMock_SetFeedContractTransactionsSucceeded_Call
- func (_e *MetricsMock_Expecter) SetHeadTrackerCurrentHead(blockNumber interface{}, networkName interface{}, chainID interface{}, ...) *MetricsMock_SetHeadTrackerCurrentHead_Call
- func (_e *MetricsMock_Expecter) SetLinkAvailableForPayment(amount interface{}, feedID interface{}, chainID interface{}, ...) *MetricsMock_SetLinkAvailableForPayment_Call
- func (_e *MetricsMock_Expecter) SetNodeMetadata(chainID interface{}, networkID interface{}, networkName interface{}, ...) *MetricsMock_SetNodeMetadata_Call
- func (_e *MetricsMock_Expecter) SetOffchainAggregatorAnswerStalled(isSet interface{}, contractAddress interface{}, feedID interface{}, ...) *MetricsMock_SetOffchainAggregatorAnswerStalled_Call
- func (_e *MetricsMock_Expecter) SetOffchainAggregatorAnswers(answer interface{}, contractAddress interface{}, feedID interface{}, ...) *MetricsMock_SetOffchainAggregatorAnswers_Call
- func (_e *MetricsMock_Expecter) SetOffchainAggregatorAnswersRaw(answer interface{}, contractAddress interface{}, feedID interface{}, ...) *MetricsMock_SetOffchainAggregatorAnswersRaw_Call
- func (_e *MetricsMock_Expecter) SetOffchainAggregatorJuelsPerFeeCoin(juelsPerFeeCoin interface{}, contractAddress interface{}, feedID interface{}, ...) *MetricsMock_SetOffchainAggregatorJuelsPerFeeCoin_Call
- func (_e *MetricsMock_Expecter) SetOffchainAggregatorJuelsPerFeeCoinRaw(juelsPerFeeCoin interface{}, contractAddress interface{}, feedID interface{}, ...) *MetricsMock_SetOffchainAggregatorJuelsPerFeeCoinRaw_Call
- func (_e *MetricsMock_Expecter) SetOffchainAggregatorJuelsPerFeeCoinReceivedValues(value interface{}, contractAddress interface{}, feedID interface{}, ...) *MetricsMock_SetOffchainAggregatorJuelsPerFeeCoinReceivedValues_Call
- func (_e *MetricsMock_Expecter) SetOffchainAggregatorRoundID(aggregatorRoundID interface{}, contractAddress interface{}, feedID interface{}, ...) *MetricsMock_SetOffchainAggregatorRoundID_Call
- func (_e *MetricsMock_Expecter) SetOffchainAggregatorSubmissionReceivedValues(value interface{}, contractAddress interface{}, feedID interface{}, ...) *MetricsMock_SetOffchainAggregatorSubmissionReceivedValues_Call
- type MetricsMock_HTTPHandler_Call
- type MetricsMock_IncOffchainAggregatorAnswersTotal_Call
- func (_c *MetricsMock_IncOffchainAggregatorAnswersTotal_Call) Return() *MetricsMock_IncOffchainAggregatorAnswersTotal_Call
- func (_c *MetricsMock_IncOffchainAggregatorAnswersTotal_Call) Run(...) *MetricsMock_IncOffchainAggregatorAnswersTotal_Call
- func (_c *MetricsMock_IncOffchainAggregatorAnswersTotal_Call) RunAndReturn(...) *MetricsMock_IncOffchainAggregatorAnswersTotal_Call
- type MetricsMock_SetFeedContractLinkBalance_Call
- func (_c *MetricsMock_SetFeedContractLinkBalance_Call) Return() *MetricsMock_SetFeedContractLinkBalance_Call
- func (_c *MetricsMock_SetFeedContractLinkBalance_Call) Run(...) *MetricsMock_SetFeedContractLinkBalance_Call
- func (_c *MetricsMock_SetFeedContractLinkBalance_Call) RunAndReturn(...) *MetricsMock_SetFeedContractLinkBalance_Call
- type MetricsMock_SetFeedContractMetadata_Call
- func (_c *MetricsMock_SetFeedContractMetadata_Call) Return() *MetricsMock_SetFeedContractMetadata_Call
- func (_c *MetricsMock_SetFeedContractMetadata_Call) Run(...) *MetricsMock_SetFeedContractMetadata_Call
- func (_c *MetricsMock_SetFeedContractMetadata_Call) RunAndReturn(...) *MetricsMock_SetFeedContractMetadata_Call
- type MetricsMock_SetFeedContractTransactionsFailed_Call
- func (_c *MetricsMock_SetFeedContractTransactionsFailed_Call) Return() *MetricsMock_SetFeedContractTransactionsFailed_Call
- func (_c *MetricsMock_SetFeedContractTransactionsFailed_Call) Run(...) *MetricsMock_SetFeedContractTransactionsFailed_Call
- func (_c *MetricsMock_SetFeedContractTransactionsFailed_Call) RunAndReturn(...) *MetricsMock_SetFeedContractTransactionsFailed_Call
- type MetricsMock_SetFeedContractTransactionsSucceeded_Call
- func (_c *MetricsMock_SetFeedContractTransactionsSucceeded_Call) Return() *MetricsMock_SetFeedContractTransactionsSucceeded_Call
- func (_c *MetricsMock_SetFeedContractTransactionsSucceeded_Call) Run(...) *MetricsMock_SetFeedContractTransactionsSucceeded_Call
- func (_c *MetricsMock_SetFeedContractTransactionsSucceeded_Call) RunAndReturn(...) *MetricsMock_SetFeedContractTransactionsSucceeded_Call
- type MetricsMock_SetHeadTrackerCurrentHead_Call
- func (_c *MetricsMock_SetHeadTrackerCurrentHead_Call) Return() *MetricsMock_SetHeadTrackerCurrentHead_Call
- func (_c *MetricsMock_SetHeadTrackerCurrentHead_Call) Run(...) *MetricsMock_SetHeadTrackerCurrentHead_Call
- func (_c *MetricsMock_SetHeadTrackerCurrentHead_Call) RunAndReturn(run func(float64, string, string, string)) *MetricsMock_SetHeadTrackerCurrentHead_Call
- type MetricsMock_SetLinkAvailableForPayment_Call
- func (_c *MetricsMock_SetLinkAvailableForPayment_Call) Return() *MetricsMock_SetLinkAvailableForPayment_Call
- func (_c *MetricsMock_SetLinkAvailableForPayment_Call) Run(...) *MetricsMock_SetLinkAvailableForPayment_Call
- func (_c *MetricsMock_SetLinkAvailableForPayment_Call) RunAndReturn(...) *MetricsMock_SetLinkAvailableForPayment_Call
- type MetricsMock_SetNodeMetadata_Call
- func (_c *MetricsMock_SetNodeMetadata_Call) Return() *MetricsMock_SetNodeMetadata_Call
- func (_c *MetricsMock_SetNodeMetadata_Call) Run(...) *MetricsMock_SetNodeMetadata_Call
- func (_c *MetricsMock_SetNodeMetadata_Call) RunAndReturn(run func(string, string, string, string, string)) *MetricsMock_SetNodeMetadata_Call
- type MetricsMock_SetOffchainAggregatorAnswerStalled_Call
- func (_c *MetricsMock_SetOffchainAggregatorAnswerStalled_Call) Return() *MetricsMock_SetOffchainAggregatorAnswerStalled_Call
- func (_c *MetricsMock_SetOffchainAggregatorAnswerStalled_Call) Run(...) *MetricsMock_SetOffchainAggregatorAnswerStalled_Call
- func (_c *MetricsMock_SetOffchainAggregatorAnswerStalled_Call) RunAndReturn(...) *MetricsMock_SetOffchainAggregatorAnswerStalled_Call
- type MetricsMock_SetOffchainAggregatorAnswersRaw_Call
- func (_c *MetricsMock_SetOffchainAggregatorAnswersRaw_Call) Return() *MetricsMock_SetOffchainAggregatorAnswersRaw_Call
- func (_c *MetricsMock_SetOffchainAggregatorAnswersRaw_Call) Run(...) *MetricsMock_SetOffchainAggregatorAnswersRaw_Call
- func (_c *MetricsMock_SetOffchainAggregatorAnswersRaw_Call) RunAndReturn(...) *MetricsMock_SetOffchainAggregatorAnswersRaw_Call
- type MetricsMock_SetOffchainAggregatorAnswers_Call
- func (_c *MetricsMock_SetOffchainAggregatorAnswers_Call) Return() *MetricsMock_SetOffchainAggregatorAnswers_Call
- func (_c *MetricsMock_SetOffchainAggregatorAnswers_Call) Run(...) *MetricsMock_SetOffchainAggregatorAnswers_Call
- func (_c *MetricsMock_SetOffchainAggregatorAnswers_Call) RunAndReturn(...) *MetricsMock_SetOffchainAggregatorAnswers_Call
- type MetricsMock_SetOffchainAggregatorJuelsPerFeeCoinRaw_Call
- func (_c *MetricsMock_SetOffchainAggregatorJuelsPerFeeCoinRaw_Call) Return() *MetricsMock_SetOffchainAggregatorJuelsPerFeeCoinRaw_Call
- func (_c *MetricsMock_SetOffchainAggregatorJuelsPerFeeCoinRaw_Call) Run(...) *MetricsMock_SetOffchainAggregatorJuelsPerFeeCoinRaw_Call
- func (_c *MetricsMock_SetOffchainAggregatorJuelsPerFeeCoinRaw_Call) RunAndReturn(...) *MetricsMock_SetOffchainAggregatorJuelsPerFeeCoinRaw_Call
- type MetricsMock_SetOffchainAggregatorJuelsPerFeeCoinReceivedValues_Call
- func (_c *MetricsMock_SetOffchainAggregatorJuelsPerFeeCoinReceivedValues_Call) Return() *MetricsMock_SetOffchainAggregatorJuelsPerFeeCoinReceivedValues_Call
- func (_c *MetricsMock_SetOffchainAggregatorJuelsPerFeeCoinReceivedValues_Call) Run(...) *MetricsMock_SetOffchainAggregatorJuelsPerFeeCoinReceivedValues_Call
- func (_c *MetricsMock_SetOffchainAggregatorJuelsPerFeeCoinReceivedValues_Call) RunAndReturn(...) *MetricsMock_SetOffchainAggregatorJuelsPerFeeCoinReceivedValues_Call
- type MetricsMock_SetOffchainAggregatorJuelsPerFeeCoin_Call
- func (_c *MetricsMock_SetOffchainAggregatorJuelsPerFeeCoin_Call) Return() *MetricsMock_SetOffchainAggregatorJuelsPerFeeCoin_Call
- func (_c *MetricsMock_SetOffchainAggregatorJuelsPerFeeCoin_Call) Run(...) *MetricsMock_SetOffchainAggregatorJuelsPerFeeCoin_Call
- func (_c *MetricsMock_SetOffchainAggregatorJuelsPerFeeCoin_Call) RunAndReturn(...) *MetricsMock_SetOffchainAggregatorJuelsPerFeeCoin_Call
- type MetricsMock_SetOffchainAggregatorRoundID_Call
- func (_c *MetricsMock_SetOffchainAggregatorRoundID_Call) Return() *MetricsMock_SetOffchainAggregatorRoundID_Call
- func (_c *MetricsMock_SetOffchainAggregatorRoundID_Call) Run(...) *MetricsMock_SetOffchainAggregatorRoundID_Call
- func (_c *MetricsMock_SetOffchainAggregatorRoundID_Call) RunAndReturn(...) *MetricsMock_SetOffchainAggregatorRoundID_Call
- type MetricsMock_SetOffchainAggregatorSubmissionReceivedValues_Call
- func (_c *MetricsMock_SetOffchainAggregatorSubmissionReceivedValues_Call) Return() *MetricsMock_SetOffchainAggregatorSubmissionReceivedValues_Call
- func (_c *MetricsMock_SetOffchainAggregatorSubmissionReceivedValues_Call) Run(...) *MetricsMock_SetOffchainAggregatorSubmissionReceivedValues_Call
- func (_c *MetricsMock_SetOffchainAggregatorSubmissionReceivedValues_Call) RunAndReturn(...) *MetricsMock_SetOffchainAggregatorSubmissionReceivedValues_Call
- type Monitor
- type MultiFeedMonitor
- type NetworkMonitor
- type NetworkSourceFactory
- type NodeConfig
- type NodesParser
- type Pipeline
- type Poller
- type Producer
- type RDDData
- type Schema
- type SchemaRegistry
- type Source
- type SourceFactory
- type SourceFactoryMock
- type SourceFactoryMock_Expecter
- type SourceFactoryMock_GetType_Call
- type SourceFactoryMock_NewSource_Call
- func (_c *SourceFactoryMock_NewSource_Call) Return(_a0 Source, _a1 error) *SourceFactoryMock_NewSource_Call
- func (_c *SourceFactoryMock_NewSource_Call) Run(run func(chainConfig ChainConfig, feedConfig FeedConfig)) *SourceFactoryMock_NewSource_Call
- func (_c *SourceFactoryMock_NewSource_Call) RunAndReturn(run func(ChainConfig, FeedConfig) (Source, error)) *SourceFactoryMock_NewSource_Call
- type SourceMock
- type SourceMock_Expecter
- type SourceMock_Fetch_Call
- type TxResults
- type Updater
Constants ¶
This section is empty.
Variables ¶
var ( // Avro schemas to sync with the registry TransmissionAvroSchema string ConfigSetSimplifiedAvroSchema string )
var ( // ErrNoUpdate is an error value interpreted by a Poller to mean that the // Fetch() was successful but a new value was not found. // The pollers will not report this as an error! ErrNoUpdate = errors.New("no updates found") )
Functions ¶
func MakeConfigSetSimplifiedMapping ¶
func MakeConfigSetSimplifiedMapping( envelope Envelope, _ ChainConfig, feedConfig FeedConfig, ) (map[string]interface{}, error)
func MakeTransmissionMapping ¶
func MakeTransmissionMapping( envelope Envelope, chainConfig ChainConfig, feedConfig FeedConfig, ) (map[string]interface{}, error)
func SubjectFromTopic ¶
SubjectFromTopic computes the associated AVRO schema subject name from a kafka topic name.
Types ¶
type ChainConfig ¶
type ChainConfig interface { GetRPCEndpoint() string GetNetworkName() string GetNetworkID() string GetChainID() string GetReadTimeout() time.Duration GetPollInterval() time.Duration // Useful for serializing to avro. // Check the latest version of the transmission schema to see what the exact return format should be. ToMapping() map[string]interface{} }
ChainConfig contains chain-specific configuration. It is an interface so that implementations can add extra fields as long as they provide data from these methods which are required by the framework.
type ChainMetrics ¶
type ChainMetrics interface { SetNewFeedConfigsDetected(numFeeds float64) IncSendMessageToKafkaFailed(topic string) IncSendMessageToKafkaSucceeded(topic string) AddSendMessageToKafkaBytes(bytes float64, topic string) }
func NewChainMetrics ¶
func NewChainMetrics(chainConfig ChainConfig) ChainMetrics
type Envelope ¶
type Envelope struct { // latest transmission details ConfigDigest types.ConfigDigest Epoch uint32 Round uint8 LatestAnswer *big.Int LatestTimestamp time.Time // latest contract config ContractConfig types.ContractConfig // extra BlockNumber uint64 Transmitter types.Account LinkBalance *big.Int LinkAvailableForPayment *big.Int // The "fee coin" is different for each chain. JuelsPerFeeCoin *big.Int AggregatorRoundID uint32 }
Envelope contains data that is required from all the chain integrations. Integrators usually create an EnvelopeSource to produce Envelope instances.
type Exporter ¶
type Exporter interface { // Export is executed on each update on a monitored feed Export(ctx context.Context, data interface{}) // Cleanup is executed once a monitor for a specific feed is terminated. Cleanup(ctx context.Context) }
Exporter methods can be executed out of order and should be thread safe.
type ExporterFactory ¶
type ExporterFactory interface {
NewExporter(ExporterParams) (Exporter, error)
}
ExporterFactory is used to create a new exporter for each feed that needs to be monitored.
func NewKafkaExporterFactory ¶
func NewKafkaExporterFactory( log Logger, producer Producer, pipelines []Pipeline, ) (ExporterFactory, error)
NewKafkaExporterFactory produces Kafka exporters which consume, format and publish source outputs to kafka.
func NewPrometheusExporterFactory ¶
func NewPrometheusExporterFactory( log Logger, metrics Metrics, ) ExporterFactory
type ExporterFactoryMock ¶
ExporterFactoryMock is an autogenerated mock type for the ExporterFactory type
func NewExporterFactoryMock ¶
func NewExporterFactoryMock(t interface { mock.TestingT Cleanup(func()) }) *ExporterFactoryMock
NewExporterFactoryMock creates a new instance of ExporterFactoryMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*ExporterFactoryMock) EXPECT ¶
func (_m *ExporterFactoryMock) EXPECT() *ExporterFactoryMock_Expecter
func (*ExporterFactoryMock) NewExporter ¶
func (_m *ExporterFactoryMock) NewExporter(_a0 ExporterParams) (Exporter, error)
NewExporter provides a mock function with given fields: _a0
type ExporterFactoryMock_Expecter ¶
type ExporterFactoryMock_Expecter struct {
// contains filtered or unexported fields
}
func (*ExporterFactoryMock_Expecter) NewExporter ¶
func (_e *ExporterFactoryMock_Expecter) NewExporter(_a0 interface{}) *ExporterFactoryMock_NewExporter_Call
NewExporter is a helper method to define mock.On call
- _a0 ExporterParams
type ExporterFactoryMock_NewExporter_Call ¶
ExporterFactoryMock_NewExporter_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewExporter'
func (*ExporterFactoryMock_NewExporter_Call) Return ¶
func (_c *ExporterFactoryMock_NewExporter_Call) Return(_a0 Exporter, _a1 error) *ExporterFactoryMock_NewExporter_Call
func (*ExporterFactoryMock_NewExporter_Call) Run ¶
func (_c *ExporterFactoryMock_NewExporter_Call) Run(run func(_a0 ExporterParams)) *ExporterFactoryMock_NewExporter_Call
func (*ExporterFactoryMock_NewExporter_Call) RunAndReturn ¶
func (_c *ExporterFactoryMock_NewExporter_Call) RunAndReturn(run func(ExporterParams) (Exporter, error)) *ExporterFactoryMock_NewExporter_Call
type ExporterMock ¶
ExporterMock is an autogenerated mock type for the Exporter type
func NewExporterMock ¶
func NewExporterMock(t interface { mock.TestingT Cleanup(func()) }) *ExporterMock
NewExporterMock creates a new instance of ExporterMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*ExporterMock) Cleanup ¶
func (_m *ExporterMock) Cleanup(ctx context.Context)
Cleanup provides a mock function with given fields: ctx
func (*ExporterMock) EXPECT ¶
func (_m *ExporterMock) EXPECT() *ExporterMock_Expecter
func (*ExporterMock) Export ¶
func (_m *ExporterMock) Export(ctx context.Context, data interface{})
Export provides a mock function with given fields: ctx, data
type ExporterMock_Cleanup_Call ¶
ExporterMock_Cleanup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Cleanup'
func (*ExporterMock_Cleanup_Call) Return ¶
func (_c *ExporterMock_Cleanup_Call) Return() *ExporterMock_Cleanup_Call
func (*ExporterMock_Cleanup_Call) Run ¶
func (_c *ExporterMock_Cleanup_Call) Run(run func(ctx context.Context)) *ExporterMock_Cleanup_Call
func (*ExporterMock_Cleanup_Call) RunAndReturn ¶
func (_c *ExporterMock_Cleanup_Call) RunAndReturn(run func(context.Context)) *ExporterMock_Cleanup_Call
type ExporterMock_Expecter ¶
type ExporterMock_Expecter struct {
// contains filtered or unexported fields
}
func (*ExporterMock_Expecter) Cleanup ¶
func (_e *ExporterMock_Expecter) Cleanup(ctx interface{}) *ExporterMock_Cleanup_Call
Cleanup is a helper method to define mock.On call
- ctx context.Context
func (*ExporterMock_Expecter) Export ¶
func (_e *ExporterMock_Expecter) Export(ctx interface{}, data interface{}) *ExporterMock_Export_Call
Export is a helper method to define mock.On call
- ctx context.Context
- data interface{}
type ExporterMock_Export_Call ¶
ExporterMock_Export_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Export'
func (*ExporterMock_Export_Call) Return ¶
func (_c *ExporterMock_Export_Call) Return() *ExporterMock_Export_Call
func (*ExporterMock_Export_Call) Run ¶
func (_c *ExporterMock_Export_Call) Run(run func(ctx context.Context, data interface{})) *ExporterMock_Export_Call
func (*ExporterMock_Export_Call) RunAndReturn ¶
func (_c *ExporterMock_Export_Call) RunAndReturn(run func(context.Context, interface{})) *ExporterMock_Export_Call
type ExporterParams ¶
type ExporterParams struct { ChainConfig ChainConfig FeedConfig FeedConfig Nodes []NodeConfig }
type FeedConfig ¶
type FeedConfig interface { // This functions as a feed identifier. GetID() string GetName() string GetPath() string GetSymbol() string GetHeartbeatSec() int64 GetContractType() string GetContractStatus() string GetContractAddress() string GetContractAddressBytes() []byte // GetMultiply() returns the multiply parameter of a feed. // This is a misnomer kept for historical reasons. Multiply is used as divisor // for the big integers read from on-chain - think balances, observations, // etc. - into prometheus-friendly float64s. GetMultiply() *big.Int // ToMapping() is useful when encoding kafka messages. ToMapping() map[string]interface{} }
FeedConfig is the interface for feed configurations extracted from the RDD. Implementation can add more fields as needed, but this subset is required by the framework.
type FeedMetrics ¶
type FeedMetrics interface { IncFetchFromSourceFailed(sourceName string) IncFetchFromSourceSucceeded(sourceName string) ObserveFetchFromSourceDuraction(duration time.Duration, sourceName string) }
func NewFeedMetrics ¶
func NewFeedMetrics(chainConfig ChainConfig, feedConfig FeedConfig) FeedMetrics
type FeedMonitor ¶
func NewFeedMonitor ¶
func NewFeedMonitor( log Logger, pollers []Poller, exporters []Exporter, ) FeedMonitor
type FeedsParser ¶
type FeedsParser func(buf io.ReadCloser) ([]FeedConfig, error)
FeedParser is the interface for deserializing feed configuration data for each chain integration.
type HTTPServer ¶
HTTPServer is the HTTP interface exposed by every monitoring. It's used to export metrics to prometheus, to query the node for configurations, etc.
func NewHTTPServer ¶
func NewHTTPServer(stopCh services.StopRChan, addr string, log Logger) HTTPServer
type ManagedFunc ¶
type Manager ¶
type Manager interface { Run(backgroundCtx context.Context, managed ...ManagedFunc) HTTPHandler() http.Handler }
Manager restarts the multi-feed monitor whenever the feed configuration list has changed. In order to not be coupled with the MultiFeedMonitor component, it simply runs a function every time the feed configuration has changed. This is hooked up to the MultiFeedMonitor.Run method in the Monitor.
func NewManager ¶
type Mapper ¶
type Mapper func(Envelope, ChainConfig, FeedConfig) (map[string]interface{}, error)
Mapper is an interface for converting Envelopes into data structures that can be encoded in AVRO and sent to Kafka.
type Metrics ¶
type Metrics interface { SetHeadTrackerCurrentHead(blockNumber float64, networkName, chainID, networkID string) SetFeedContractMetadata(chainID, contractAddress, feedID, contractStatus, contractType, feedName, feedPath, networkID, networkName, symbol string) SetFeedContractLinkBalance(balance float64, contractAddress, feedID, chainID, contractStatus, contractType, feedName, feedPath, networkID, networkName string) SetLinkAvailableForPayment(amount float64, feedID, chainID, contractStatus, contractType, feedName, feedPath, networkID, networkName string) SetFeedContractTransactionsSucceeded(numSucceeded float64, contractAddress, feedID, chainID, contractStatus, contractType, feedName, feedPath, networkID, networkName string) SetFeedContractTransactionsFailed(numFailed float64, contractAddress, feedID, chainID, contractStatus, contractType, feedName, feedPath, networkID, networkName string) SetNodeMetadata(chainID, networkID, networkName, oracleName, sender string) // Deprecated: use SetOffchainAggregatorAnswers SetOffchainAggregatorAnswersRaw(answer float64, contractAddress, feedID, chainID, contractStatus, contractType, feedName, feedPath, networkID, networkName string) SetOffchainAggregatorAnswers(answer float64, contractAddress, feedID, chainID, contractStatus, contractType, feedName, feedPath, networkID, networkName string) IncOffchainAggregatorAnswersTotal(contractAddress, feedID, chainID, contractStatus, contractType, feedName, feedPath, networkID, networkName string) // Deprecated: use SetOffchainAggregatorJuelsPerFeeCoin SetOffchainAggregatorJuelsPerFeeCoinRaw(juelsPerFeeCoin float64, contractAddress, feedID, chainID, contractStatus, contractType, feedName, feedPath, networkID, networkName string) SetOffchainAggregatorJuelsPerFeeCoin(juelsPerFeeCoin float64, contractAddress, feedID, chainID, contractStatus, contractType, feedName, feedPath, networkID, networkName string) SetOffchainAggregatorSubmissionReceivedValues(value float64, contractAddress, feedID, sender, chainID, contractStatus, contractType, feedName, feedPath, networkID, networkName string) SetOffchainAggregatorJuelsPerFeeCoinReceivedValues(value float64, contractAddress, feedID, sender, chainID, contractStatus, contractType, feedName, feedPath, networkID, networkName string) SetOffchainAggregatorAnswerStalled(isSet bool, contractAddress, feedID, chainID, contractStatus, contractType, feedName, feedPath, networkID, networkName string) SetOffchainAggregatorRoundID(aggregatorRoundID float64, contractAddress, feedID, chainID, contractStatus, contractType, feedName, feedPath, networkID, networkName string) // Cleanup deletes all the metrics Cleanup(networkName, networkID, chainID, oracleName, sender, feedName, feedPath, symbol, contractType, contractStatus, contractAddress, feedID string) // Exposes the accumulated metrics to HTTP in the prometheus format, ready for scraping. HTTPHandler() http.Handler }
Metrics is a thin interface on top of the prometheus API. As such there should be little logic in the implementation of these methods.
func NewMetrics ¶
type MetricsMock ¶
MetricsMock is an autogenerated mock type for the Metrics type
func NewMetricsMock ¶
func NewMetricsMock(t interface { mock.TestingT Cleanup(func()) }) *MetricsMock
NewMetricsMock creates a new instance of MetricsMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MetricsMock) Cleanup ¶
func (_m *MetricsMock) Cleanup(networkName string, networkID string, chainID string, oracleName string, sender string, feedName string, feedPath string, symbol string, contractType string, contractStatus string, contractAddress string, feedID string)
Cleanup provides a mock function with given fields: networkName, networkID, chainID, oracleName, sender, feedName, feedPath, symbol, contractType, contractStatus, contractAddress, feedID
func (*MetricsMock) EXPECT ¶
func (_m *MetricsMock) EXPECT() *MetricsMock_Expecter
func (*MetricsMock) HTTPHandler ¶
func (_m *MetricsMock) HTTPHandler() http.Handler
HTTPHandler provides a mock function with given fields:
func (*MetricsMock) IncOffchainAggregatorAnswersTotal ¶
func (_m *MetricsMock) IncOffchainAggregatorAnswersTotal(contractAddress string, feedID string, chainID string, contractStatus string, contractType string, feedName string, feedPath string, networkID string, networkName string)
IncOffchainAggregatorAnswersTotal provides a mock function with given fields: contractAddress, feedID, chainID, contractStatus, contractType, feedName, feedPath, networkID, networkName
func (*MetricsMock) SetFeedContractLinkBalance ¶
func (_m *MetricsMock) SetFeedContractLinkBalance(balance float64, contractAddress string, feedID string, chainID string, contractStatus string, contractType string, feedName string, feedPath string, networkID string, networkName string)
SetFeedContractLinkBalance provides a mock function with given fields: balance, contractAddress, feedID, chainID, contractStatus, contractType, feedName, feedPath, networkID, networkName
func (*MetricsMock) SetFeedContractMetadata ¶
func (_m *MetricsMock) SetFeedContractMetadata(chainID string, contractAddress string, feedID string, contractStatus string, contractType string, feedName string, feedPath string, networkID string, networkName string, symbol string)
SetFeedContractMetadata provides a mock function with given fields: chainID, contractAddress, feedID, contractStatus, contractType, feedName, feedPath, networkID, networkName, symbol
func (*MetricsMock) SetFeedContractTransactionsFailed ¶
func (_m *MetricsMock) SetFeedContractTransactionsFailed(numFailed float64, contractAddress string, feedID string, chainID string, contractStatus string, contractType string, feedName string, feedPath string, networkID string, networkName string)
SetFeedContractTransactionsFailed provides a mock function with given fields: numFailed, contractAddress, feedID, chainID, contractStatus, contractType, feedName, feedPath, networkID, networkName
func (*MetricsMock) SetFeedContractTransactionsSucceeded ¶
func (_m *MetricsMock) SetFeedContractTransactionsSucceeded(numSucceeded float64, contractAddress string, feedID string, chainID string, contractStatus string, contractType string, feedName string, feedPath string, networkID string, networkName string)
SetFeedContractTransactionsSucceeded provides a mock function with given fields: numSucceeded, contractAddress, feedID, chainID, contractStatus, contractType, feedName, feedPath, networkID, networkName
func (*MetricsMock) SetHeadTrackerCurrentHead ¶
func (_m *MetricsMock) SetHeadTrackerCurrentHead(blockNumber float64, networkName string, chainID string, networkID string)
SetHeadTrackerCurrentHead provides a mock function with given fields: blockNumber, networkName, chainID, networkID
func (*MetricsMock) SetLinkAvailableForPayment ¶
func (_m *MetricsMock) SetLinkAvailableForPayment(amount float64, feedID string, chainID string, contractStatus string, contractType string, feedName string, feedPath string, networkID string, networkName string)
SetLinkAvailableForPayment provides a mock function with given fields: amount, feedID, chainID, contractStatus, contractType, feedName, feedPath, networkID, networkName
func (*MetricsMock) SetNodeMetadata ¶
func (_m *MetricsMock) SetNodeMetadata(chainID string, networkID string, networkName string, oracleName string, sender string)
SetNodeMetadata provides a mock function with given fields: chainID, networkID, networkName, oracleName, sender
func (*MetricsMock) SetOffchainAggregatorAnswerStalled ¶
func (_m *MetricsMock) SetOffchainAggregatorAnswerStalled(isSet bool, contractAddress string, feedID string, chainID string, contractStatus string, contractType string, feedName string, feedPath string, networkID string, networkName string)
SetOffchainAggregatorAnswerStalled provides a mock function with given fields: isSet, contractAddress, feedID, chainID, contractStatus, contractType, feedName, feedPath, networkID, networkName
func (*MetricsMock) SetOffchainAggregatorAnswers ¶
func (_m *MetricsMock) SetOffchainAggregatorAnswers(answer float64, contractAddress string, feedID string, chainID string, contractStatus string, contractType string, feedName string, feedPath string, networkID string, networkName string)
SetOffchainAggregatorAnswers provides a mock function with given fields: answer, contractAddress, feedID, chainID, contractStatus, contractType, feedName, feedPath, networkID, networkName
func (*MetricsMock) SetOffchainAggregatorAnswersRaw ¶
func (_m *MetricsMock) SetOffchainAggregatorAnswersRaw(answer float64, contractAddress string, feedID string, chainID string, contractStatus string, contractType string, feedName string, feedPath string, networkID string, networkName string)
SetOffchainAggregatorAnswersRaw provides a mock function with given fields: answer, contractAddress, feedID, chainID, contractStatus, contractType, feedName, feedPath, networkID, networkName
func (*MetricsMock) SetOffchainAggregatorJuelsPerFeeCoin ¶
func (_m *MetricsMock) SetOffchainAggregatorJuelsPerFeeCoin(juelsPerFeeCoin float64, contractAddress string, feedID string, chainID string, contractStatus string, contractType string, feedName string, feedPath string, networkID string, networkName string)
SetOffchainAggregatorJuelsPerFeeCoin provides a mock function with given fields: juelsPerFeeCoin, contractAddress, feedID, chainID, contractStatus, contractType, feedName, feedPath, networkID, networkName
func (*MetricsMock) SetOffchainAggregatorJuelsPerFeeCoinRaw ¶
func (_m *MetricsMock) SetOffchainAggregatorJuelsPerFeeCoinRaw(juelsPerFeeCoin float64, contractAddress string, feedID string, chainID string, contractStatus string, contractType string, feedName string, feedPath string, networkID string, networkName string)
SetOffchainAggregatorJuelsPerFeeCoinRaw provides a mock function with given fields: juelsPerFeeCoin, contractAddress, feedID, chainID, contractStatus, contractType, feedName, feedPath, networkID, networkName
func (*MetricsMock) SetOffchainAggregatorJuelsPerFeeCoinReceivedValues ¶
func (_m *MetricsMock) SetOffchainAggregatorJuelsPerFeeCoinReceivedValues(value float64, contractAddress string, feedID string, sender string, chainID string, contractStatus string, contractType string, feedName string, feedPath string, networkID string, networkName string)
SetOffchainAggregatorJuelsPerFeeCoinReceivedValues provides a mock function with given fields: value, contractAddress, feedID, sender, chainID, contractStatus, contractType, feedName, feedPath, networkID, networkName
func (*MetricsMock) SetOffchainAggregatorRoundID ¶
func (_m *MetricsMock) SetOffchainAggregatorRoundID(aggregatorRoundID float64, contractAddress string, feedID string, chainID string, contractStatus string, contractType string, feedName string, feedPath string, networkID string, networkName string)
SetOffchainAggregatorRoundID provides a mock function with given fields: aggregatorRoundID, contractAddress, feedID, chainID, contractStatus, contractType, feedName, feedPath, networkID, networkName
func (*MetricsMock) SetOffchainAggregatorSubmissionReceivedValues ¶
func (_m *MetricsMock) SetOffchainAggregatorSubmissionReceivedValues(value float64, contractAddress string, feedID string, sender string, chainID string, contractStatus string, contractType string, feedName string, feedPath string, networkID string, networkName string)
SetOffchainAggregatorSubmissionReceivedValues provides a mock function with given fields: value, contractAddress, feedID, sender, chainID, contractStatus, contractType, feedName, feedPath, networkID, networkName
type MetricsMock_Cleanup_Call ¶
MetricsMock_Cleanup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Cleanup'
func (*MetricsMock_Cleanup_Call) Return ¶
func (_c *MetricsMock_Cleanup_Call) Return() *MetricsMock_Cleanup_Call
type MetricsMock_Expecter ¶
type MetricsMock_Expecter struct {
// contains filtered or unexported fields
}
func (*MetricsMock_Expecter) Cleanup ¶
func (_e *MetricsMock_Expecter) Cleanup(networkName interface{}, networkID interface{}, chainID interface{}, oracleName interface{}, sender interface{}, feedName interface{}, feedPath interface{}, symbol interface{}, contractType interface{}, contractStatus interface{}, contractAddress interface{}, feedID interface{}) *MetricsMock_Cleanup_Call
Cleanup is a helper method to define mock.On call
- networkName string
- networkID string
- chainID string
- oracleName string
- sender string
- feedName string
- feedPath string
- symbol string
- contractType string
- contractStatus string
- contractAddress string
- feedID string
func (*MetricsMock_Expecter) HTTPHandler ¶
func (_e *MetricsMock_Expecter) HTTPHandler() *MetricsMock_HTTPHandler_Call
HTTPHandler is a helper method to define mock.On call
func (*MetricsMock_Expecter) IncOffchainAggregatorAnswersTotal ¶
func (_e *MetricsMock_Expecter) IncOffchainAggregatorAnswersTotal(contractAddress interface{}, feedID interface{}, chainID interface{}, contractStatus interface{}, contractType interface{}, feedName interface{}, feedPath interface{}, networkID interface{}, networkName interface{}) *MetricsMock_IncOffchainAggregatorAnswersTotal_Call
IncOffchainAggregatorAnswersTotal is a helper method to define mock.On call
- contractAddress string
- feedID string
- chainID string
- contractStatus string
- contractType string
- feedName string
- feedPath string
- networkID string
- networkName string
func (*MetricsMock_Expecter) SetFeedContractLinkBalance ¶
func (_e *MetricsMock_Expecter) SetFeedContractLinkBalance(balance interface{}, contractAddress interface{}, feedID interface{}, chainID interface{}, contractStatus interface{}, contractType interface{}, feedName interface{}, feedPath interface{}, networkID interface{}, networkName interface{}) *MetricsMock_SetFeedContractLinkBalance_Call
SetFeedContractLinkBalance is a helper method to define mock.On call
- balance float64
- contractAddress string
- feedID string
- chainID string
- contractStatus string
- contractType string
- feedName string
- feedPath string
- networkID string
- networkName string
func (*MetricsMock_Expecter) SetFeedContractMetadata ¶
func (_e *MetricsMock_Expecter) SetFeedContractMetadata(chainID interface{}, contractAddress interface{}, feedID interface{}, contractStatus interface{}, contractType interface{}, feedName interface{}, feedPath interface{}, networkID interface{}, networkName interface{}, symbol interface{}) *MetricsMock_SetFeedContractMetadata_Call
SetFeedContractMetadata is a helper method to define mock.On call
- chainID string
- contractAddress string
- feedID string
- contractStatus string
- contractType string
- feedName string
- feedPath string
- networkID string
- networkName string
- symbol string
func (*MetricsMock_Expecter) SetFeedContractTransactionsFailed ¶
func (_e *MetricsMock_Expecter) SetFeedContractTransactionsFailed(numFailed interface{}, contractAddress interface{}, feedID interface{}, chainID interface{}, contractStatus interface{}, contractType interface{}, feedName interface{}, feedPath interface{}, networkID interface{}, networkName interface{}) *MetricsMock_SetFeedContractTransactionsFailed_Call
SetFeedContractTransactionsFailed is a helper method to define mock.On call
- numFailed float64
- contractAddress string
- feedID string
- chainID string
- contractStatus string
- contractType string
- feedName string
- feedPath string
- networkID string
- networkName string
func (*MetricsMock_Expecter) SetFeedContractTransactionsSucceeded ¶
func (_e *MetricsMock_Expecter) SetFeedContractTransactionsSucceeded(numSucceeded interface{}, contractAddress interface{}, feedID interface{}, chainID interface{}, contractStatus interface{}, contractType interface{}, feedName interface{}, feedPath interface{}, networkID interface{}, networkName interface{}) *MetricsMock_SetFeedContractTransactionsSucceeded_Call
SetFeedContractTransactionsSucceeded is a helper method to define mock.On call
- numSucceeded float64
- contractAddress string
- feedID string
- chainID string
- contractStatus string
- contractType string
- feedName string
- feedPath string
- networkID string
- networkName string
func (*MetricsMock_Expecter) SetHeadTrackerCurrentHead ¶
func (_e *MetricsMock_Expecter) SetHeadTrackerCurrentHead(blockNumber interface{}, networkName interface{}, chainID interface{}, networkID interface{}) *MetricsMock_SetHeadTrackerCurrentHead_Call
SetHeadTrackerCurrentHead is a helper method to define mock.On call
- blockNumber float64
- networkName string
- chainID string
- networkID string
func (*MetricsMock_Expecter) SetLinkAvailableForPayment ¶
func (_e *MetricsMock_Expecter) SetLinkAvailableForPayment(amount interface{}, feedID interface{}, chainID interface{}, contractStatus interface{}, contractType interface{}, feedName interface{}, feedPath interface{}, networkID interface{}, networkName interface{}) *MetricsMock_SetLinkAvailableForPayment_Call
SetLinkAvailableForPayment is a helper method to define mock.On call
- amount float64
- feedID string
- chainID string
- contractStatus string
- contractType string
- feedName string
- feedPath string
- networkID string
- networkName string
func (*MetricsMock_Expecter) SetNodeMetadata ¶
func (_e *MetricsMock_Expecter) SetNodeMetadata(chainID interface{}, networkID interface{}, networkName interface{}, oracleName interface{}, sender interface{}) *MetricsMock_SetNodeMetadata_Call
SetNodeMetadata is a helper method to define mock.On call
- chainID string
- networkID string
- networkName string
- oracleName string
- sender string
func (*MetricsMock_Expecter) SetOffchainAggregatorAnswerStalled ¶
func (_e *MetricsMock_Expecter) SetOffchainAggregatorAnswerStalled(isSet interface{}, contractAddress interface{}, feedID interface{}, chainID interface{}, contractStatus interface{}, contractType interface{}, feedName interface{}, feedPath interface{}, networkID interface{}, networkName interface{}) *MetricsMock_SetOffchainAggregatorAnswerStalled_Call
SetOffchainAggregatorAnswerStalled is a helper method to define mock.On call
- isSet bool
- contractAddress string
- feedID string
- chainID string
- contractStatus string
- contractType string
- feedName string
- feedPath string
- networkID string
- networkName string
func (*MetricsMock_Expecter) SetOffchainAggregatorAnswers ¶
func (_e *MetricsMock_Expecter) SetOffchainAggregatorAnswers(answer interface{}, contractAddress interface{}, feedID interface{}, chainID interface{}, contractStatus interface{}, contractType interface{}, feedName interface{}, feedPath interface{}, networkID interface{}, networkName interface{}) *MetricsMock_SetOffchainAggregatorAnswers_Call
SetOffchainAggregatorAnswers is a helper method to define mock.On call
- answer float64
- contractAddress string
- feedID string
- chainID string
- contractStatus string
- contractType string
- feedName string
- feedPath string
- networkID string
- networkName string
func (*MetricsMock_Expecter) SetOffchainAggregatorAnswersRaw ¶
func (_e *MetricsMock_Expecter) SetOffchainAggregatorAnswersRaw(answer interface{}, contractAddress interface{}, feedID interface{}, chainID interface{}, contractStatus interface{}, contractType interface{}, feedName interface{}, feedPath interface{}, networkID interface{}, networkName interface{}) *MetricsMock_SetOffchainAggregatorAnswersRaw_Call
SetOffchainAggregatorAnswersRaw is a helper method to define mock.On call
- answer float64
- contractAddress string
- feedID string
- chainID string
- contractStatus string
- contractType string
- feedName string
- feedPath string
- networkID string
- networkName string
func (*MetricsMock_Expecter) SetOffchainAggregatorJuelsPerFeeCoin ¶
func (_e *MetricsMock_Expecter) SetOffchainAggregatorJuelsPerFeeCoin(juelsPerFeeCoin interface{}, contractAddress interface{}, feedID interface{}, chainID interface{}, contractStatus interface{}, contractType interface{}, feedName interface{}, feedPath interface{}, networkID interface{}, networkName interface{}) *MetricsMock_SetOffchainAggregatorJuelsPerFeeCoin_Call
SetOffchainAggregatorJuelsPerFeeCoin is a helper method to define mock.On call
- juelsPerFeeCoin float64
- contractAddress string
- feedID string
- chainID string
- contractStatus string
- contractType string
- feedName string
- feedPath string
- networkID string
- networkName string
func (*MetricsMock_Expecter) SetOffchainAggregatorJuelsPerFeeCoinRaw ¶
func (_e *MetricsMock_Expecter) SetOffchainAggregatorJuelsPerFeeCoinRaw(juelsPerFeeCoin interface{}, contractAddress interface{}, feedID interface{}, chainID interface{}, contractStatus interface{}, contractType interface{}, feedName interface{}, feedPath interface{}, networkID interface{}, networkName interface{}) *MetricsMock_SetOffchainAggregatorJuelsPerFeeCoinRaw_Call
SetOffchainAggregatorJuelsPerFeeCoinRaw is a helper method to define mock.On call
- juelsPerFeeCoin float64
- contractAddress string
- feedID string
- chainID string
- contractStatus string
- contractType string
- feedName string
- feedPath string
- networkID string
- networkName string
func (*MetricsMock_Expecter) SetOffchainAggregatorJuelsPerFeeCoinReceivedValues ¶
func (_e *MetricsMock_Expecter) SetOffchainAggregatorJuelsPerFeeCoinReceivedValues(value interface{}, contractAddress interface{}, feedID interface{}, sender interface{}, chainID interface{}, contractStatus interface{}, contractType interface{}, feedName interface{}, feedPath interface{}, networkID interface{}, networkName interface{}) *MetricsMock_SetOffchainAggregatorJuelsPerFeeCoinReceivedValues_Call
SetOffchainAggregatorJuelsPerFeeCoinReceivedValues is a helper method to define mock.On call
- value float64
- contractAddress string
- feedID string
- sender string
- chainID string
- contractStatus string
- contractType string
- feedName string
- feedPath string
- networkID string
- networkName string
func (*MetricsMock_Expecter) SetOffchainAggregatorRoundID ¶
func (_e *MetricsMock_Expecter) SetOffchainAggregatorRoundID(aggregatorRoundID interface{}, contractAddress interface{}, feedID interface{}, chainID interface{}, contractStatus interface{}, contractType interface{}, feedName interface{}, feedPath interface{}, networkID interface{}, networkName interface{}) *MetricsMock_SetOffchainAggregatorRoundID_Call
SetOffchainAggregatorRoundID is a helper method to define mock.On call
- aggregatorRoundID float64
- contractAddress string
- feedID string
- chainID string
- contractStatus string
- contractType string
- feedName string
- feedPath string
- networkID string
- networkName string
func (*MetricsMock_Expecter) SetOffchainAggregatorSubmissionReceivedValues ¶
func (_e *MetricsMock_Expecter) SetOffchainAggregatorSubmissionReceivedValues(value interface{}, contractAddress interface{}, feedID interface{}, sender interface{}, chainID interface{}, contractStatus interface{}, contractType interface{}, feedName interface{}, feedPath interface{}, networkID interface{}, networkName interface{}) *MetricsMock_SetOffchainAggregatorSubmissionReceivedValues_Call
SetOffchainAggregatorSubmissionReceivedValues is a helper method to define mock.On call
- value float64
- contractAddress string
- feedID string
- sender string
- chainID string
- contractStatus string
- contractType string
- feedName string
- feedPath string
- networkID string
- networkName string
type MetricsMock_HTTPHandler_Call ¶
MetricsMock_HTTPHandler_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HTTPHandler'
func (*MetricsMock_HTTPHandler_Call) Return ¶
func (_c *MetricsMock_HTTPHandler_Call) Return(_a0 http.Handler) *MetricsMock_HTTPHandler_Call
func (*MetricsMock_HTTPHandler_Call) Run ¶
func (_c *MetricsMock_HTTPHandler_Call) Run(run func()) *MetricsMock_HTTPHandler_Call
func (*MetricsMock_HTTPHandler_Call) RunAndReturn ¶
func (_c *MetricsMock_HTTPHandler_Call) RunAndReturn(run func() http.Handler) *MetricsMock_HTTPHandler_Call
type MetricsMock_IncOffchainAggregatorAnswersTotal_Call ¶
MetricsMock_IncOffchainAggregatorAnswersTotal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IncOffchainAggregatorAnswersTotal'
func (*MetricsMock_IncOffchainAggregatorAnswersTotal_Call) RunAndReturn ¶
type MetricsMock_SetFeedContractLinkBalance_Call ¶
MetricsMock_SetFeedContractLinkBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFeedContractLinkBalance'
func (*MetricsMock_SetFeedContractLinkBalance_Call) Return ¶
func (_c *MetricsMock_SetFeedContractLinkBalance_Call) Return() *MetricsMock_SetFeedContractLinkBalance_Call
func (*MetricsMock_SetFeedContractLinkBalance_Call) Run ¶
func (_c *MetricsMock_SetFeedContractLinkBalance_Call) Run(run func(balance float64, contractAddress string, feedID string, chainID string, contractStatus string, contractType string, feedName string, feedPath string, networkID string, networkName string)) *MetricsMock_SetFeedContractLinkBalance_Call
func (*MetricsMock_SetFeedContractLinkBalance_Call) RunAndReturn ¶
type MetricsMock_SetFeedContractMetadata_Call ¶
MetricsMock_SetFeedContractMetadata_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFeedContractMetadata'
func (*MetricsMock_SetFeedContractMetadata_Call) Return ¶
func (_c *MetricsMock_SetFeedContractMetadata_Call) Return() *MetricsMock_SetFeedContractMetadata_Call
func (*MetricsMock_SetFeedContractMetadata_Call) RunAndReturn ¶
type MetricsMock_SetFeedContractTransactionsFailed_Call ¶
MetricsMock_SetFeedContractTransactionsFailed_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFeedContractTransactionsFailed'
func (*MetricsMock_SetFeedContractTransactionsFailed_Call) Run ¶
func (_c *MetricsMock_SetFeedContractTransactionsFailed_Call) Run(run func(numFailed float64, contractAddress string, feedID string, chainID string, contractStatus string, contractType string, feedName string, feedPath string, networkID string, networkName string)) *MetricsMock_SetFeedContractTransactionsFailed_Call
func (*MetricsMock_SetFeedContractTransactionsFailed_Call) RunAndReturn ¶
type MetricsMock_SetFeedContractTransactionsSucceeded_Call ¶
MetricsMock_SetFeedContractTransactionsSucceeded_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFeedContractTransactionsSucceeded'
func (*MetricsMock_SetFeedContractTransactionsSucceeded_Call) Run ¶
func (_c *MetricsMock_SetFeedContractTransactionsSucceeded_Call) Run(run func(numSucceeded float64, contractAddress string, feedID string, chainID string, contractStatus string, contractType string, feedName string, feedPath string, networkID string, networkName string)) *MetricsMock_SetFeedContractTransactionsSucceeded_Call
func (*MetricsMock_SetFeedContractTransactionsSucceeded_Call) RunAndReturn ¶
type MetricsMock_SetHeadTrackerCurrentHead_Call ¶
MetricsMock_SetHeadTrackerCurrentHead_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHeadTrackerCurrentHead'
func (*MetricsMock_SetHeadTrackerCurrentHead_Call) Return ¶
func (_c *MetricsMock_SetHeadTrackerCurrentHead_Call) Return() *MetricsMock_SetHeadTrackerCurrentHead_Call
func (*MetricsMock_SetHeadTrackerCurrentHead_Call) Run ¶
func (_c *MetricsMock_SetHeadTrackerCurrentHead_Call) Run(run func(blockNumber float64, networkName string, chainID string, networkID string)) *MetricsMock_SetHeadTrackerCurrentHead_Call
func (*MetricsMock_SetHeadTrackerCurrentHead_Call) RunAndReturn ¶
func (_c *MetricsMock_SetHeadTrackerCurrentHead_Call) RunAndReturn(run func(float64, string, string, string)) *MetricsMock_SetHeadTrackerCurrentHead_Call
type MetricsMock_SetLinkAvailableForPayment_Call ¶
MetricsMock_SetLinkAvailableForPayment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetLinkAvailableForPayment'
func (*MetricsMock_SetLinkAvailableForPayment_Call) Return ¶
func (_c *MetricsMock_SetLinkAvailableForPayment_Call) Return() *MetricsMock_SetLinkAvailableForPayment_Call
func (*MetricsMock_SetLinkAvailableForPayment_Call) RunAndReturn ¶
type MetricsMock_SetNodeMetadata_Call ¶
MetricsMock_SetNodeMetadata_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetNodeMetadata'
func (*MetricsMock_SetNodeMetadata_Call) Return ¶
func (_c *MetricsMock_SetNodeMetadata_Call) Return() *MetricsMock_SetNodeMetadata_Call
func (*MetricsMock_SetNodeMetadata_Call) Run ¶
func (_c *MetricsMock_SetNodeMetadata_Call) Run(run func(chainID string, networkID string, networkName string, oracleName string, sender string)) *MetricsMock_SetNodeMetadata_Call
func (*MetricsMock_SetNodeMetadata_Call) RunAndReturn ¶
func (_c *MetricsMock_SetNodeMetadata_Call) RunAndReturn(run func(string, string, string, string, string)) *MetricsMock_SetNodeMetadata_Call
type MetricsMock_SetOffchainAggregatorAnswerStalled_Call ¶
MetricsMock_SetOffchainAggregatorAnswerStalled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetOffchainAggregatorAnswerStalled'
func (*MetricsMock_SetOffchainAggregatorAnswerStalled_Call) Run ¶
func (_c *MetricsMock_SetOffchainAggregatorAnswerStalled_Call) Run(run func(isSet bool, contractAddress string, feedID string, chainID string, contractStatus string, contractType string, feedName string, feedPath string, networkID string, networkName string)) *MetricsMock_SetOffchainAggregatorAnswerStalled_Call
func (*MetricsMock_SetOffchainAggregatorAnswerStalled_Call) RunAndReturn ¶
type MetricsMock_SetOffchainAggregatorAnswersRaw_Call ¶
MetricsMock_SetOffchainAggregatorAnswersRaw_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetOffchainAggregatorAnswersRaw'
func (*MetricsMock_SetOffchainAggregatorAnswersRaw_Call) Run ¶
func (_c *MetricsMock_SetOffchainAggregatorAnswersRaw_Call) Run(run func(answer float64, contractAddress string, feedID string, chainID string, contractStatus string, contractType string, feedName string, feedPath string, networkID string, networkName string)) *MetricsMock_SetOffchainAggregatorAnswersRaw_Call
func (*MetricsMock_SetOffchainAggregatorAnswersRaw_Call) RunAndReturn ¶
type MetricsMock_SetOffchainAggregatorAnswers_Call ¶
MetricsMock_SetOffchainAggregatorAnswers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetOffchainAggregatorAnswers'
func (*MetricsMock_SetOffchainAggregatorAnswers_Call) Run ¶
func (_c *MetricsMock_SetOffchainAggregatorAnswers_Call) Run(run func(answer float64, contractAddress string, feedID string, chainID string, contractStatus string, contractType string, feedName string, feedPath string, networkID string, networkName string)) *MetricsMock_SetOffchainAggregatorAnswers_Call
func (*MetricsMock_SetOffchainAggregatorAnswers_Call) RunAndReturn ¶
type MetricsMock_SetOffchainAggregatorJuelsPerFeeCoinRaw_Call ¶
MetricsMock_SetOffchainAggregatorJuelsPerFeeCoinRaw_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetOffchainAggregatorJuelsPerFeeCoinRaw'
func (*MetricsMock_SetOffchainAggregatorJuelsPerFeeCoinRaw_Call) Run ¶
func (_c *MetricsMock_SetOffchainAggregatorJuelsPerFeeCoinRaw_Call) Run(run func(juelsPerFeeCoin float64, contractAddress string, feedID string, chainID string, contractStatus string, contractType string, feedName string, feedPath string, networkID string, networkName string)) *MetricsMock_SetOffchainAggregatorJuelsPerFeeCoinRaw_Call
func (*MetricsMock_SetOffchainAggregatorJuelsPerFeeCoinRaw_Call) RunAndReturn ¶
type MetricsMock_SetOffchainAggregatorJuelsPerFeeCoinReceivedValues_Call ¶
MetricsMock_SetOffchainAggregatorJuelsPerFeeCoinReceivedValues_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetOffchainAggregatorJuelsPerFeeCoinReceivedValues'
func (*MetricsMock_SetOffchainAggregatorJuelsPerFeeCoinReceivedValues_Call) Run ¶
func (_c *MetricsMock_SetOffchainAggregatorJuelsPerFeeCoinReceivedValues_Call) Run(run func(value float64, contractAddress string, feedID string, sender string, chainID string, contractStatus string, contractType string, feedName string, feedPath string, networkID string, networkName string)) *MetricsMock_SetOffchainAggregatorJuelsPerFeeCoinReceivedValues_Call
func (*MetricsMock_SetOffchainAggregatorJuelsPerFeeCoinReceivedValues_Call) RunAndReturn ¶
type MetricsMock_SetOffchainAggregatorJuelsPerFeeCoin_Call ¶
MetricsMock_SetOffchainAggregatorJuelsPerFeeCoin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetOffchainAggregatorJuelsPerFeeCoin'
func (*MetricsMock_SetOffchainAggregatorJuelsPerFeeCoin_Call) Run ¶
func (_c *MetricsMock_SetOffchainAggregatorJuelsPerFeeCoin_Call) Run(run func(juelsPerFeeCoin float64, contractAddress string, feedID string, chainID string, contractStatus string, contractType string, feedName string, feedPath string, networkID string, networkName string)) *MetricsMock_SetOffchainAggregatorJuelsPerFeeCoin_Call
func (*MetricsMock_SetOffchainAggregatorJuelsPerFeeCoin_Call) RunAndReturn ¶
type MetricsMock_SetOffchainAggregatorRoundID_Call ¶
MetricsMock_SetOffchainAggregatorRoundID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetOffchainAggregatorRoundID'
func (*MetricsMock_SetOffchainAggregatorRoundID_Call) Run ¶
func (_c *MetricsMock_SetOffchainAggregatorRoundID_Call) Run(run func(aggregatorRoundID float64, contractAddress string, feedID string, chainID string, contractStatus string, contractType string, feedName string, feedPath string, networkID string, networkName string)) *MetricsMock_SetOffchainAggregatorRoundID_Call
func (*MetricsMock_SetOffchainAggregatorRoundID_Call) RunAndReturn ¶
type MetricsMock_SetOffchainAggregatorSubmissionReceivedValues_Call ¶
MetricsMock_SetOffchainAggregatorSubmissionReceivedValues_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetOffchainAggregatorSubmissionReceivedValues'
func (*MetricsMock_SetOffchainAggregatorSubmissionReceivedValues_Call) Run ¶
func (_c *MetricsMock_SetOffchainAggregatorSubmissionReceivedValues_Call) Run(run func(value float64, contractAddress string, feedID string, sender string, chainID string, contractStatus string, contractType string, feedName string, feedPath string, networkID string, networkName string)) *MetricsMock_SetOffchainAggregatorSubmissionReceivedValues_Call
func (*MetricsMock_SetOffchainAggregatorSubmissionReceivedValues_Call) RunAndReturn ¶
type Monitor ¶
type Monitor struct { StopCh services.StopRChan ChainConfig ChainConfig Config config.Config Log Logger Producer Producer Metrics Metrics ChainMetrics ChainMetrics SchemaRegistry SchemaRegistry // per-feed SourceFactories []SourceFactory ExporterFactories []ExporterFactory // single (network level, default empty) NetworkSourceFactories []NetworkSourceFactory NetworkExporterFactories []ExporterFactory RDDSource Source RDDPoller Poller Manager Manager HTTPServer HTTPServer }
Monitor is the entrypoint for an on-chain monitor integration. Monitors should only be created via NewMonitor()
func NewMonitor ¶
func NewMonitor( stopCh services.StopRChan, log Logger, chainConfig ChainConfig, envelopeSourceFactory SourceFactory, txResultsSourceFactory SourceFactory, feedsParser FeedsParser, nodesParser NodesParser, ) (*Monitor, error)
NewMonitor builds a new Monitor instance using dependency injection. If advanced configurations of the Monitor are required - for instance, adding a custom third party service to send data to - this method should provide a good starting template to do that.
type MultiFeedMonitor ¶
MultiFeedMonitor manages the flow of data from multiple sources to multiple exporters for each feed in the configuration.
func NewMultiFeedMonitor ¶
func NewMultiFeedMonitor( chainConfig ChainConfig, log Logger, sourceFactories []SourceFactory, exporterFactories []ExporterFactory, bufferCapacity uint32, ) MultiFeedMonitor
type NetworkMonitor ¶
NetworkMOnitor manages the flow of data from sources to exporters for non-feed-specific metrics (blockheight, balances, etc)
func NewNetworkMonitor ¶
func NewNetworkMonitor( chainConfig ChainConfig, log Logger, sourceFactories []NetworkSourceFactory, exporterFactories []ExporterFactory, bufferCapacity uint32, ) NetworkMonitor
type NetworkSourceFactory ¶
type NetworkSourceFactory interface { NewSource(chainConfig ChainConfig, nodeConfig []NodeConfig) (Source, error) GetType() string }
type NodeConfig ¶
NodeConfig is the subset of on-chain node operator's configuration required by the OM framework.
type NodesParser ¶
type NodesParser func(buf io.ReadCloser) ([]NodeConfig, error)
NodesParser extracts multiple nodes' configurations from the configuration server, eg. weiwatchers.com
type Pipeline ¶
Pipeline represents a succession of transformations on the data coming from a source: source output -> adapt to a map -> encode to AVRO -> send to Kafka
type Poller ¶
type Poller interface { Updater // Poller is just another name for updater. }
Poller implements Updater by periodically invoking a Source's Fetch() method.
func NewSourcePoller ¶
func NewSourcePoller( source Source, log Logger, pollInterval time.Duration, fetchTimeout time.Duration, bufferCapacity uint32, ) Poller
NewSourcePoller builds Pollers for Sources. If the Source's Fetch() returns an error it will be reported. If it panics, the panic will be recovered and reported as an error and the program will resume operation. If the error is ErrNoUpdate, it will not be reported and the Poller will skip this round.
type Producer ¶
Producer is an abstraction on top of Kafka to aid with tests.
func NewInstrumentedProducer ¶
func NewInstrumentedProducer(producer Producer, chainMetrics ChainMetrics) Producer
type RDDData ¶
type RDDData struct { Feeds []FeedConfig `json:"feeds,omitempty"` Nodes []NodeConfig `json:"nodes,omitempty"` }
type Schema ¶
type Schema interface { ID() int Version() int Subject() string Encode(interface{}) ([]byte, error) Decode([]byte) (interface{}, error) }
Schema is an interface for encoding/decoding data structures into the AVRO format. The data structures need to conform with a predefined AVRO schema, encoding will fail otherwise. The schemas are maintained in a central repository called a [schema registry](https://github.com/confluentinc/schema-registry)
type SchemaRegistry ¶
type SchemaRegistry interface { // EnsureSchema handles three cases when pushing a schema spec to the SchemaRegistry: // 1. when the schema with a given subject does not exist, it will create it. // 2. if a schema with the given subject already exists but the spec is different, it will update it and bump the version. // 3. if the schema exists and the spec is the same, it will not do anything. EnsureSchema(subject, spec string) (Schema, error) }
func NewSchemaRegistry ¶
func NewSchemaRegistry(cfg config.SchemaRegistry, log Logger) SchemaRegistry
type Source ¶
type Source interface { // Fetch must be thread-safe! // There is no guarantee on the ordering of Fetch() calls for the same source instance. Fetch(context.Context) (interface{}, error) }
Source is an abstraction for reading data from a remote API, usually a chain RPC endpoint.
func NewFakeRDDSource ¶
func NewRDDSource ¶
func NewRDDSource( feedsURL string, feedsParser FeedsParser, feedsIgnoreIDs []string, nodesURL string, nodesParser NodesParser, log Logger, ) Source
type SourceFactory ¶
type SourceFactory interface { NewSource(chainConfig ChainConfig, feedConfig FeedConfig) (Source, error) // GetType should return a namespace for all the source instances produced by this factory. GetType() string }
func NewInstrumentedSourceFactory ¶
func NewInstrumentedSourceFactory(sourceFactory SourceFactory, chainMetrics ChainMetrics) SourceFactory
NewInstrumentedSourceFactory wraps a Source and transparently monitors it.
type SourceFactoryMock ¶
SourceFactoryMock is an autogenerated mock type for the SourceFactory type
func NewSourceFactoryMock ¶
func NewSourceFactoryMock(t interface { mock.TestingT Cleanup(func()) }) *SourceFactoryMock
NewSourceFactoryMock creates a new instance of SourceFactoryMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*SourceFactoryMock) EXPECT ¶
func (_m *SourceFactoryMock) EXPECT() *SourceFactoryMock_Expecter
func (*SourceFactoryMock) GetType ¶
func (_m *SourceFactoryMock) GetType() string
GetType provides a mock function with given fields:
func (*SourceFactoryMock) NewSource ¶
func (_m *SourceFactoryMock) NewSource(chainConfig ChainConfig, feedConfig FeedConfig) (Source, error)
NewSource provides a mock function with given fields: chainConfig, feedConfig
type SourceFactoryMock_Expecter ¶
type SourceFactoryMock_Expecter struct {
// contains filtered or unexported fields
}
func (*SourceFactoryMock_Expecter) GetType ¶
func (_e *SourceFactoryMock_Expecter) GetType() *SourceFactoryMock_GetType_Call
GetType is a helper method to define mock.On call
func (*SourceFactoryMock_Expecter) NewSource ¶
func (_e *SourceFactoryMock_Expecter) NewSource(chainConfig interface{}, feedConfig interface{}) *SourceFactoryMock_NewSource_Call
NewSource is a helper method to define mock.On call
- chainConfig ChainConfig
- feedConfig FeedConfig
type SourceFactoryMock_GetType_Call ¶
SourceFactoryMock_GetType_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetType'
func (*SourceFactoryMock_GetType_Call) Return ¶
func (_c *SourceFactoryMock_GetType_Call) Return(_a0 string) *SourceFactoryMock_GetType_Call
func (*SourceFactoryMock_GetType_Call) Run ¶
func (_c *SourceFactoryMock_GetType_Call) Run(run func()) *SourceFactoryMock_GetType_Call
func (*SourceFactoryMock_GetType_Call) RunAndReturn ¶
func (_c *SourceFactoryMock_GetType_Call) RunAndReturn(run func() string) *SourceFactoryMock_GetType_Call
type SourceFactoryMock_NewSource_Call ¶
SourceFactoryMock_NewSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewSource'
func (*SourceFactoryMock_NewSource_Call) Return ¶
func (_c *SourceFactoryMock_NewSource_Call) Return(_a0 Source, _a1 error) *SourceFactoryMock_NewSource_Call
func (*SourceFactoryMock_NewSource_Call) Run ¶
func (_c *SourceFactoryMock_NewSource_Call) Run(run func(chainConfig ChainConfig, feedConfig FeedConfig)) *SourceFactoryMock_NewSource_Call
func (*SourceFactoryMock_NewSource_Call) RunAndReturn ¶
func (_c *SourceFactoryMock_NewSource_Call) RunAndReturn(run func(ChainConfig, FeedConfig) (Source, error)) *SourceFactoryMock_NewSource_Call
type SourceMock ¶
SourceMock is an autogenerated mock type for the Source type
func NewSourceMock ¶
func NewSourceMock(t interface { mock.TestingT Cleanup(func()) }) *SourceMock
NewSourceMock creates a new instance of SourceMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*SourceMock) EXPECT ¶
func (_m *SourceMock) EXPECT() *SourceMock_Expecter
type SourceMock_Expecter ¶
type SourceMock_Expecter struct {
// contains filtered or unexported fields
}
func (*SourceMock_Expecter) Fetch ¶
func (_e *SourceMock_Expecter) Fetch(_a0 interface{}) *SourceMock_Fetch_Call
Fetch is a helper method to define mock.On call
- _a0 context.Context
type SourceMock_Fetch_Call ¶
SourceMock_Fetch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Fetch'
func (*SourceMock_Fetch_Call) Return ¶
func (_c *SourceMock_Fetch_Call) Return(_a0 interface{}, _a1 error) *SourceMock_Fetch_Call
func (*SourceMock_Fetch_Call) Run ¶
func (_c *SourceMock_Fetch_Call) Run(run func(_a0 context.Context)) *SourceMock_Fetch_Call
func (*SourceMock_Fetch_Call) RunAndReturn ¶
func (_c *SourceMock_Fetch_Call) RunAndReturn(run func(context.Context) (interface{}, error)) *SourceMock_Fetch_Call
type TxResults ¶
type TxResults struct {
NumSucceeded, NumFailed uint64
}
TxResults counts the number of successful and failed transactions in a predetermined window of time. Integrators usually create an TxResultsSource to produce TxResults instances.
type Updater ¶
type Updater interface { // Run should be executed as a goroutine otherwise it will block. Run(context.Context) // You should never close the channel returned by Updates()! // You should always read from the channel returned by Updates() in a // select statement with the same context you passed to Run() Updates() <-chan interface{} }
Updater is a generic interface implemented by either polling or subscribing.
Source Files ¶
- config_chain.go
- config_feed.go
- config_node.go
- exporter.go
- exporter_factory_mock.go
- exporter_kafka.go
- exporter_mock.go
- exporter_prometheus.go
- feed_monitor.go
- http.go
- logger.go
- manager.go
- mapping.go
- metrics.go
- metrics_mock.go
- metrics_service.go
- monitor.go
- multi_feed_monitor.go
- network_monitor.go
- poller.go
- producer.go
- producer_instrumented.go
- run_monitor.go
- schema.go
- schema_registry.go
- schemas.go
- source.go
- source_factory_mock.go
- source_instrumented.go
- source_mock.go
- source_outputs.go
- source_rdd.go
- testutils.go
- updater.go
Directories ¶
Path | Synopsis |
---|---|
Package monitoring contains a small DSL to help write more robust Avro schemas by taking advantage of go's type system.
|
Package monitoring contains a small DSL to help write more robust Avro schemas by taking advantage of go's type system. |
package config parses flags, environment variables and json object to build a Config object that's used throughout the monitor.
|
package config parses flags, environment variables and json object to build a Config object that's used throughout the monitor. |