retrieval

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: May 25, 2022 License: BSD-3-Clause Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	RetrieveChunk(ctx context.Context, rootAddr, chunkAddr boson.Address) (chunk boson.Chunk, err error)
	GetRouteScore(time int64) map[string]int64
}

type Service

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

func New

func New(addr boson.Address, streamer p2p.Streamer, routeTable routetab.RouteTab, storer storage.Storer,
	isFullNode bool, logger logging.Logger, tracer *tracing.Tracer, accounting accounting.Interface, subPub subscribe.SubPub) *Service

func (*Service) API added in v1.3.0

func (s *Service) API() rpc.API

func (*Service) Config

func (s *Service) Config(chunkInfo chunkinfo.Interface)

func (*Service) GetRouteScore added in v1.1.0

func (s *Service) GetRouteScore(time int64) map[string]int64

func (*Service) Metrics

func (s *Service) Metrics() []prometheus.Collector

func (*Service) Protocol

func (s *Service) Protocol() p2p.ProtocolSpec

func (*Service) RetrieveChunk

func (s *Service) RetrieveChunk(ctx context.Context, rootAddr, chunkAddr boson.Address) (chunk boson.Chunk, err error)

func (*Service) RetrieveChunkFromNode

func (s *Service) RetrieveChunkFromNode(ctx context.Context, targetNode boson.Address, rootAddr, chunkAddr boson.Address) (boson.Chunk, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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