Versions in this module Expand all Collapse all v1 v1.1.1 Oct 29, 2019 Changes in this version + const DefaultHTTPHost + const DefaultHTTPPort + const DefaultWSHost + const DefaultWSPort + var DefaultConfig = Config + var ErrDatadirUsed = errors.New("datadir already used by another process") + var ErrNodeRunning = errors.New("node already running") + var ErrNodeStopped = errors.New("node not started") + var ErrServiceUnknown = errors.New("unknown service") + func DefaultDataDir() string + func DefaultHTTPEndpoint() string + func DefaultIPCEndpoint(clientIdentifier string) string + func DefaultWSEndpoint() string + type Config struct + DataDir string + HTTPCors []string + HTTPHost string + HTTPModules []string + HTTPPort int + IPCPath string + KeyStoreDir string + Name string + NoUSB bool + P2P p2p.Config + UseLightweightKDF bool + UserIdent string + Version string + WSExposeAll bool + WSHost string + WSModules []string + WSOrigins []string + WSPort int + func (c *Config) AccountConfig() (int, int, string, error) + func (c *Config) HTTPEndpoint() string + func (c *Config) IPCEndpoint() string + func (c *Config) NameValue() string + func (c *Config) NodeDB() string + func (c *Config) NodeKey() *ecdsa.PrivateKey + func (c *Config) NodeName() string + func (c *Config) SetDefaultConfig() error + func (c *Config) SetSpecialConfig() error + func (c *Config) StaticNodes() []*discover.Node + func (c *Config) TrustedNodes() []*discover.Node + func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error + func (c *Config) WSEndpoint() string + func (c Config) MarshalTOML() (interface{}, error) + type DuplicateServiceError struct + Kind reflect.Type + func (e *DuplicateServiceError) Error() string + type Node struct + func New() (*Node, error) + func (n *Node) AccountManager() *accounts.Manager + func (n *Node) Attach() (*rpc.Client, error) + func (n *Node) DataDir() string + func (n *Node) EventMux() *event.TypeMux + func (n *Node) HTTPEndpoint() string + func (n *Node) IPCEndpoint() string + func (n *Node) InstanceDir() string + func (n *Node) OpenDatabase(name string, cache, handles int) (database.IDatabase, error) + func (n *Node) RPCHandler() (*rpc.Server, error) + func (n *Node) Register(constructor ServiceConstructor) error + func (n *Node) ResolvePath(x string) string + func (n *Node) Restart() error + func (n *Node) Server() *p2p.Server + func (n *Node) Service(service interface{}) error + func (n *Node) Start() error + func (n *Node) Stop() error + func (n *Node) WSEndpoint() string + func (n *Node) Wait() + type Service interface + APIs func() []rpc.API + Protocols func() []p2p.Protocol + Start func(server *p2p.Server) error + Stop func() error + type ServiceConstructor func(ctx *ServiceContext) (Service, error) + type ServiceContext struct + AccountManager *accounts.Manager + EventMux *event.TypeMux + func (ctx *ServiceContext) OpenDatabase(name string, cache int, handles int) (database.IDatabase, error) + func (ctx *ServiceContext) ResolvePath(path string) string + func (ctx *ServiceContext) Service(service interface{}) error + func (ctx *ServiceContext) SetDataBaseDir(dir string) + type StopError struct + Server error + Services map[reflect.Type]error + func (e *StopError) Error() string