Documentation ¶
Index ¶
- Constants
- type Backend
- func (b *Backend) BeginTransaction(ctx context.Context, opts *sql.TxOptions) (pathdb.Transaction, error)
- func (b *Backend) Close() error
- func (e Backend) Delete(ctx context.Context, params *query.Params) (int, error)
- func (e Backend) DeleteExpired(ctx context.Context, now time.Time) (int, error)
- func (e Backend) DeleteExpiredNQ(ctx context.Context, now time.Time) (int, error)
- func (e Backend) DeleteNQ(ctx context.Context, src, dst addr.IA, policy pathdb.PolicyHash) (int, error)
- func (e Backend) Get(ctx context.Context, params *query.Params) (query.Results, error)
- func (e Backend) GetAll(ctx context.Context) (<-chan query.ResultOrErr, error)
- func (e Backend) GetNextQuery(ctx context.Context, src, dst addr.IA, policy pathdb.PolicyHash) (time.Time, error)
- func (e Backend) Insert(ctx context.Context, segMeta *seg.Meta) (pathdb.InsertStats, error)
- func (e Backend) InsertNextQuery(ctx context.Context, src, dst addr.IA, policy pathdb.PolicyHash, ...) (bool, error)
- func (e Backend) InsertWithHPCfgIDs(ctx context.Context, segMeta *seg.Meta, hpCfgIDs []*query.HPCfgID) (pathdb.InsertStats, error)
- func (b *Backend) SetMaxIdleConns(maxIdleConns int)
- func (b *Backend) SetMaxOpenConns(maxOpenConns int)
Constants ¶
View Source
const ( // SchemaVersion is the version of the SQLite schema understood by this backend. // Whenever changes to the schema are made, this version number should be increased // to prevent data corruption between incompatible database schemas. SchemaVersion = 8 // Schema is the SQLite database layout. Schema = `` /* 1375-byte string literal not displayed */ SegmentsTable = "Segments" IntfToSegTable = "IntfToSeg" StartsAtTable = "StartsAt" EndsAtTable = "EndsAt" SegTypesTable = "SegTypes" HpCfgIdsTable = "HpCfgIds" NextQueryTable = "NextQuery" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
func New ¶
New returns a new SQLite backend opening a database at the given path. If no database exists a new database is be created. If the schema version of the stored database is different from the one in schema.go, an error is returned.
func (*Backend) BeginTransaction ¶ added in v0.4.0
func (Backend) DeleteExpired ¶ added in v0.3.0
func (Backend) DeleteExpiredNQ ¶ added in v0.4.0
func (Backend) GetAll ¶ added in v0.4.0
func (e Backend) GetAll(ctx context.Context) (<-chan query.ResultOrErr, error)
func (Backend) GetNextQuery ¶ added in v0.3.0
func (Backend) InsertNextQuery ¶ added in v0.3.0
func (Backend) InsertWithHPCfgIDs ¶
func (*Backend) SetMaxIdleConns ¶ added in v0.4.0
func (*Backend) SetMaxOpenConns ¶ added in v0.4.0
Click to show internal directories.
Click to hide internal directories.