Documentation ¶
Index ¶
- Variables
- func FakeMovie() string
- func HandleDetails(w http.ResponseWriter, r *http.Request)
- func HandleMain(w http.ResponseWriter, r *http.Request)
- func HandleStart(w http.ResponseWriter, r *http.Request)
- func HandleStop(w http.ResponseWriter, r *http.Request)
- func MakeUpdate(ctx context.Context, updateCh chan<- Asset)
- func Routes(r chi.Router)
- func Simulate(w http.ResponseWriter, r *http.Request)
- func UpdateAsset()
- func UpdateCountBlock(name string)
- func UpdateStatBlock(name string, status string)
- type Asset
- type History
- type StatBlock
Constants ¶
This section is empty.
Variables ¶
View Source
var Assets []Asset
View Source
var Stats map[string]StatBlock
Functions ¶
func HandleDetails ¶
func HandleDetails(w http.ResponseWriter, r *http.Request)
func HandleMain ¶
func HandleMain(w http.ResponseWriter, r *http.Request)
HandleMain handler the '/min/' GET route
func HandleStart ¶
func HandleStart(w http.ResponseWriter, r *http.Request)
func HandleStop ¶
func HandleStop(w http.ResponseWriter, r *http.Request)
func MakeUpdate ¶
func UpdateAsset ¶
func UpdateAsset()
func UpdateCountBlock ¶
func UpdateCountBlock(name string)
func UpdateStatBlock ¶
Types ¶
type Asset ¶
type Asset struct { ID string `json:"id"` Title string `json:"title"` Status string `json:"Status"` History []History `json:"history"` Elapsed time.Duration `json:"elapsed"` Update bool `json:"-"` // flags an asset to be updated, do NOT store in DB Monitor string `json:"-"` // flags an asset to be broadcast on Update, do NOT store in DB Counts StatBlock `json:"-"` // transport for HeroCard block, do NOT store in DB Metrics StatBlock `json:"-"` // transport for HeroCard block, do NOT store in DB }
type StatBlock ¶
type StatBlock struct { Name string `json:"name"` // name of this block Total int `json:"total"` // total numbers of events processed Errors int `json:"errors"` // number of in error status ErrorP string `json:"errorp"` // percentage of errors Failures int `json:"failures"` // number of in failure status FailureP string `json:"failurep"` // percentage of failures Processings int `json:"processings"` // number of in processing status ProcessingP string `json:"processingp"` // Ppercentage of processings Pendings int `json:"pendings"` // number of in pending status PendingP string `json:"pendingp"` // percentage of pendings Completeds int `json:"completeds"` // number of in completed status CompletedP string `json:"completedp"` // percentage of completeds Others int `json:"others"` // number of in other status OtherP string `json:"othersp"` // percentage of others }
Click to show internal directories.
Click to hide internal directories.