{"modulePath":"github.com/ericdmann/tendermint","version":"v0.11.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package node\n\n## Functions\n\n```go\nfunc DefaultDBProvider(ctx *DBContext) (dbm.DB, error)\n```\nDefaultDBProvider returns a database using the DBBackend and DBDir specified in the ctx.Config.\n\n```go\nfunc SetEventSwitch(evsw types.EventSwitch, eventables ...types.Eventable)\n```\nSetEventSwitch adds the event switch to reactors, mempool, etc.\n\n## Types\n\n```go\ntype DBContext struct {\n\tID     string\n\tConfig *cfg.Config\n}\n```\nDBContext specifies config information for loading a new DB.\n\n```go\ntype DBProvider func(*DBContext) (dbm.DB, error)\n```\nDBProvider takes a DBContext and returns an instantiated DB.\n\n```go\ntype GenesisDocProvider func() (*types.GenesisDoc, error)\n```\nGenesisDocProvider returns a GenesisDoc. It allows the GenesisDoc to be pulled from sources other than the filesystem, for instance from a distributed key-value store cluster.\n\n```go\nfunc DefaultGenesisDocProviderFunc(config *cfg.Config) GenesisDocProvider\n```\nDefaultGenesisDocProviderFunc returns a GenesisDocProvider that loads the GenesisDoc from the config.GenesisFile() on the filesystem.\n\n```go\ntype Node struct {\n\tcmn.BaseService\n\t// contains filtered or unexported fields\n}\n```\nNode is the highest level interface to a full Tendermint node. It includes all configuration information and running services.\n\n```go\nfunc DefaultNewNode(config *cfg.Config, logger log.Logger) (*Node, error)\n```\nDefaultNewNode returns a Tendermint node with default settings for the PrivValidator, ClientCreator, GenesisDoc, and DBProvider. It implements NodeProvider.\n\n```go\nfunc NewNode(config *cfg.Config,\n\tprivValidator types.PrivValidator,\n\tclientCreator proxy.ClientCreator,\n\tgenesisDocProvider GenesisDocProvider,\n\tdbProvider DBProvider,\n\tlogger log.Logger) (*Node, error)\n```\nNewNode returns a new, ready to go, Tendermint Node.\n\n```go\nfunc (n *Node) AddListener(l p2p.Listener)\n```\nAddListener adds a listener to accept inbound peer connections. It should be called before starting the Node. The first listener is the primary listener (in NodeInfo)\n\n```go\nfunc (n *Node) BlockStore() *bc.BlockStore\n```\nBlockStore returns the Node's BlockStore.\n\n```go\nfunc (n *Node) ConfigureRPC()\n```\nConfigureRPC sets all variables in rpccore so they will serve rpc calls from this node\n\n```go\nfunc (n *Node) ConsensusReactor() *consensus.ConsensusReactor\n```\nConsensusReactor returns the Node's ConsensusReactor.\n\n```go\nfunc (n *Node) ConsensusState() *consensus.ConsensusState\n```\nConsensusState returns the Node's ConsensusState.\n\n```go\nfunc (n *Node) DialSeeds(seeds []string) error\n```\nDialSeeds dials the given seeds on the Switch.\n\n```go\nfunc (n *Node) EventSwitch() types.EventSwitch\n```\nEventSwitch returns the Node's EventSwitch.\n\n```go\nfunc (n *Node) GenesisDoc() *types.GenesisDoc\n```\nGenesisDoc returns the Node's GenesisDoc.\n\n```go\nfunc (n *Node) MempoolReactor() *mempl.MempoolReactor\n```\nMempoolReactor returns the Node's MempoolReactor.\n\n```go\nfunc (n *Node) NodeInfo() *p2p.NodeInfo\n```\nNodeInfo returns the Node's Info from the Switch.\n\n```go\nfunc (n *Node) OnStart() error\n```\nOnStart starts the Node. It implements cmn.Service.\n\n```go\nfunc (n *Node) OnStop()\n```\nOnStop stops the Node. It implements cmn.Service.\n\n```go\nfunc (n *Node) PrivValidator() types.PrivValidator\n```\nPrivValidator returns the Node's PrivValidator. XXX: for convenience only!\n\n```go\nfunc (n *Node) ProxyApp() proxy.AppConns\n```\nProxyApp returns the Node's AppConns, representing its connections to the ABCI application.\n\n```go\nfunc (n *Node) RunForever()\n```\nRunForever waits for an interupt signal and stops the node.\n\n```go\nfunc (n *Node) Switch() *p2p.Switch\n```\nSwitch returns the Node's Switch.\n\n```go\ntype NodeGreeting struct {\n\tNodeID\n\tVersion string\n\tChainID string\n\tMessage string\n\tTime    time.Time\n}\n```\n\n```go\ntype NodeID struct {\n\tName   string\n\tPubKey crypto.PubKey\n}\n```\n\n```go\ntype NodeProvider func(*cfg.Config, log.Logger) (*Node, error)\n```\nNodeProvider takes a config and a logger and returns a ready to go Node.\n\n```go\ntype PrivNodeID struct {\n\tNodeID\n\tPrivKey crypto.PrivKey\n}\n```\n\n```go\nfunc (pnid *PrivNodeID) SignGreeting() *SignedNodeGreeting\n```\n\n```go\ntype SignedNodeGreeting struct {\n\tNodeGreeting\n\tSignature crypto.Signature\n}\n```\n\n","path":"github.com/ericdmann/tendermint/node","name":"node","synopsis":"","isRedistributable":true}
