Documentation ¶
Index ¶
- Variables
- func AsTopoHandler(w http.ResponseWriter, r *http.Request, options *CmdOptions, cfg ASConfigs)
- 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, myIA 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, cfg ASConfigs)
- func TrcHandler(w http.ResponseWriter, r *http.Request, options *CmdOptions)
- func WriteCmdCsv(d model.CmdItem, options *CmdOptions, appSel string)
- type ASConfig
- type ASConfigs
- type CmdOptions
- type DefHealthCheck
- type DefTests
- type Hop
- type Path
- type ResHealthCheck
Constants ¶
This section is empty.
Variables ¶
var CMD_ADR = "a"
command argument constants
var CMD_BRT = "r"
var CMD_PRT = "p"
var CMD_SCC = "sgenc"
var CMD_SCG = "sgen"
var CMD_WEB = "srvroot"
var DEF_SCIONDIR = path.Join(GOPATH, "src/github.com/scionproto/scion")
scionRoot is the root location of the scion infrastructure.
var GOPATH = os.Getenv("GOPATH")
appsRoot is the root location of scionlab apps.
Functions ¶
func AsTopoHandler ¶
func AsTopoHandler(w http.ResponseWriter, r *http.Request, options *CmdOptions, cfg ASConfigs)
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)
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, myIA string, cfg ASConfig)
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, cfg ASConfigs)
PathTopoHandler handles requests for paths, returning results from sciond.
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.
Types ¶
type ASConfigs ¶ added in v0.4.0
mapping AS addresses to their corresponding configs
func ScanLocalSetting ¶ added in v0.4.0
func ScanLocalSetting(options *CmdOptions) ASConfigs
ScanLocalSetting will load list of locally available IAs and their corresponding Scionds
type CmdOptions ¶
type CmdOptions struct { Addr string Port int StaticRoot string BrowseRoot string ScionGen string ScionGenCache string }
func ParseFlags ¶ added in v0.2.0
func ParseFlags() CmdOptions
func (*CmdOptions) AbsPathCmdOptions ¶ added in v0.2.0
func (o *CmdOptions) AbsPathCmdOptions()
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.