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) OperatorBook() *url.URL
- func (n *Network) OperatorPage(index uint64) *url.URL
- func (n *Network) Synthetic() *url.URL
- func (n *Network) ValidatorBook() *url.URL
- func (n *Network) ValidatorPage(index uint64) *url.URL
- type NetworkType
- type NetworkUrl
- func (u NetworkUrl) AnchorPool() *url.URL
- func (u NetworkUrl) Ledger() *url.URL
- func (u NetworkUrl) OperatorBook() *url.URL
- func (u NetworkUrl) OperatorPage(index uint64) *url.URL
- func (u NetworkUrl) Synthetic() *url.URL
- func (u NetworkUrl) ValidatorBook() *url.URL
- func (u NetworkUrl) ValidatorPage(index uint64) *url.URL
- type Node
- type NodeType
- type Snapshots
- type Storage
- type StorageType
- type Subnet
- type Website
Constants ¶
This section is empty.
Variables ¶
var DefaultLogLevels = LogLevel{}.
SetDefault("error").
SetModule("snapshot", "info").
SetModule("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"` ConnectionLimit int `toml:"connection-limit" mapstructure:"connection-limit"` }
type Accumulate ¶
type Accumulate struct { SentryDSN string `toml:"sentry-dsn" mapstructure:"sentry-dsn"` Network Network `toml:"network" mapstructure:"network"` Snapshots Snapshots `toml:"snapshots" mapstructure:"snapshots"` Storage Storage `toml:"storage" mapstructure:"storage"` API API `toml:"api" mapstructure:"api"` Website Website `toml:"website" mapstructure:"website"` }
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) OperatorBook ¶
OperatorBook returns the URL of the subnet's operator key book.
func (*Network) OperatorPage ¶
OperatorPage returns the URL of the page of the subnet's operator key book.
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) OperatorBook ¶
func (u NetworkUrl) OperatorBook() *url.URL
OperatorBook returns the URL of the subnet's operator key book.
func (NetworkUrl) OperatorPage ¶
func (u NetworkUrl) OperatorPage(index uint64) *url.URL
OperatorPage returns the URL of the page of the subnet's operator key book.
func (NetworkUrl) Synthetic ¶ added in v1.0.0
func (u NetworkUrl) Synthetic() *url.URL
Synthetic returns the URL of the subnet's synthetic transaction 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 Snapshots ¶ added in v1.0.0
type Snapshots struct { // Directory is the directory to store snapshots in Directory string `toml:"directory" mapstructure:"directory"` // RetainCount is the number of snapshots to retain RetainCount int `toml:"retain" mapstructure:"retain"` // Frequency is how many major blocks should occur before another snapshot // is taken Frequency int `toml:"frequency" mapstructure:"frequency"` }
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"` }