Versions in this module Expand all Collapse all v1 v1.0.0 Jul 13, 2019 Changes in this version + const DefaultHTTPHost + const DefaultHTTPPort + const DefaultPrivateHTTPPort + 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 + type Config struct + DataDir string + HTTPEndpoint string + HTTPModules []string + HTTPPrivEndpoint string + HTTPTimeouts rpc.HTTPTimeouts + IPCPath string + Logger log.Logger + Name string + P2P p2p.Config + SvrHost string + SvrModule string + SvrPort uint16 + Version string + WSExposeAll bool + WSHost string + WSModules []string + WSOrigins []string + WSPort int + func (c *Config) GRPCEndpoint() string + func (c *Config) IPCEndpoint() string + func (c *Config) NodeDB() string + func (c *Config) NodeKey() *ecdsa.PrivateKey + func (c *Config) NodeName() string + func (c *Config) ResolvePath(path string) string + func (c *Config) StaticNodes() []*enode.Node + func (c *Config) TrustedNodes() []*enode.Node + func (c *Config) WSEndpoint() string + type DuplicateServiceError struct + Kind reflect.Type + func (e *DuplicateServiceError) Error() string + type Node struct + func New(conf *Config) (*Node, error) + func (n *Node) Attach() (*rpc.Client, error) + func (n *Node) DataDir() string + func (n *Node) EventMux() *event.TypeMux + func (n *Node) GetSigc() chan os.Signal + func (n *Node) HTTPEndpoint() string + func (n *Node) IPCEndpoint() string + func (n *Node) InstanceDir() string + func (n *Node) IsMaster() bool + 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) SetIsMaster(isMaster bool) + func (n *Node) Start() error + func (n *Node) Stop() error + func (n *Node) Wait() + type Service interface + APIs func() []rpc.API + Init func(server *p2p.Server) error + Protocols func() []p2p.Protocol + Stop func() error + type ServiceConstructor func(ctx *ServiceContext) (Service, error) + type ServiceContext struct + EventMux *event.TypeMux + Shutdown chan os.Signal + Timestamp time.Time + func (ctx *ServiceContext) OpenDatabase(name string, clean bool) (ethdb.Database, error) + func (ctx *ServiceContext) ResolvePath(path string) string + func (ctx *ServiceContext) Service(service interface{}) error + type StopError struct + Server error + Services map[reflect.Type]error + func (e *StopError) Error() string