lib

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2021 License: Apache-2.0 Imports: 36 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CMD_ADR = "a"

command argument constants

View Source
var CMD_BRT = "r"
View Source
var CMD_PRT = "p"
View Source
var CMD_SCC = "sgenc"
View Source
var CMD_SCG = "sgen"
View Source
var CMD_WEB = "srvroot"
View Source
var DEF_SCIONDIR = path.Join(GOPATH, "src/github.com/scionproto/scion")

scionRoot is the root location of the scion infrastructure.

View Source
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

func ExtractEchoRespData(resp string, d *model.EchoItem, start time.Time)

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 ASConfig added in v0.4.0

type ASConfig struct {
	Sciond        string
	SdTomlPath    string
	TopologyPath  string
	MetricsServer string
}

ASConfig holds data about ia

type ASConfigs added in v0.4.0

type ASConfigs = map[string]ASConfig

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.

type Hop added in v0.2.0

type Hop struct {
	IfID common.IFIDType
	IA   addr.IA
}

Hop represents an hop on the path.

type Path added in v0.2.0

type Path struct {
	Fingerprint string
	Hops        []Hop
	Expiry      time.Time
	MTU         uint16
}

Path holds information about the discovered path.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL