server

package
v0.0.0-...-f8f499d Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCommand

func GetCommand(w http.ResponseWriter, r *http.Request)

GetCommand sends back the current test run. In cooperation with RemoveCommand does it provide the next command in the queue.

func GetRun

func GetRun(w http.ResponseWriter, r *http.Request)

GetRun sends back the data of the current test run

func GetTestEvents

func GetTestEvents(w http.ResponseWriter, r *http.Request)

GetTestEvents sends back all filtered events

func GetTestResults

func GetTestResults(w http.ResponseWriter, r *http.Request)

GetTestResults sends back all test results

func GetTestSummary

func GetTestSummary(w http.ResponseWriter, r *http.Request)

GetTestSummary sends back the summary of the last test run.

func InitRun

func InitRun(w http.ResponseWriter, r *http.Request)

InitRun creates a new test run according to a given name. It reads the appropriate command file, creates a new test directory, and send the test run back

func PrepareTestSummary

func PrepareTestSummary(w http.ResponseWriter, r *http.Request)

PrepareTestSummary prepares the summary after the test run. It saves the data of the run, the filters, and the summary in JSON files in the directory of the test run.

func PutTestEvent

func PutTestEvent(w http.ResponseWriter, r *http.Request)

PutTestEvent receives data of a filtered event

func PutTestResult

func PutTestResult(w http.ResponseWriter, r *http.Request)

PutTestResult receives the result of a test command

func RemoveCommand

func RemoveCommand(w http.ResponseWriter, r *http.Request)

RemoveCommand removes the last command from the queue. In cooperation with GetCommand does it provide the next command in the queue.

func ResetRun

func ResetRun(w http.ResponseWriter, r *http.Request)

ResetRun resets current test run.

func Run

func Run()

Run starts the service.

Types

type CommandResult

type CommandResult struct {
	Peer   string `json:"peer,omitempty"`
	Status string `json:"status,omitempty"`
	Data   string `json:"data"`
}

CommandResult is used to receive the result of a command and will be stored in the current test result.

type TestEvaluation

type TestEvaluation struct {
	ID      string `json:"id,omitempty"`
	Name    string `json:"name,omitempty"`
	Peer    string `json:"peer,omitempty"`
	Status  string `json:"status,omitempty"`
	Kind    string `json:"kind,omitempty"`
	Test    string `json:"test,omitempty"`
	Result  string `json:"result,omitempty"`
	Comment string `json:"comment,omitempty"`
}

TestEvaluation stores the evaluation of one command or event of the test run. An array of these test evaluations is the current test summary.

type TestEventFilter

type TestEventFilter struct {
	ID                string `json:"id,omitempty"`
	Name              string `json:"name,omitempty"`
	Peer              string `json:"peer,omitempty"`
	Source            string `json:"source,omitempty"`
	Filter            string `json:"filter,omitempty"`
	Event             string `json:"event,omitempty"`
	NumExpectedEvents uint8  `json:"num_expected_events,omitempty"`
	NumReceivedEvents uint8  `json:"num_received_events"`
}

TestEventFilter stores information about defined filters and their matching events.

type TestResult

type TestResult struct {
	ID             string `json:"id,omitempty"`
	Name           string `json:"name,omitempty"`
	CommandResults []*CommandResult
}

TestResult stores the results of a test run.

type TestRun

type TestRun struct {
	ID          string   `json:"id,omitempty"`
	Name        string   `json:"name,omitempty"`
	Commands    []string `json:"commands,omitempty"`
	CurrentPeer string   `json:"currentpeer,omitempty"`
	Status      string   `json:"status,omitempty"`
}

TestRun is the struct for the multi peer test

Jump to

Keyboard shortcuts

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