monitor

package
v0.0.0-...-28313f1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServiceSlashingEventType = "service_slash"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Authentication

type Authentication struct {
	AccessKey string
	Secret    string
}

type Endpoint

type Endpoint struct {
	URL  string
	Auth Authentication
}

func NewEndpoint

func NewEndpoint(url, accessKey, secret string) Endpoint

func NewEndpointFromURL

func NewEndpointFromURL(url string) Endpoint

type IMonitor

type IMonitor interface {
	Start()
	Stop()
}

type Monitor

type Monitor struct {
	Client            servicesdk.ServiceClient
	RPCEndpoint       Endpoint
	GRPCEndpoint      Endpoint
	Interval          time.Duration
	Threshold         int64
	ProviderAddresses map[string]bool

	Stopped bool
	// contains filtered or unexported fields
}

func NewMonitor

func NewMonitor(viper *viper.Viper) *Monitor

func (*Monitor) IsTargetedSlashEvent

func (m *Monitor) IsTargetedSlashEvent(event abci.Event) bool

func (*Monitor) Scan

func (m *Monitor) Scan()

func (*Monitor) Stop

func (m *Monitor) Stop()

type RetryConfig

type RetryConfig struct {
	Timeout  time.Duration
	Attempts int
}

func NewRetryConfig

func NewRetryConfig(timeout time.Duration, attempts int) RetryConfig

Jump to

Keyboard shortcuts

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