near

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSource

func NewSource(config *config.Module, sourceFilter engine.DataSourceFilter, checkpoint *engine.Checkpoint, redisClient rueidis.Client) (engine.DataSource, error)

NewSource creates a new near dataSource.

Types

type Filter

type Filter struct {
	ReceiverIDs []string `yaml:"receiver_ids"`
}

type Option

type Option struct {
	// BlockStart is the block height on Arweave that the worker should start from.
	BlockStart *big.Int `json:"block_start" mapstructure:"block_start"`
	// BlockTarget is the block height on Arweave that the worker should stop at.
	BlockTarget *big.Int `json:"block_target" mapstructure:"block_target"`
	// ConcurrentBlockRequests is the number of blocks to request concurrently.
	ConcurrentBlockRequests *uint64 `json:"concurrent_block_requests" mapstructure:"concurrent_block_requests"`
}

func NewOption

func NewOption(n network.Network, parameters *config.Parameters) (*Option, error)

type State

type State struct {
	BlockHeight    uint64 `json:"block_height,omitempty"`
	BlockTimestamp uint64 `json:"block_timestamp,omitempty"`
}

type Task

type Task struct {
	Network     network.Network
	Block       near.Block
	Transaction near.Transaction
}

func (Task) BuildActivity

func (t Task) BuildActivity(options ...activityx.Option) (*activityx.Activity, error)

BuildActivity builds an activity from the task.

func (Task) GetNetwork

func (t Task) GetNetwork() network.Network

func (Task) GetTimestamp

func (t Task) GetTimestamp() uint64

func (Task) ID

func (t Task) ID() string

func (Task) Validate

func (t Task) Validate() error

Jump to

Keyboard shortcuts

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