Documentation
¶
Overview ¶
Package memory implements the neighbor table database in memory, for tests and embeddings that prefer no state directory.
Index ¶
- type DB
- func (d *DB) All(ctx context.Context) ([]*links.Link, error)
- func (d *DB) ByNeighbor(ctx context.Context, ia addr.IA) (*links.Link, error)
- func (d *DB) ByRemote(ctx context.Context, remote netip.AddrPort) (*links.Link, error)
- func (d *DB) Close() error
- func (d *DB) Insert(ctx context.Context, l *links.Link) error
- func (d *DB) Update(ctx context.Context, l *links.Link) error
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
}
DB is the in-memory neighbor table: one mutex over a slice, interface IDs allocated from a monotonic counter.
func (*DB) ByNeighbor ¶
ByNeighbor returns the live entry of the neighbor.