node

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2018 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	DAddr doogleAddress
	// contains filtered or unexported fields
}

func NewNode

func NewNode(difficulty int, nAddr string, logger *logrus.Logger, cr crawler.Crawler, queueCap int) (*Node, error)

func (*Node) CloseConnections

func (n *Node) CloseConnections()

func (*Node) FindIndex

func (n *Node) FindIndex(ctx context.Context, in *doogle.FindIndexRequest) (*doogle.FindIndexReply, error)

func (*Node) FindNode

func (n *Node) FindNode(ctx context.Context, in *doogle.FindNodeRequest) (*doogle.NodeInfos, error)

func (*Node) GetIndex

func (n *Node) GetIndex(ctx context.Context, in *doogle.StringMessage) (*doogle.GetIndexReply, error)

func (*Node) Ping

func (n *Node) Ping(ctx context.Context, in *doogle.StringMessage) (*doogle.StringMessage, error)

func (*Node) PingTo

func (n *Node) PingTo(ctx context.Context, in *doogle.NodeInfo) (*doogle.StringMessage, error)

func (*Node) PingWithCertificate

func (n *Node) PingWithCertificate(ctx context.Context, in *doogle.NodeCertificate) (*doogle.NodeCertificate, error)

func (*Node) PostUrl

func (n *Node) PostUrl(ctx context.Context, in *doogle.StringMessage) (*doogle.StringMessage, error)

func (*Node) StartPageRankComputer

func (n *Node) StartPageRankComputer(numWorker int)

func (*Node) StoreItem

func (n *Node) StoreItem(ctx context.Context, in *doogle.StoreItemRequest) (*doogle.Empty, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL