Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // An API for interating links and edges from the link graph. GraphAPI GraphAPI // An API for updating the PageRank score for indexed documents. IndexAPI IndexAPI // An API for detecting the partition assignments for this service. PartitionDetector partition.Detector // A clock instance for generating time-related events. If not specified, // the default wall-clock will be used instead. Clock clock.Clock // The number of workers to spin up for computing PageRank scores. If // not specified, a default value of 1 will be used instead. ComputeWorkers int // The time between subsequent crawler passes. UpdateInterval time.Duration // The logger to use. If not defined an output-discarding logger will // be used instead. Logger *logrus.Entry }
Config encapsulates the settings for configuring the PageRank calculator service.
type GraphAPI ¶
type GraphAPI interface { Links(fromID, toID uuid.UUID, retrievedBefore time.Time) (graph.LinkIterator, error) Edges(fromID, toID uuid.UUID, updatedBefore time.Time) (graph.EdgeIterator, error) }
GraphAPI defines as set of API methods for fetching the links and edges from the link graph.
type IndexAPI ¶
IndexAPI defines a set of API methods for updating PageRank scores for indexed documents.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service implements the PageRank calculator component for the Links 'R' Us project.
func NewService ¶
NewService creates a new PageRank calculator service instance with the specified config.
Click to show internal directories.
Click to hide internal directories.