pathdb

package
v0.0.0-...-c8fc2fc Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

func New

func New(path string, backend string) (*DB, error)

New creates a new or open an existing PathDB at a given path using the given backend.

func (*DB) Delete

func (db *DB) Delete(segID common.RawBytes) (int, error)

Delete deletes a path segment with a given ID. Returns the number of deleted path segments (0 or 1).

func (*DB) DeleteWithIntf

func (db *DB) DeleteWithIntf(intf query.IntfSpec) (int, error)

DeleteWithIntf deletes all path segments that contain a given interface. Returns the number of path segments deleted.

func (*DB) Get

func (db *DB) Get(params *query.Params) ([]*query.Result, error)

Get returns all path segment(s) matching the parameters specified.

func (*DB) Insert

func (db *DB) Insert(pseg *seg.PathSegment, segTypes []seg.Type) (int, error)

Insert inserts or updates a path segment. It returns the number of path segments that have been inserted/updated.

func (*DB) InsertWithHPCfgIDs

func (db *DB) InsertWithHPCfgIDs(pseg *seg.PathSegment,
	segTypes []seg.Type, hpCfgIDs []*query.HPCfgID) (int, error)

InsertWithCfgIDs inserts or updates a path segment with a set of HPCfgIDs. It returns the number of path segments that have been inserted/updated.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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