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