node

package
v1.0.20 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Activity

type Activity struct {
	// ActivityID is the activity id.
	ActivityID interface{} `json:"activityId" db:"activity_id"`
	// Enr is the enr of the node record.
	Enr string `json:"enr" db:"enr" fieldopt:"omitempty"`
	// Client is the name of the coordinated client.
	ClientID string `json:"clientId" db:"client_id" fieldopt:"omitempty"`
	// CreateTime is the timestamp of when the activity record was created.
	CreateTime time.Time `json:"createTime" db:"create_time" fieldopt:"omitempty"`
	// UpdateTime is the timestamp of when the activity record was updated.
	UpdateTime time.Time `json:"updateTime" db:"update_time" fieldopt:"omitempty"`
	// Connected is the connected status of the node.
	Connected bool `json:"connected" db:"connected" fieldopt:"omitempty"`
}

type Execution

type Execution struct {
	// ExecutionID is the execution id.
	ExecutionID int64 `json:"executionId" db:"execution_id"`
	// Enr is the enr of the node record.
	Enr string `json:"enr" db:"enr" fieldopt:"omitempty"`
	// CreateTime is the timestamp of when the execution record was created.
	CreateTime time.Time `json:"createTime" db:"create_time" fieldopt:"omitempty"`
	// Name is the name of the node.
	Name string `json:"name" db:"name" fieldopt:"omitempty"`
	// Capabilities is the capabilities of the node.
	Capabilities string `json:"capabilities" db:"capabilities" fieldopt:"omitempty"`
	// ProtocolVersion is the protocol version of the node.
	ProtocolVersion string `json:"protocolVersion" db:"protocol_version" fieldopt:"omitempty"`
	// NetworkId is the network id of the node.
	NetworkID string `json:"networkId" db:"network_id" fieldopt:"omitempty"`
	// TD is the total difficulty of the node.
	TotalDifficulty string `json:"totalDifficulty" db:"total_difficulty" fieldopt:"omitempty"`
	// Head is the head of the node.
	Head []byte `json:"head" db:"head" fieldopt:"omitempty"`
	// Genesis is the genesis of the node.
	Genesis []byte `json:"genesis" db:"genesis" fieldopt:"omitempty"`
	// ForkIdHash is the fork id hash of the node.
	ForkIDHash []byte `json:"forkIdHash" db:"fork_id_hash" fieldopt:"omitempty"`
	// ForkIdNext is the fork id next of the node.
	ForkIDNext string `json:"forkIdNext" db:"fork_id_next" fieldopt:"omitempty"`
}

type Record

type Record struct {
	// Enr is the enr of the node record.
	Enr string `json:"enr" db:"enr"`
	// Signature is the cryptographic signature of record contents
	Signature *[]byte `json:"signature" db:"signature" fieldopt:"omitempty"`
	// Seq is the sequence number, a 64-bit unsigned integer. Nodes should increase the number whenever the record changes and republish the record
	Seq *uint64 `json:"seq" db:"seq" fieldopt:"omitempty"`
	// CreateTime is the timestamp of when the node record was created.
	CreateTime time.Time `json:"createTime" db:"create_time" fieldopt:"omitempty"`
	// LastDialTime is the timestamp of when the node record was last dialed.
	LastDialTime sql.NullTime `json:"lastDialTime" db:"last_dial_time" fieldopt:"omitempty"`
	// ConsecutiveDialAttempts is the number of consecutive dial attempts.
	ConsecutiveDialAttempts int `json:"consecutiveDialAttempts" db:"consecutive_dial_attempts"`
	// LastConnectTime is the timestamp of when the node record was last connected.
	LastConnectTime sql.NullTime `json:"lastConnectTime" db:"last_connect_time" fieldopt:"omitempty"`
	// ID is the name of identity scheme, e.g. “v4”
	ID *string `json:"id" db:"id" fieldopt:"omitempty"`
	// Secp256k1 is the secp256k1 public key of the node record.
	Secp256k1 *[]byte `json:"secp256k1" db:"secp256k1" fieldopt:"omitempty"`
	// IP4 is the IPv4 address of the node record.
	IP4 *string `json:"ip4" db:"ip4" fieldopt:"omitempty"`
	// IP6 is the IPv6 address of the node record.
	IP6 *string `json:"ip6" db:"ip6" fieldopt:"omitempty"`
	// GeoCity is the city of the node record.
	GeoCity *string `json:"geoCity" db:"geo_city" fieldopt:"omitempty"`
	// GeoCountry is the country of the node record.
	GeoCountry *string `json:"geoCountry" db:"geo_country" fieldopt:"omitempty"`
	// GeoCountryCode is the country code of the node record.
	GeoCountryCode *string `json:"geoCountryCode" db:"geo_country_code" fieldopt:"omitempty"`
	// GeoContinentCode is the continent code of the node record.
	GeoContinentCode *string `json:"geoContinentCode" db:"geo_continent_code" fieldopt:"omitempty"`
	// GeoLongitude is the longitude of the node record.
	GeoLongitude *float64 `json:"geoLongitude" db:"geo_longitude" fieldopt:"omitempty"`
	// GeoLatitude is the latitude of the node record.
	GeoLatitude *float64 `json:"geoLatitude" db:"geo_latitude" fieldopt:"omitempty"`
	// GeoAutonomousSystemNumber is the autonomous system number of the node record.
	GeoAutonomousSystemNumber *uint32 `json:"geoAutonomousSystemNumber" db:"geo_autonomous_system_number" fieldopt:"omitempty"`
	// GeoAutonomousSystemOrganization is the autonomous system organization of the node record.
	GeoAutonomousSystemOrganization *string `json:"geoAutonomousSystemOrganization" db:"geo_autonomous_system_organization" fieldopt:"omitempty"`
	// TCP4 is the TCP port of the node record.
	TCP4 *uint32 `json:"tcp4" db:"tcp4" fieldopt:"omitempty"`
	// TCP6 is the TCP port of the node record.
	TCP6 *uint32 `json:"tcp6" db:"tcp6" fieldopt:"omitempty"`
	// UDP4 is the UDP port of the node record.
	UDP4 *uint32 `json:"udp4" db:"udp4" fieldopt:"omitempty"`
	// UDP6 is the UDP port of the node record.
	UDP6 *uint32 `json:"udp6" db:"udp6" fieldopt:"omitempty"`
	// Eth2 is the eth2 public key of the node record.
	ETH2 *[]byte `json:"eth2" db:"eth2" fieldopt:"omitempty"`
	// Attnets is the attestation subnet bitfield of the node record.
	Attnets *[]byte `json:"attnets" db:"attnets" fieldopt:"omitempty"`
	// Syncnets is the sync subnet bitfield of the node record.
	Syncnets *[]byte `json:"syncnets" db:"syncnets" fieldopt:"omitempty"`
	// NodeID is the node ID of the node record.
	NodeID *string `json:"nodeId" db:"node_id" fieldopt:"omitempty"`
	// PeerID is the peer ID of the node record.
	PeerID *string `json:"peerId" db:"peer_id" fieldopt:"omitempty"`
}

func Parse

func Parse(record string) (*Record, error)

Jump to

Keyboard shortcuts

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