http

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2022 License: MIT Imports: 44 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NoCache

func NoCache(h http.HandlerFunc) http.HandlerFunc

Types

type FrontendTestRunListEntry

type FrontendTestRunListEntry struct {
	ID                       string                     `json:"id"`
	CreatedByThumbprint      string                     `json:"createdByuserThumbprint"`
	Created                  time.Time                  `json:"created"`
	Started                  time.Time                  `json:"started"`
	Completed                time.Time                  `json:"completed"`
	DontRunUntil             time.Time                  `json:"notBefore"`
	Status                   common.TestRunStatus       `json:"status"`
	Architecture             string                     `json:"architectureID"`
	SweepID                  string                     `json:"sweepID"`
	SweepOneAtATime          bool                       `json:"sweepOneAtATime"`
	RoleCounts               []FrontendTestRunRoleCount `json:"roleCounts"`
	Details                  string                     `json:"details"`
	AvgThroughput            float64                    `json:"avgThroughput"`
	TailLatency              float64                    `json:"tailLatency"`
	PerformanceDataAvailable bool                       `json:"performanceDataAvailable"`
	InvalidTxRate            float64                    `json:"invalidTxRate"`
	FixedTxRate              float64                    `json:"fixedTxRate"`
	PreseedCount             int64                      `json:"preseedCount"`
	PreseedShards            bool                       `json:"preseedShards"`
	ShardReplicationFactor   int                        `json:"shardReplicationFactor"`
	LoadGenOutputCount       int                        `json:"loadGenOutputCount"`
	LoadGenInputCount        int                        `json:"loadGenInputCount"`
}

Limited subset of test run properties used for rendering the list(s)

type FrontendTestRunRoleCount

type FrontendTestRunRoleCount struct {
	RoleType common.SystemRole `json:"role"`
	Count    int               `json:"count"`
}

type HttpServer

type HttpServer struct {
	// contains filtered or unexported fields
}

func (*HttpServer) AuthorizeHandler

func (srv *HttpServer) AuthorizeHandler(
	w http.ResponseWriter,
	req *http.Request,
)

func (*HttpServer) AuthorizeScriptHandler

func (srv *HttpServer) AuthorizeScriptHandler(
	w http.ResponseWriter,
	req *http.Request,
)

func (*HttpServer) GetConfigForClient

func (srv *HttpServer) GetConfigForClient(
	hi *tls.ClientHelloInfo,
) (*tls.Config, error)

func (*HttpServer) GetHttpsEndpoint

func (srv *HttpServer) GetHttpsEndpoint(
	protocol string,
	port int,
	req *http.Request,
) string

func (*HttpServer) GetSystemStateEvent

func (srv *HttpServer) GetSystemStateEvent() coordinator.Event

func (*HttpServer) HealthHandler

func (srv *HttpServer) HealthHandler(w http.ResponseWriter, req *http.Request)

func (*HttpServer) HttpsRedirect

func (srv *HttpServer) HttpsRedirect(w http.ResponseWriter, req *http.Request)

func (*HttpServer) ReloadCerts

func (srv *HttpServer) ReloadCerts()

func (*HttpServer) Run

func (srv *HttpServer) Run() error

func (*HttpServer) UserFromCert

func (srv *HttpServer) UserFromCert(cert *x509.Certificate) *SystemUser

func (*HttpServer) UserFromRequest

func (srv *HttpServer) UserFromRequest(r *http.Request) (*SystemUser, error)

func (*HttpServer) UserFromThumbprint

func (srv *HttpServer) UserFromThumbprint(thumbprint string) *SystemUser

type SweepData

type SweepData struct {
	ID                      string                   `json:"id"`
	ArchitectureID          string                   `json:"architectureID"`
	RunCount                int                      `json:"runCount"`
	SweepType               string                   `json:"sweepType"`
	SweepParameter          string                   `json:"sweepParameter"`
	FirstRun                time.Time                `json:"firstRun"`
	LastRun                 time.Time                `json:"lastRun"`
	FirstRunData            FrontendTestRunListEntry `json:"firstRunData"`
	FirstRunID              string
	SweepRoleRuns           int                    `json:"sweepRoleRuns"`
	SweepParameterStart     float64                `json:"sweepParameterStart"`
	SweepParameterStop      float64                `json:"sweepParameterStop"`
	SweepParameterIncrement float64                `json:"sweepParameterIncrement"`
	SweepRoles              []*common.TestRunRole  `json:"sweepRoles"`
	CommonParameters        map[string]interface{} `json:"commonParameters"`
}

type SweepPlotAxis

type SweepPlotAxis struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type SweepPlotConfig

type SweepPlotConfig struct {
	// The types of plots users can generate
	Types  []SweepPlotType  `json:"types"`
	Fields []SweepPlotField `json:"fields"`
	Axes   []SweepPlotAxis  `json:"axes"`
}

type SweepPlotField

type SweepPlotField struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	Eval      string `json:"eval"`
	ShortHand string `json:"shortHand"`
}

type SweepPlotType

type SweepPlotType struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type SystemUser

type SystemUser struct {
	CN           string `json:"name"`
	Email        string `json:"email"`
	Organization string `json:"org"`
	Thumbprint   string `json:"thumbPrint"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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