pathdb

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PathDB added in v0.3.0

type PathDB interface {
	// Insert inserts or updates a path segment. It returns the number of path segments
	// that have been inserted/updated.
	Insert(context.Context, *seg.PathSegment, []proto.PathSegType) (int, error)
	// InsertWithHPCfgIDs inserts or updates a path segment with a set of HPCfgIDs. It
	// returns the number of path segments that have been inserted/updated.
	InsertWithHPCfgIDs(context.Context, *seg.PathSegment, []proto.PathSegType, []*query.HPCfgID) (
		int, error)
	// Delete deletes all path segments that matches the given query,
	// returning the number of deleted segments
	Delete(context.Context, *query.Params) (int, error)
	// DeleteExpired deletes all paths segments that are expired, using now as a reference.
	// Returns the number of deleted segments.
	DeleteExpired(ctx context.Context, now time.Time) (int, error)
	// Get returns all path segment(s) matching the parameters specified.
	Get(context.Context, *query.Params) ([]*query.Result, error)
	// InsertNextQuery inserts or updates the timestamp nextQuery for the given dst.
	InsertNextQuery(ctx context.Context, dst addr.IA, nextQuery time.Time) (bool, error)
	// GetNextQuery returns the nextQuery timestamp for the given dst,
	// or nil if it hasn't been queried.
	GetNextQuery(ctx context.Context, dst addr.IA) (*time.Time, error)
}

PathDB defines the interface that all PathDB backends have to implement.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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