Documentation ¶
Index ¶
- func BrowseHandler(w http.ResponseWriter, r *http.Request)
- func Handler(w http.ResponseWriter, r *http.Request)
- func LogAndAddCacheControl(h http.Handler) http.Handler
- func Report(baseurl, port, datadir string) bool
- func ResultToJsData(w io.Writer, json []byte)
- func Serve(hook bincommon.FortioHook, cfg *ServerConfig) bool
- func Sync(out io.Writer, u string, datadir string) bool
- func SyncHandler(w http.ResponseWriter, r *http.Request)
- type ChartOptions
- type ListBucketResult
- type SelectableValue
- type ServerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BrowseHandler ¶ added in v0.4.2
func BrowseHandler(w http.ResponseWriter, r *http.Request)
BrowseHandler handles listing and rendering the JSON results.
func Handler ¶
func Handler(w http.ResponseWriter, r *http.Request)
Handler is the main UI handler creating the web forms and processing them. TODO: refactor common option/args/flag parsing between restHandle.go and this.
func LogAndAddCacheControl ¶ added in v0.4.2
LogAndAddCacheControl logs the request and wraps an HTTP handler to add a Cache-Control header for static files.
func Report ¶ added in v0.5.1
Report starts the browsing only UI server on the given port. Similar to Serve with only the read only part.
func ResultToJsData ¶ added in v0.4.2
ResultToJsData converts a result object to chart data arrays and title and creates a chart from the result object.
func Serve ¶
func Serve(hook bincommon.FortioHook, cfg *ServerConfig) bool
Serve starts the fhttp.Serve() plus the UI server on the given port and paths (empty disables the feature). uiPath should end with / (be a 'directory' path). Returns true if server is started successfully.
func SyncHandler ¶ added in v0.6.4
func SyncHandler(w http.ResponseWriter, r *http.Request)
SyncHandler handles syncing/downloading from TSC URL.
Types ¶
type ChartOptions ¶ added in v0.10.0
type ChartOptions struct { XMin string XMax string YMin string YMax string XIsLog bool YIsLog bool }
ChartOptions describes the user-configurable options for a chart.
type ListBucketResult ¶ added in v0.6.5
type ListBucketResult struct { NextMarker string `xml:"NextMarker"` Names []string `xml:"Contents>Key"` }
ListBucketResult is the minimum we need out of S3 XML results. https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGET.html e.g., https://storage.googleapis.com/fortio-data?max-keys=2&prefix=fortio.istio.io/
type SelectableValue ¶ added in v0.10.0
SelectableValue represents an entry in the <select> of results.
func SelectValues ¶ added in v0.10.0
func SelectValues(values []string, selectedValues []string) (selectableValues []SelectableValue, numSelected int)
SelectValues maps the list of values (from DataList) to a list of SelectableValues. Each returned SelectableValue is selected if its value is contained in selectedValues. It is assumed that values does not contain duplicates.
type ServerConfig ¶ added in v1.60.2
type ServerConfig struct {
BaseURL, Port, DebugPath, UIPath, DataDir string
PProfOn bool
PercentileList []float64
TLSOptions *fhttp.TLSOptions
}