Documentation ¶
Index ¶
Constants ¶
View Source
const ( ProvidersFlagName = "providers" CheckIntervalFlagName = "check-interval" CheckDurationFlagName = "check-duration" )
Variables ¶
View Source
var ( MetricWsSubscribeStatus = prometheus.NewCounterVec( prometheus.CounterOpts{ Name: "ws_subscribe_status", Help: "eth_subscribe over websocket check status"}, []string{"status", "provider", "error"}, ) )
Functions ¶
Types ¶
type Config ¶
type Config struct { Providers []string CheckInterval time.Duration CheckDuration time.Duration LogConfig oplog.CLIConfig MetricsConfig opmetrics.CLIConfig }
func (Config) GetProviderConfigs ¶
func (c Config) GetProviderConfigs() []ProviderConfig
GetProviderConfigs fetches endpoint provider configurations from the environment Each provider should have a corresponding env var with the url, ex: PROVIDER1_URL=<provider-url>
type EndpointMonitor ¶
type EndpointMonitor struct {
// contains filtered or unexported fields
}
func NewEndpointMonitor ¶
func NewEndpointMonitor(cfg Config, l log.Logger) EndpointMonitor
func (EndpointMonitor) Start ¶
func (e EndpointMonitor) Start()
type ProviderConfig ¶
Click to show internal directories.
Click to hide internal directories.