Versions in this module Expand all Collapse all v1 v1.0.2 Dec 20, 2016 Changes in this version + const DefaultHTTPHost + const DefaultHTTPPort + const DefaultIPCSocket + const DefaultWSHost + const DefaultWSPort + var ErrDatadirUsed = errors.New("datadir already used") + 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 + BootstrapNodes []*discover.Node + DataDir string + Dialer *net.Dialer + EnableNodePermission bool + HTTPCors string + HTTPHost string + HTTPModules []string + HTTPPort int + IPCPath string + KeyStoreDir string + ListenAddr string + MaxPeers int + MaxPendingPeers int + NAT nat.Interface + Name string + NoDial bool + NoDiscovery bool + PrivateKey *ecdsa.PrivateKey + UseLightweightKDF bool + UserIdent string + Version string + WSHost string + WSModules []string + WSOrigins string + WSPort int + func (c *Config) HTTPEndpoint() 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) StaticNodes() []*discover.Node + func (c *Config) TrusterNodes() []*discover.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) 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) OpenDatabase(name string, cache, handles int) (ethdb.Database, 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 PrivateAdminAPI struct + func NewPrivateAdminAPI(node *Node) *PrivateAdminAPI + func (api *PrivateAdminAPI) AddPeer(url string) (bool, error) + func (api *PrivateAdminAPI) RemovePeer(url string) (bool, error) + func (api *PrivateAdminAPI) StartRPC(host *string, port *rpc.HexNumber, cors *string, apis *string) (bool, error) + func (api *PrivateAdminAPI) StartWS(host *string, port *rpc.HexNumber, allowedOrigins *string, apis *string) (bool, error) + func (api *PrivateAdminAPI) StopRPC() (bool, error) + func (api *PrivateAdminAPI) StopWS() (bool, error) + type PublicAdminAPI struct + func NewPublicAdminAPI(node *Node) *PublicAdminAPI + func (api *PublicAdminAPI) Datadir() string + func (api *PublicAdminAPI) NodeInfo() (*p2p.NodeInfo, error) + func (api *PublicAdminAPI) Peers() ([]*p2p.PeerInfo, error) + type PublicDebugAPI struct + func NewPublicDebugAPI(node *Node) *PublicDebugAPI + func (api *PublicDebugAPI) Metrics(raw bool) (map[string]interface{}, error) + type PublicWeb3API struct + func NewPublicWeb3API(stack *Node) *PublicWeb3API + func (s *PublicWeb3API) ClientVersion() string + func (s *PublicWeb3API) Sha3(input string) string + 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) (ethdb.Database, error) + func (ctx *ServiceContext) Service(service interface{}) error + type StopError struct + Server error + Services map[reflect.Type]error + func (e *StopError) Error() string