trust

package
v0.19.7 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2019 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Error = errs.Class("trust:")

Error is the default error class

Functions

This section is empty.

Types

type Pool

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

Pool implements different peer verifications.

func NewPool

func NewPool(transport transport.Client, trustedSatellites storj.NodeURLs) (*Pool, error)

NewPool creates a new trust pool of the specified list of trusted satellites.

func (*Pool) FetchPeerIdentity added in v0.15.3

func (pool *Pool) FetchPeerIdentity(ctx context.Context, url storj.NodeURL) (_ *identity.PeerIdentity, err error)

FetchPeerIdentity dials the url and fetches the identity.

func (*Pool) GetAddress added in v0.15.0

func (pool *Pool) GetAddress(ctx context.Context, id storj.NodeID) (_ string, err error)

GetAddress returns the address of a satellite in the trusted list

func (*Pool) GetSatellites added in v0.14.0

func (pool *Pool) GetSatellites(ctx context.Context) (satellites []storj.NodeID)

GetSatellites returns a slice containing all trusted satellites

func (*Pool) GetSignee

func (pool *Pool) GetSignee(ctx context.Context, id storj.NodeID) (_ signing.Signee, err error)

GetSignee gets the corresponding signee for verifying signatures. It ignores passed in ctx cancellation to avoid miscaching between concurrent requests.

func (*Pool) VerifySatelliteID

func (pool *Pool) VerifySatelliteID(ctx context.Context, id storj.NodeID) (err error)

VerifySatelliteID checks whether id corresponds to a trusted satellite.

Jump to

Keyboard shortcuts

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