1
0
mirror of https://github.com/alice-lg/alice-lg.git synced 2024-05-11 05:55:03 +00:00
2021-11-15 21:29:54 +01:00

22 lines
749 B
Go

// Package sources provides the base interface for all
// route server data source implementations.
package sources
import (
"github.com/alice-lg/alice-lg/pkg/api"
)
// Source is a generic datasource for alice.
// All route server adapters implement this interface.
type Source interface {
ExpireCaches() int
Status() (*api.StatusResponse, error)
Neighbors() (*api.NeighborsResponse, error)
NeighborsStatus() (*api.NeighborsStatusResponse, error)
Routes(neighborID string) (*api.RoutesResponse, error)
RoutesReceived(neighborID string) (*api.RoutesResponse, error)
RoutesFiltered(neighborID string) (*api.RoutesResponse, error)
RoutesNotExported(neighborID string) (*api.RoutesResponse, error)
AllRoutes() (*api.RoutesResponse, error)
}