Documentation
¶
Index ¶
- func AsTopoHandler(w http.ResponseWriter, r *http.Request)
- func ConfigHandler(w http.ResponseWriter, r *http.Request)
- func ExtractBwtestRespData(resp string, d *model.BwTestItem, start time.Time)
- func ExtractEchoRespData(resp string, d *model.EchoItem, start time.Time)
- func ExtractTracerouteRespData(resp string, d *model.TracerouteItem, start time.Time)
- func FindImageHandler(w http.ResponseWriter, r *http.Request, options *CmdOptions, ...)
- func FindImageInfoHandler(w http.ResponseWriter, r *http.Request, options *CmdOptions)
- func GenClientNodeDefaults(options *CmdOptions, cisdas string)
- func GenServerNodeDefaults(options *CmdOptions, localIAs []string)
- func GeolocateHandler(w http.ResponseWriter, r *http.Request)
- func GetBwByTimeHandler(w http.ResponseWriter, r *http.Request, active bool)
- func GetEchoByTimeHandler(w http.ResponseWriter, r *http.Request, active bool)
- func GetNodesHandler(w http.ResponseWriter, r *http.Request, options *CmdOptions)
- func GetTracerouteByTimeHandler(w http.ResponseWriter, r *http.Request, active bool)
- func HealthCheckHandler(w http.ResponseWriter, r *http.Request, options *CmdOptions, ia string)
- func LabelsHandler(w http.ResponseWriter, r *http.Request)
- func LocationsHandler(w http.ResponseWriter, r *http.Request)
- func PathTopoHandler(w http.ResponseWriter, r *http.Request, options *CmdOptions)
- func ScanLocalIAs(options *CmdOptions) []string
- func StringInSlice(arr []string, i string) bool
- func TrcHandler(w http.ResponseWriter, r *http.Request, options *CmdOptions)
- func WriteCmdCsv(d model.CmdItem, options *CmdOptions, appSel string)
- func WriteUserSetting(options *CmdOptions, settings UserSetting)
- type CmdOptions
- type DefHealthCheck
- type DefTests
- type ResHealthCheck
- type UserSetting
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsTopoHandler ¶
func AsTopoHandler(w http.ResponseWriter, r *http.Request)
AsTopoHandler handles requests for AS data, returning results from sciond.
func ConfigHandler ¶
func ConfigHandler(w http.ResponseWriter, r *http.Request)
ConfigHandler handles requests for configurable, centralized data sources.
func ExtractBwtestRespData ¶
func ExtractBwtestRespData(resp string, d *model.BwTestItem, start time.Time)
ExtractBwtestRespData will parse cmd line output from bwtester for adding BwTestItem fields.
func ExtractEchoRespData ¶
ExtractEchoRespData will parse cmd line output from scmp echo for adding EchoItem fields.
func ExtractTracerouteRespData ¶
func ExtractTracerouteRespData(resp string, d *model.TracerouteItem, start time.Time)
ExtractTracerouteRespData will parse cmd line output from scmp traceroute for adding TracerouteItem fields.
func FindImageHandler ¶
func FindImageHandler(w http.ResponseWriter, r *http.Request, options *CmdOptions, browserAddr string, port int)
FindImageHandler locating most recent image formatting it for graphic display in response.
func FindImageInfoHandler ¶
func FindImageInfoHandler(w http.ResponseWriter, r *http.Request, options *CmdOptions)
FindImageInfoHandler locating most recent image and writing text info data about it.
func GenClientNodeDefaults ¶
func GenClientNodeDefaults(options *CmdOptions, cisdas string)
GenClientNodeDefaults queries network interfaces and writes local client SCION addresses as json
func GenServerNodeDefaults ¶
func GenServerNodeDefaults(options *CmdOptions, localIAs []string)
GenServerNodeDefaults creates server defaults for localhost testing
func GeolocateHandler ¶
func GeolocateHandler(w http.ResponseWriter, r *http.Request)
GeolocateHandler handles geolocation requests, using exernal request when needed.
func GetBwByTimeHandler ¶
func GetBwByTimeHandler(w http.ResponseWriter, r *http.Request, active bool)
GetBwByTimeHandler request the bwtest results stored since provided time.
func GetEchoByTimeHandler ¶
func GetEchoByTimeHandler(w http.ResponseWriter, r *http.Request, active bool)
GetEchoByTimeHandler request the echo results stored since provided time.
func GetNodesHandler ¶
func GetNodesHandler(w http.ResponseWriter, r *http.Request, options *CmdOptions)
GetNodesHandler queries the local environment for user/default nodes.
func GetTracerouteByTimeHandler ¶
func GetTracerouteByTimeHandler(w http.ResponseWriter, r *http.Request, active bool)
GetTracerouteByTimeHandler request the traceroute results stored since provided time.
func HealthCheckHandler ¶
func HealthCheckHandler(w http.ResponseWriter, r *http.Request, options *CmdOptions, ia string)
HealthCheckHandler handles calling the default health-check scripts and returning the json-formatted results of each script.
func LabelsHandler ¶
func LabelsHandler(w http.ResponseWriter, r *http.Request)
LabelsHandler handles AS label requests, using exernal request when needed.
func LocationsHandler ¶
func LocationsHandler(w http.ResponseWriter, r *http.Request)
LocationsHandler handles AS location requests, using exernal request when needed.
func PathTopoHandler ¶
func PathTopoHandler(w http.ResponseWriter, r *http.Request, options *CmdOptions)
PathTopoHandler handles requests for paths, returning results from sciond.
func ScanLocalIAs ¶
func ScanLocalIAs(options *CmdOptions) []string
ScanLocalIAs will load list of locally available IAs
func StringInSlice ¶
StringInSlice can check a slice for a unique string
func TrcHandler ¶
func TrcHandler(w http.ResponseWriter, r *http.Request, options *CmdOptions)
TrcHandler handles requests for all local trust root data.
func WriteCmdCsv ¶
func WriteCmdCsv(d model.CmdItem, options *CmdOptions, appSel string)
WriteCmdCsv appends the cmd data (bwtest or echo) in csv-format to srcpath.
func WriteUserSetting ¶
func WriteUserSetting(options *CmdOptions, settings UserSetting)
WriteUserSetting writes the settings to disk.
Types ¶
type CmdOptions ¶
type CmdOptions struct {
StaticRoot, BrowseRoot, AppsRoot, ScionRoot, ScionBin, ScionGen, ScionGenCache, ScionLogs string
}
type DefHealthCheck ¶
type DefHealthCheck struct {
Label string `json:"label"`
Script string `json:"script"`
Desc string `json:"desc"`
}
DefHealthCheck holds JSON fields for a health check definition.
type DefTests ¶
type DefTests struct {
Tests []DefHealthCheck `json:"tests"`
}
DefTests holds the JSON array for all health checks.
type ResHealthCheck ¶
type ResHealthCheck struct {
Label string `json:"label"`
Title string `json:"desc"`
Reason string `json:"reason"`
Pass bool `json:"pass"`
Start int64 `json:"start"`
End int64 `json:"end"`
}
ResHealthCheck holds JSON fields for a health check result.
type UserSetting ¶
type UserSetting struct {
MyIA string `json:"myIa"`
}
UserSetting holds the serialized structure for persistent user settings
func ReadUserSetting ¶
func ReadUserSetting(options *CmdOptions) UserSetting
ReadUserSetting reads the settings from disk.