package
Version:
v0.0.0-...-17f4e14
Opens a new window with list of versions in this module.
Published: Feb 14, 2019
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package db manages route storage for FastGate.
The storage is performed by a Key-Value community database called Badger.
GetEndpoint finds an address matching an key and returns it as a string.
Init takes a path as input and reads / creates a bBadger database .
UpdateEndpoint is a simple querry that inserts/updates the Endpoint tuple used by FastGate.
type Endpoint struct {
Address string `json:"address"`
Resource string `json:"resource"`
}
Endpoint structure stores the Endpoints for the gateway.
GetEndpoints function will read every entry in the database and return it as a list of Endpoints.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.