Documentation ¶
Index ¶
- func RegisterMainChainMetrics()
- func RegisterSideChainMetrics()
- func SetExporterVersion(ver string)
- type AlphabetFetcher
- type ContainerFetcher
- type HeightData
- type HeightFetcher
- type InnerRingFetcher
- type Item
- type Job
- type MainJob
- type MainJobArgs
- type Monitor
- type NNSResolver
- type Nep17BalanceFetcher
- type Nep17Fetcher
- type Nep17tracker
- type NetmapCandidatesInfo
- type NetmapFetcher
- type NetmapInfo
- type Node
- type NotaryBalanceFetcher
- type NotaryFetcher
- type SideJob
- type SideJobArgs
- type StateData
- type StateFetcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterMainChainMetrics ¶
func RegisterMainChainMetrics()
RegisterMainChainMetrics inits prometheus metrics for main chain. Panics if can't do it.
func RegisterSideChainMetrics ¶
func RegisterSideChainMetrics()
RegisterSideChainMetrics inits prometheus metrics for side chain. Panics if can't do it.
func SetExporterVersion ¶ added in v0.12.0
func SetExporterVersion(ver string)
SetExporterVersion sets neo-exporter version metric.
Types ¶
type AlphabetFetcher ¶
type AlphabetFetcher interface {
FetchAlphabet() (keys.PublicKeys, error)
}
type ContainerFetcher ¶
type HeightData ¶
type HeightFetcher ¶
type HeightFetcher interface {
FetchHeight() []HeightData
}
type InnerRingFetcher ¶
type InnerRingFetcher interface {
FetchInnerRingKeys() (keys.PublicKeys, error)
}
type Item ¶
Item describes task for Nep17tracker.
func ParseNep17Tasks ¶
func ParseNep17Tasks(balanceFetcher Nep17BalanceFetcher, items []model.Nep17Balance, nns NNSResolver) ([]Item, error)
ParseNep17Tasks prepares tasks for Nep17tracker.
type MainJob ¶
type MainJob struct {
// contains filtered or unexported fields
}
func NewMainJob ¶
func NewMainJob(args MainJobArgs) *MainJob
type MainJobArgs ¶
type MainJobArgs struct { AlphabetFetcher AlphabetFetcher BalanceFetcher Nep17BalanceFetcher Neofs *util.Uint160 Logger *zap.Logger Nep17tracker *Nep17tracker }
type NNSResolver ¶
NNSResolver helps to resolve NNS contract name to address.
type Nep17BalanceFetcher ¶
type Nep17Fetcher ¶
type Nep17Fetcher struct {
// contains filtered or unexported fields
}
Nep17Fetcher allows to fetch balances from passed contract and account.
func NewNep17BalanceFetcher ¶
func NewNep17BalanceFetcher(cli nep17.Invoker) (*Nep17Fetcher, error)
NewNep17BalanceFetcher is a constructor for Nep17Fetcher.
func (*Nep17Fetcher) FetchTotalSupply ¶
func (b *Nep17Fetcher) FetchTotalSupply(tokenHash util.Uint160) (float64, error)
FetchTotalSupply returns total token supply currently available.
type Nep17tracker ¶
type Nep17tracker struct {
// contains filtered or unexported fields
}
Nep17tracker allows to get balances of accounts in corresponding contracts.
func NewNep17tracker ¶
func NewNep17tracker(balanceFetcher Nep17BalanceFetcher, tasks []Item) (*Nep17tracker, error)
NewNep17tracker is a constructor for Nep17tracker.
func (*Nep17tracker) Process ¶
func (n *Nep17tracker) Process(metric *prometheus.GaugeVec, metricTotal *prometheus.GaugeVec)
Process runs the tasks and updates metrics.
type NetmapCandidatesInfo ¶
type NetmapCandidatesInfo struct {
Nodes []*Node
}
type NetmapFetcher ¶
type NetmapFetcher interface { FetchNetmap() (NetmapInfo, error) FetchCandidates() (NetmapCandidatesInfo, error) }
type NetmapInfo ¶
type NotaryBalanceFetcher ¶ added in v0.11.0
type NotaryFetcher ¶ added in v0.11.0
type NotaryFetcher struct {
// contains filtered or unexported fields
}
NotaryFetcher allows to fetch notary balances from account.
func NewNotaryFetcher ¶ added in v0.11.0
func NewNotaryFetcher(cli nep17.Invoker) (*NotaryFetcher, error)
NewNotaryFetcher is a constructor for NotaryFetcher.
func (*NotaryFetcher) FetchNotary ¶ added in v0.11.0
func (b *NotaryFetcher) FetchNotary(account util.Uint160) (float64, error)
FetchNotary returns the notary balance of the given account.
type SideJob ¶
type SideJob struct {
// contains filtered or unexported fields
}
func NewSideJob ¶
func NewSideJob(args SideJobArgs) *SideJob
type SideJobArgs ¶
type SideJobArgs struct { Logger *zap.Logger Balance util.Uint160 Proxy *util.Uint160 AlphabetFetcher AlphabetFetcher NmFetcher NetmapFetcher IRFetcher InnerRingFetcher BalanceFetcher Nep17BalanceFetcher NotaryBalanceFetcher NotaryBalanceFetcher CnrFetcher ContainerFetcher HeightFetcher HeightFetcher StateFetcher StateFetcher Nep17tracker *Nep17tracker }