Documentation ¶
Index ¶
- Variables
- func MakeAbsolute(root, path string) string
- func OffsetPort(addr string, offset int) (*url.URL, error)
- func Store(config *Config) error
- type API
- type Accumulate
- type Config
- type LogLevel
- type Network
- func (n *Network) AnchorPool() *url.URL
- func (n *Network) GetBvnNames() []string
- func (n *Network) GetSubnetByID(subnetID string) Subnet
- func (n *Network) Ledger() *url.URL
- func (n *Network) NodeUrl(path ...string) *url.URL
- func (n *Network) ValidatorBook() *url.URL
- func (n *Network) ValidatorPage(index uint64) *url.URL
- type NetworkType
- type NetworkUrl
- type Node
- type NodeType
- type Storage
- type StorageType
- type Subnet
- type Website
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultLogLevels = LogLevel{}.
SetDefault("error").
SetModule("block-executor", "info").
String()
Functions ¶
func MakeAbsolute ¶ added in v0.5.1
Types ¶
type API ¶
type API struct { TxMaxWaitTime time.Duration `toml:"tx-max-wait-time" mapstructure:"tx-max-wait-time"` PrometheusServer string `toml:"prometheus-server" mapstructure:"prometheus-server"` ListenAddress string `toml:"listen-address" mapstructure:"listen-address"` DebugJSONRPC bool `toml:"debug-jsonrpc" mapstructure:"debug-jsonrpc"` EnableDebugMethods bool `toml:"enable-debug-methods" mapstructure:"enable-debug-methods"` }
type Accumulate ¶
type Config ¶
type Config struct { tm.Config Accumulate Accumulate }
type LogLevel ¶ added in v0.5.1
LogLevel defines the default and per-module log level for Accumulate's logging.
func (LogLevel) Parse ¶ added in v0.5.1
Parse parses a string such as "error;accumulate=info" into a LogLevel.
func (LogLevel) SetDefault ¶ added in v0.5.1
SetDefault sets the default log level.
type Network ¶
type Network struct { Type NetworkType `toml:"type" mapstructure:"type"` LocalSubnetID string `toml:"local-subnet" mapstructure:"local-subnet"` LocalAddress string `toml:"local-address" mapstructure:"local-address"` Subnets []Subnet `toml:"subnets" mapstructure:"subnets"` }
func (*Network) AnchorPool ¶ added in v0.5.1
AnchorPool returns the URL of the subnet's anchor pool.
func (*Network) GetBvnNames ¶
func (*Network) GetSubnetByID ¶
func (*Network) ValidatorBook ¶ added in v0.5.1
ValidatorBook returns the URL of the subnet's validator key book.
type NetworkType ¶
type NetworkType string
const ( BlockValidator NetworkType = "block-validator" Directory NetworkType = "directory" )
type NetworkUrl ¶ added in v0.5.1
func (NetworkUrl) AnchorPool ¶ added in v0.5.1
func (u NetworkUrl) AnchorPool() *url.URL
AnchorPool returns the URL of the subnet's anchor pool.
func (NetworkUrl) Ledger ¶ added in v0.5.1
func (u NetworkUrl) Ledger() *url.URL
Ledger returns the URL of the subnet's ledger account.
func (NetworkUrl) ValidatorBook ¶ added in v0.5.1
func (u NetworkUrl) ValidatorBook() *url.URL
ValidatorBook returns the URL of the subnet's validator key book.
func (NetworkUrl) ValidatorPage ¶ added in v0.5.1
func (u NetworkUrl) ValidatorPage(index uint64) *url.URL
ValidatorPage returns the URL of the page of the subnet's validator key book.
type Storage ¶ added in v0.5.1
type Storage struct { Type StorageType `toml:"type" mapstructure:"type"` Path string `toml:"path" mapstructure:"path"` Etcd *etcd.Config `toml:"etcd" mapstructure:"etcd"` }
type StorageType ¶ added in v0.5.1
type StorageType string
const ( MemoryStorage StorageType = "memory" BadgerStorage StorageType = "badger" EtcdStorage StorageType = "etcd" )
type Subnet ¶
type Subnet struct { ID string `toml:"id" mapstructure:"id"` Type NetworkType `toml:"type" mapstructure:"type"` Nodes []Node `toml:"nodes" mapstructure:"nodes"` }
Click to show internal directories.
Click to hide internal directories.