indexer

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AppName    = "avalanche-indexer"
	AppVersion = "0.9.0"
	GitCommit  = "-"
	GoVersion  = "-"
)

Functions

func NewAnalyzerTask

func NewAnalyzerTask(db *store.DB, logger *logrus.Logger) pipeline.Task

func NewCleanupTask

func NewCleanupTask(db *store.DB, logger *logrus.Logger) pipeline.Task

func NewFetcherTask

func NewFetcherTask(rpc *client.Client, logger *logrus.Logger) pipeline.Task

func NewLogger

func NewLogger(log *logrus.Logger) pipeline.Logger

func NewParserTask

func NewParserTask(logger *logrus.Logger) pipeline.Task

func NewPersistorTask

func NewPersistorTask(db *store.DB, logger *logrus.Logger) pipeline.Task

func NewPipeline

func NewPipeline(db *store.DB, rpc *client.Client, logger *logrus.Logger) (*indexingPipeline, error)

func VersionString

func VersionString() string

Types

type AnalyzerTask

type AnalyzerTask struct {
	// contains filtered or unexported fields
}

func (AnalyzerTask) GetName

func (t AnalyzerTask) GetName() string

func (AnalyzerTask) Run

type CleanupTask

type CleanupTask struct {
	// contains filtered or unexported fields
}

func (CleanupTask) GetName

func (t CleanupTask) GetName() string

func (CleanupTask) Run

type FetcherTask

type FetcherTask struct {
	// contains filtered or unexported fields
}

func (FetcherTask) GetName

func (t FetcherTask) GetName() string

func (FetcherTask) Run

type ParserTask

type ParserTask struct {
	// contains filtered or unexported fields
}

func (*ParserTask) GetName

func (t *ParserTask) GetName() string

func (*ParserTask) Run

type Payload

type Payload struct {
	ID        string
	SyncTime  time.Time
	Processed bool

	// Fetched properties
	NodeVersion       string
	NetworkName       string
	Height            int64
	Peers             []client.Peer
	Blockchains       []client.Blockchain
	CurrentValidators []client.Validator
	CurrentDelegators []client.Delegator
	PendingValidators []client.Validator
	PendingDelegators []client.Delegator
	MinStake          *client.MinStakeResponse
	RawTxFee          *client.TxFeeResponse
	Balances          map[string]*client.Balance

	// Calculated properties
	ActiveStakeAmount     int64
	ActiveValidatorShare  map[string]float64
	PendingStakeAmount    int64
	PendingValidatorShare map[string]float64
	MinValidatorStake     int64
	MinDelegatorStake     int64
	TxFee                 int64
	CreationTxFee         int64

	// Mapped properties
	NetworkMetric *model.NetworkMetric
	Validators    []model.Validator
	ValidatorSeq  []model.ValidatorSeq
	Delegations   []model.Delegation
}

func NewPayload

func NewPayload() *Payload

func (*Payload) HeightChanged

func (p *Payload) HeightChanged(val int64) bool

func (*Payload) MarkAsProcessed

func (p *Payload) MarkAsProcessed()

type PayloadFactory

type PayloadFactory struct {
}

func NewPayloadFactory

func NewPayloadFactory() PayloadFactory

func (PayloadFactory) GetPayload

func (p PayloadFactory) GetPayload(int64) pipeline.Payload

type PersistorTask

type PersistorTask struct {
	// contains filtered or unexported fields
}

func (PersistorTask) GetName

func (t PersistorTask) GetName() string

func (PersistorTask) Run

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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