Documentation ¶
Index ¶
- func InitBlocksMaker(s *NodeServer) (c *blocksMaker)
- func InitQueryFilter(proxyAddr, dbAddr string, node *nodemanager.Node, logger *utils.LoggerMan, ...) (q *queryFilter, err error)
- func StartChangesChecker(s *NodeServer) (c *changesChecker)
- type NodeDaemon
- func (n *NodeDaemon) DaemonizeServer() error
- func (n *NodeDaemon) GetRunningProcessInfo() (int, string)
- func (n *NodeDaemon) GetServerState() (bool, int, int, error)
- func (n *NodeDaemon) Init() error
- func (n *NodeDaemon) StartServer() error
- func (n *NodeDaemon) StartServerInteractive() error
- func (n *NodeDaemon) StopServer() error
- type NodeServer
- type NodeServerRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitBlocksMaker ¶
func InitBlocksMaker(s *NodeServer) (c *blocksMaker)
func InitQueryFilter ¶
func StartChangesChecker ¶
func StartChangesChecker(s *NodeServer) (c *changesChecker)
Types ¶
type NodeDaemon ¶
type NodeDaemon struct { Port int LocalPort int Host string ConfigDir string Server *NodeServer Logger *utils.LoggerMan Node *nodemanager.Node DBProxyAddr string DBAddr string }
func (*NodeDaemon) DaemonizeServer ¶
func (n *NodeDaemon) DaemonizeServer() error
Makes a daemon process. It starts node server and waits for interrupt signal when to exit.
func (*NodeDaemon) GetRunningProcessInfo ¶
func (n *NodeDaemon) GetRunningProcessInfo() (int, string)
Returns port and auth string of currently running process
func (*NodeDaemon) GetServerState ¶
func (n *NodeDaemon) GetServerState() (bool, int, int, error)
* Returns state of a server. Detects if it is running
func (*NodeDaemon) Init ¶
func (n *NodeDaemon) Init() error
func (*NodeDaemon) StartServer ¶
func (n *NodeDaemon) StartServer() error
func (*NodeDaemon) StartServerInteractive ¶
func (n *NodeDaemon) StartServerInteractive() error
func (*NodeDaemon) StopServer ¶
func (n *NodeDaemon) StopServer() error
type NodeServer ¶
type NodeServer struct { ConfigDir string Node *nodemanager.Node NodeAddress netlib.NodeAddr // Port can be different from NodePort. NodeAddress is address exposed outside NodePort int // This is the port where a server will listen Transit nodeTransit Logger *utils.LoggerMan // Channels to manipulate roitunes StopMainChan chan struct{} StopMainConfirmChan chan struct{} DBProxyAddr string DBAddr string QueryFilter *queryFilter NodeAuthStr string // contains filtered or unexported fields }
func (*NodeServer) GetClient ¶
func (s *NodeServer) GetClient() *nodeclient.NodeClient
func (*NodeServer) StartServer ¶
func (s *NodeServer) StartServer(serverStartResult chan string) error
func (*NodeServer) TryToMakeNewBlock ¶
func (s *NodeServer) TryToMakeNewBlock(tx []byte)
* Sends signal to routine where we make blocks. This makes the routine to check transactions in unapproved cache * And try to make a block if there are enough transactions
type NodeServerRequest ¶
type NodeServerRequest struct { Node *nodemanager.Node S *NodeServer Request []byte RequestIP string Logger *utils.LoggerMan HasResponse bool Response []byte NodeAuthStrIsGood bool SessID string }
func (*NodeServerRequest) Init ¶
func (s *NodeServerRequest) Init()
Click to show internal directories.
Click to hide internal directories.