package
0.0.0-20220616152218-3da4c06c590a
Repository: https://github.com/astra-net/astra-network.git
Documentation: pkg.go.dev
# Functions
GetDefaultBootNodes get the default bootnode with the given network type.
GetDefaultConfig returns default config.
GetDefaultDNSPort get the default DNS port for the given network type.
GetDefaultDNSZone get the default DNS zone with the given network type.
GetPeerID returns the peer ID of the node.
GetPrometheusHTTPPortFromBase return the prometheus HTTP port from base port.
GetRosettaHTTPPortFromBase return the rosetta HTTP port from base port.
GetRPCAuthHTTPPortFromBase return the rpc HTTP port from base port.
GetRPCHTTPPortFromBase return the rpc HTTP port from base port.
GetShardConfig return the shard's ConfigType variable.
GetVersion return the version of the node binary.
GetWSAuthPortFromBase return the Websocket port from the base auth port.
GetWSPortFromBase return the Websocket port from the base port.
NewClientGroupIDByShardID returns a new groupID for a shard's client.
NewGroupIDByShardID returns a new groupID for a shard.
SetDefaultRole ..
SetNetworkType set the networkType.
SetPeerID set the peer ID of the node.
SetShardingSchedule sets the sharding schedule for all config instances.
SetVersion set the version of the node binary.
# Constants
Const of different Action type.
Const of different Action type.
Const of different Action type.
Const of different Action type.
Const of different Action type.
DefaultAuthRPCPort is the default rpc auth port.
DefaultAuthWSPort is the default port for web socket auth endpoint.
DefaultDNSPort is the default DNS port for both remote node and local server.
DefaultLegacyDNSPort is the default legacy DNS port.
DefaultLocalListenIP is the IP used for local hosting.
No description provided by the author
DefaultP2PConcurrency is the default P2P concurrency, 0 means is set the default value of P2P Discovery, the actual value is 10.
DefaultP2PPort is the key to be used for p2p communication.
DefaultPrometheusPort is the default prometheus port.
DefaultPublicListenIP is the IP used for public hosting.
DefaultRosettaPort is the default rosetta port.
DefaultRPCPort is the default rpc port.
DefaultRateLimit for RPC, the number of requests per second.
DefaultWSPort is the default port for web socket endpoint.
Constants for NetworkType TODO: replace this with iota.
All constants for different node roles.
Global is the index of the global node configuration.
Const of group ID.
Const of group ID.
Const of group ID.
Const of group ID.
Const of group ID.
Const of group ID.
Const of group ID.
Constants for NetworkType TODO: replace this with iota.
Constants for NetworkType TODO: replace this with iota.
maximum number of shards.
Constants for NetworkType TODO: replace this with iota.
Constants for NetworkType TODO: replace this with iota.
Constants for NetworkType TODO: replace this with iota.
Constants for NetworkType TODO: replace this with iota.
All constants for different node roles.
All constants for different node roles.
# Structs
ConfigType is the structure of all node related configuration variables.
GroupAction specify action on corresponding group.
RosettaServerConfig is the config for the rosetta server.
RPCServerConfig is the config for rpc listen addresses.
# Type aliases
ActionType lists action on group.
GroupID is a multicast group ID.
NetworkType describes the type of Astra network.
Role defines a role of a node.
ShardID defines the ID of a shard.