reputation

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2020 License: MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MinerScore

type MinerScore struct {
	Addr  string
	Score int
}

MinerScore contains a score for a miner.

type Module

type Module struct {
	// contains filtered or unexported fields
}

Module consolidates different sources of information to create a reputation rank of FC miners.

func New

New returns a new reputation Module.

func (*Module) AddSource

func (rm *Module) AddSource(id string, maddr ma.Multiaddr) error

AddSource adds a new external Source to be considered for reputation generation.

func (*Module) Close

func (rm *Module) Close() error

Close closes the reputation Module.

func (*Module) GetTopMiners

func (rm *Module) GetTopMiners(n int) ([]MinerScore, error)

GetTopMiners gets the top n miners with best score.

func (*Module) QueryMiners

func (rm *Module) QueryMiners(excludedMiners []string, countryCodes []string, trustedMiners []string) ([]MinerScore, error)

QueryMiners makes a filtered query on the scored-sorted miner list. Empty filter slices represent no-filters applied.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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