fetcher

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2018 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Package fetcher implements path segment fetching, verification and combination logic for SCIOND.

Index

Constants

View Source
const (
	DefaultMinWorkerLifetime = 10 * time.Second
)

Variables

This section is empty.

Functions

func NewExtendedContext

func NewExtendedContext(refCtx context.Context,
	minLifetime time.Duration) (context.Context, context.CancelFunc)

NewExtendedContext returns a new _independent_ context that can extend past refCtx's lifetime, guaranteeing a minimum lifetime of minLifetime. If refCtx has a deadline, the newly created context will have a deadline equal to the maximum of refCtx's deadline and (minLifetime + currentTime). If refCtx does not have a deadline, the function panics.

Because the returned context is independent, calling refCtx's cancellation function will not result in the cancellation of the returned context.

Types

type Fetcher

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

func NewFetcher

func NewFetcher(messenger infra.Messenger, pathDB pathdb.PathDB,
	trustStore infra.TrustStore, revCache revcache.RevCache, cfg sdconfig.Config,
	logger log.Logger) *Fetcher

func (*Fetcher) GetPaths

func (f *Fetcher) GetPaths(ctx context.Context, req *sciond.PathReq,
	earlyReplyInterval time.Duration) (*sciond.PathReply, error)

Jump to

Keyboard shortcuts

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