Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColumnMapping ¶
type ColumnMapping struct{}
ColumnMapping represents the column mapping for stream function output. TODO
type HexOutput ¶
type HexOutput int
HexOutput represents the formatting of binary columns numbers into UTF8 hex.
type Node ¶
type Node struct { // Type represents the type of the node. Type utils.Network `mapstructure:"type" yaml:"type" json:"type"` // NetworkId represents the network ID of the node. NetworkId utils.NetworkID `mapstructure:"networkId" yaml:"networkId" json:"networkId"` // Endpoint represents the network endpoint of the node. Endpoint string `mapstructure:"endpoint" yaml:"endpoint" json:"endpoint"` // RpcEndpoint ... RpcEndpoint string `mapstructure:"rpcEndpoint" yaml:"rpcEndpoint" json:"rpcEndpoint"` // BearerToken is the HyperSync server bearer token. BearerToken *string `mapstructure:"bearerToken" yaml:"bearerToken" json:"bearerToken"` // HTTPReqTimeoutMillis is the number of milliseconds to wait for a response before timing out. HTTPReqTimeoutMs *time.Duration `mapstructure:"httpReqTimeoutMs" yaml:"httpReqTimeoutMs" json:"httpReqTimeoutMs"` // MaxNumRetries is the number of retries to attempt before returning an error. MaxNumRetries int `mapstructure:"maxNumRetries" yaml:"maxNumRetries" json:"maxNumRetries" default:"12"` // RetryBackoffMs is the number of milliseconds used for retry backoff increasing. RetryBackoffMs time.Duration `mapstructure:"retryBackoffMs" yaml:"retryBackoffMs" json:"retryBackoffMs" default:"1ms"` // RetryBaseMs is the initial wait time for request backoff. RetryBaseMs time.Duration `mapstructure:"retryBaseMs" yaml:"retryBaseMs" json:"retryBaseMs"` // RetryCeilingMs is the ceiling time for request backoff. RetryCeilingMs time.Duration `mapstructure:"retryCeilingMs" yaml:"retryCeilingMs" json:"retryCeilingMs"` }
Node represents the configuration and details of a network node.
func (*Node) GetEndpoint ¶
GetEndpoint returns the network endpoint of the node.
func (*Node) GetNetworkID ¶
GetNetworkID returns the network ID of the node.
type Options ¶
type Options struct { // LogLevel ... LogLevel zapcore.Level `json:"logLevel"` // Nodes is a slice of Node representing the network nodes. Blockchains []Node `mapstructure:"blockchains" yaml:"blockchains" json:"blockchains"` }
Options represents the configuration options for network nodes.
func (*Options) GetBlockchains ¶
GetBlockchains returns the slice of network blockchains nodes from the Options.
func (*Options) GetNodeByNetworkId ¶
type StreamOptions ¶
type StreamOptions struct { // ColumnMapping is the column mapping for stream function output. // It lets you map columns you want into the DataTypes you want. ColumnMapping *ColumnMapping `mapstructure:"columnMapping" yaml:"columnMapping" json:"columnMapping"` // HexOutput determines the formatting of binary columns numbers into UTF8 hex. HexOutput HexOutput `mapstructure:"hexOutput" yaml:"hexOutput" json:"hexOutput"` // Concurrency is the number of async threads that would be spawned to execute different block ranges of queries. Concurrency *big.Int `mapstructure:"concurrency" yaml:"concurrency" json:"concurrency"` // BatchSize is the initial batch size. Size would be adjusted based on response size during execution. BatchSize *big.Int `mapstructure:"batchSize" yaml:"batchSize" json:"batchSize"` // DisableAcknowledgements streaming as soon as all retrievals are completed will signal completion of workload. // WARNING: Disable on your own will, you should not touch this if you're not sure why. // If unsure, leave as is and don't touch this option! DisableAcknowledgements bool `yaml:"disableAcknowledgements" json:"disableAcknowledgements" mapstructure:"disableAcknowledgements"` // MaxBatchSize is the maximum batch size that could be used during dynamic adjustment. MaxBatchSize *big.Int `mapstructure:"maxBatchSize" yaml:"maxBatchSize" json:"maxBatchSize"` // MinBatchSize is the minimum batch size that could be used during dynamic adjustment. MinBatchSize *big.Int `mapstructure:"minBatchSize" yaml:"minBatchSize" json:"minBatchSize"` }
StreamOptions represents the configuration for hypersync event streaming.
func DefaultStreamOptions ¶
func DefaultStreamOptions() *StreamOptions
func DefaultStreamOptionsWithBatchSize ¶
func DefaultStreamOptionsWithBatchSize(batchSize *big.Int) *StreamOptions
func (*StreamOptions) Validate ¶
func (s *StreamOptions) Validate() error
Click to show internal directories.
Click to hide internal directories.