Documentation ¶
Index ¶
- Variables
- func ApisHandler(w http.ResponseWriter, r *http.Request)
- func AuthHandler(w http.ResponseWriter, r *http.Request)
- func CliHandler(w http.ResponseWriter, r *http.Request)
- func ExtractValue(data mongo.DASRecord, daskey string) string
- func FAQHandler(w http.ResponseWriter, r *http.Request)
- func KeysHandler(w http.ResponseWriter, r *http.Request)
- func PresentData(path string, dasquery dasql.DASQuery, data []mongo.DASRecord, ...) string
- func PresentDataPlain(path string, dasquery dasql.DASQuery, data []mongo.DASRecord) string
- func RequestHandler(w http.ResponseWriter, r *http.Request)
- func Server(configFile string)
- func ServicesHandler(w http.ResponseWriter, r *http.Request)
- func SettingsHandler(w http.ResponseWriter, r *http.Request)
- func StatusHandler(w http.ResponseWriter, r *http.Request)
- func UserDN(r *http.Request) string
- type DASKeys
- type DASTemplates
- func (q DASTemplates) ApiRecord(tdir string, tmplData map[string]interface{}) string
- func (q DASTemplates) Bottom(tdir string, tmplData map[string]interface{}) string
- func (q DASTemplates) CLI(tdir string, tmplData map[string]interface{}) string
- func (q DASTemplates) Cards(tdir string, tmplData map[string]interface{}) string
- func (q DASTemplates) DASError(tdir string, tmplData map[string]interface{}) string
- func (q DASTemplates) DASRequest(tdir string, tmplData map[string]interface{}) string
- func (q DASTemplates) DASZeroResults(tdir string, tmplData map[string]interface{}) string
- func (q DASTemplates) DasKeys(tdir string, tmplData map[string]interface{}) string
- func (q DASTemplates) FAQ(tdir string, tmplData map[string]interface{}) string
- func (q DASTemplates) Keys(tdir string, tmplData map[string]interface{}) string
- func (q DASTemplates) Pagination(tdir string, tmplData map[string]interface{}) string
- func (q DASTemplates) SearchForm(tdir string, tmplData map[string]interface{}) string
- func (q DASTemplates) Services(tdir string, tmplData map[string]interface{}) string
- func (q DASTemplates) Status(tdir string, tmplData map[string]interface{}) string
- func (q DASTemplates) Top(tdir string, tmplData map[string]interface{}) string
- type Mem
- type MemStats
- type Memory
- type ServerSettings
- type UserDNs
Constants ¶
This section is empty.
Variables ¶
var DASTemplateMap map[string]*template.Template
global map of templates
var Time0 time.Time
Time0 represents initial time when we started the server
var TotalGetRequests uint64
TotalGetRequests counts total number of GET requests received by the server
var TotalPostRequests uint64
TotalPostRequests counts total number of POST requests received by the server
Functions ¶
func ApisHandler ¶
func ApisHandler(w http.ResponseWriter, r *http.Request)
ApisHandler handlers Apis requests
func AuthHandler ¶
func AuthHandler(w http.ResponseWriter, r *http.Request)
AuthHandler authenticate incoming requests and route them to appropriate handler
func CliHandler ¶
func CliHandler(w http.ResponseWriter, r *http.Request)
CliHandler hadnlers cli requests
func ExtractValue ¶
ExtractValue helper function to extract value from das record
func FAQHandler ¶
func FAQHandler(w http.ResponseWriter, r *http.Request)
FAQHandler handlers FAQ requests
func KeysHandler ¶
func KeysHandler(w http.ResponseWriter, r *http.Request)
KeysHandler handlers Keys requests
func PresentData ¶
func PresentData(path string, dasquery dasql.DASQuery, data []mongo.DASRecord, pmap mongo.DASRecord, nres, startIdx, limit int, procTime time.Duration) string
PresentData represents DAS records for web UI
func PresentDataPlain ¶
PresentDataPlain represents DAS records for web UI
func RequestHandler ¶
func RequestHandler(w http.ResponseWriter, r *http.Request)
RequestHandler is used by web server to handle incoming requests
func Server ¶
func Server(configFile string)
Server is proxy server. It defines /fetch public interface
func ServicesHandler ¶
func ServicesHandler(w http.ResponseWriter, r *http.Request)
ServicesHandler handlers Services requests
func SettingsHandler ¶
func SettingsHandler(w http.ResponseWriter, r *http.Request)
SettingsHandler handlers Settings requests
func StatusHandler ¶
func StatusHandler(w http.ResponseWriter, r *http.Request)
StatusHandler handlers Status requests
Types ¶
type DASTemplates ¶
type DASTemplates struct {
// contains filtered or unexported fields
}
DASTemplates structure
func (DASTemplates) ApiRecord ¶
func (q DASTemplates) ApiRecord(tdir string, tmplData map[string]interface{}) string
ApiRecord method for DASTemplates structure
func (DASTemplates) Bottom ¶
func (q DASTemplates) Bottom(tdir string, tmplData map[string]interface{}) string
Bottom method for DASTemplates structure
func (DASTemplates) CLI ¶
func (q DASTemplates) CLI(tdir string, tmplData map[string]interface{}) string
CLI method for DASTemplates structure
func (DASTemplates) Cards ¶
func (q DASTemplates) Cards(tdir string, tmplData map[string]interface{}) string
Cards method for DASTemplates structure
func (DASTemplates) DASError ¶
func (q DASTemplates) DASError(tdir string, tmplData map[string]interface{}) string
DASError method for DASTemplates structure
func (DASTemplates) DASRequest ¶
func (q DASTemplates) DASRequest(tdir string, tmplData map[string]interface{}) string
DASRequest method for DASTemplates structure
func (DASTemplates) DASZeroResults ¶
func (q DASTemplates) DASZeroResults(tdir string, tmplData map[string]interface{}) string
DASZeroResults method for DASTemplates structure
func (DASTemplates) DasKeys ¶
func (q DASTemplates) DasKeys(tdir string, tmplData map[string]interface{}) string
DasKeys method for DASTemplates structure
func (DASTemplates) FAQ ¶
func (q DASTemplates) FAQ(tdir string, tmplData map[string]interface{}) string
FAQ method for DASTemplates structure
func (DASTemplates) Keys ¶
func (q DASTemplates) Keys(tdir string, tmplData map[string]interface{}) string
Keys method for DASTemplates structure
func (DASTemplates) Pagination ¶
func (q DASTemplates) Pagination(tdir string, tmplData map[string]interface{}) string
Pagination method for DASTemplates structure
func (DASTemplates) SearchForm ¶
func (q DASTemplates) SearchForm(tdir string, tmplData map[string]interface{}) string
SearchForm method for DASTemplates structure
func (DASTemplates) Services ¶
func (q DASTemplates) Services(tdir string, tmplData map[string]interface{}) string
Services method for DASTemplates structure
type MemStats ¶
type MemStats struct { Sys uint64 // is the total bytes of memory obtained from the OS. Alloc uint64 // is bytes of allocated heap objects. TotalAlloc uint64 // is cumulative bytes allocated for heap objects. HeapSys uint64 // is bytes of heap memory obtained from the OS. HeapInuse uint64 // is bytes in in-use spans StackSys uint64 // is bytes of stack memory obtained from the OS StackInuse uint64 // is bytes in stack spans GCSys uint64 // is bytes of memory in garbage collection metadata. }
MemStats represents runtime memory stats
type Memory ¶
type Memory struct { Total uint64 `json:"total"` Free uint64 `json:"free"` Used uint64 `json:"used"` UsedPercent float64 `json:"usedPercent"` }
Memory structure keeps track of server memory
type ServerSettings ¶
type ServerSettings struct { Level int `json:"level"` // verbosity level RucioTokenCurl bool `json:"rucioTokenCurl"` // use curl method to obtain Rucio Token ProfileFile string `json:"profileFile"` // send profile data to a given file }
ServerSettings controls server parameters