1
0
mirror of https://github.com/alice-lg/alice-lg.git synced 2024-05-11 05:55:03 +00:00

add config option for on demand noexport loading

This commit is contained in:
Matthias Hannig
2018-08-03 14:38:32 +02:00
parent 192dd115f3
commit c342d7a5b0
3 changed files with 8 additions and 4 deletions

View File

@ -129,8 +129,9 @@ func apiConfigShow(_req *http.Request, _params httprouter.Params) (api.Response,
RejectReasons: SerializeReasons(
AliceConfig.Ui.RoutesRejections.Reasons),
Noexport: api.Noexport{
Asn: AliceConfig.Ui.RoutesNoexports.Asn,
NoexportId: AliceConfig.Ui.RoutesNoexports.NoexportId,
Asn: AliceConfig.Ui.RoutesNoexports.Asn,
NoexportId: AliceConfig.Ui.RoutesNoexports.NoexportId,
LoadOnDemand: AliceConfig.Ui.RoutesNoexports.LoadOnDemand,
},
NoexportReasons: SerializeReasons(
AliceConfig.Ui.RoutesNoexports.Reasons),

View File

@ -46,8 +46,9 @@ type Rejection struct {
}
type Noexport struct {
Asn int `json:"asn"`
NoexportId int `json:"noexport_id"`
Asn int `json:"asn"`
NoexportId int `json:"noexport_id"`
LoadOnDemand bool `json:"load_on_demand"`
}
// Status

View File

@ -35,6 +35,8 @@ type NoexportsConfig struct {
NoexportId int `ini:"noexport_id"`
Reasons map[int]string
LoadOnDemand bool
}
type UiConfig struct {