Documentation ¶
Overview ¶
Package configuration holds configuration for all components in Insolar host binary It allows also helps to manage config resources using Holder
Usage:
package main import ( "github.com/insolar/insolar/configuration" "fmt" ) func main() { holder := configuration.NewHolder() fmt.Printf("Default configuration:\n %+v\n", holder.Configuration) holder.SaveAs("insolar.yml") }
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Configuration ¶
type Configuration struct { Host HostNetwork Node NodeNetwork Service ServiceNetwork Ledger Ledger Log Log Stats Stats LogicRunner LogicRunner Pulsar Pulsar }
Configuration contains configuration params for all Insolar components
func NewConfiguration ¶
func NewConfiguration() Configuration
NewConfiguration creates new default configuration
type Holder ¶
type Holder struct { Configuration Configuration // contains filtered or unexported fields }
Holder provides methods to manage configuration
func (*Holder) LoadFromFile ¶
LoadFromFile method reads configuration from particular file path
type HostNetwork ¶
type HostNetwork struct { Transport Transport BootstrapHosts []string IsRelay bool // set if node must be relay explicit }
HostNetwork holds configuration for HostNetwork
func NewHostNetwork ¶
func NewHostNetwork() HostNetwork
NewHostNetwork creates new default HostNetwork configuration
type Ledger ¶
type Ledger struct { // DataDirectory is a directory where database's files live. DataDirectory string // TxRetriesOnConflict defines how many retries on transaction conflicts // storage update methods should do. TxRetriesOnConflict int }
Ledger holds configuration for ledger.
type LogicRunner ¶
func NewLogicRunner ¶
func NewLogicRunner() LogicRunner
type NodeNetwork ¶
type NodeNetwork struct {
Nodes []*Node
}
NodeNetwork holds configuration for NodeNetwork
func NewNodeNetwork ¶
func NewNodeNetwork() NodeNetwork
NewNodeNetwork creates new default NodeNetwork configuration
type ServiceNetwork ¶
type ServiceNetwork struct {
Service Service
}
ServiceNetwork is configuration for ServiceNetwork.
func NewServiceNetwork ¶
func NewServiceNetwork() ServiceNetwork
NewServiceNetwork creates a new ServiceNetwork configuration.