Documentation ¶
Index ¶
- type LevelDBBackend
- func (backend *LevelDBBackend) Close() error
- func (backend *LevelDBBackend) Del(ctx context.Context, key string) error
- func (backend *LevelDBBackend) Get(ctx context.Context, name string) (*internal.Route, error)
- func (backend *LevelDBBackend) GetAll(ctx context.Context) (map[string]internal.Route, error)
- func (backend *LevelDBBackend) List(ctx context.Context, start string) (internal.RouteIterator, error)
- func (backend *LevelDBBackend) NextID(ctx context.Context) (uint64, error)
- func (backend *LevelDBBackend) Put(ctx context.Context, key string, rt *internal.Route) error
- type LevelDBRouteIterator
- func (i *LevelDBRouteIterator) Error() error
- func (i *LevelDBRouteIterator) Name() string
- func (i *LevelDBRouteIterator) Next() bool
- func (i *LevelDBRouteIterator) Release()
- func (i *LevelDBRouteIterator) Route() *internal.Route
- func (i *LevelDBRouteIterator) Seek(cur string) bool
- func (i *LevelDBRouteIterator) Valid() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LevelDBBackend ¶
type LevelDBBackend struct {
// contains filtered or unexported fields
}
LevelDBBackend provides access to the leveldb store.
func (*LevelDBBackend) Close ¶
func (backend *LevelDBBackend) Close() error
Close the resources associated with this backend.
func (*LevelDBBackend) Del ¶
func (backend *LevelDBBackend) Del(ctx context.Context, key string) error
Del removes an existing shortcut from the data store.
func (*LevelDBBackend) List ¶
func (backend *LevelDBBackend) List(ctx context.Context, start string) (internal.RouteIterator, error)
List all routes in an iterator, starting with the key prefix of start (which can also be nil).
type LevelDBRouteIterator ¶
type LevelDBRouteIterator struct {
// contains filtered or unexported fields
}
Iter allows iteration of the named routes in the store.
func (*LevelDBRouteIterator) Error ¶
func (i *LevelDBRouteIterator) Error() error
Error returns any active error that has stopped the iterator.
func (*LevelDBRouteIterator) Name ¶
func (i *LevelDBRouteIterator) Name() string
Name is the name of the current route.
func (*LevelDBRouteIterator) Next ¶
func (i *LevelDBRouteIterator) Next() bool
Next advances the iterator to the next value.
func (*LevelDBRouteIterator) Release ¶
func (i *LevelDBRouteIterator) Release()
Release disposes of the resources in the iterator.
func (*LevelDBRouteIterator) Route ¶
func (i *LevelDBRouteIterator) Route() *internal.Route
Route is the current route.
func (*LevelDBRouteIterator) Valid ¶
func (i *LevelDBRouteIterator) Valid() bool
Valid indicates whether the current values of the iterator are valid.
Click to show internal directories.
Click to hide internal directories.