github.com/yasker/longhorn-engine@v0.0.0-20160621014712-6ed6cfca0729/controller/rest/stats.go (about) 1 package rest 2 3 import ( 4 "net/http" 5 6 "github.com/rancher/go-rancher/api" 7 journal "github.com/rancher/sparse-tools/stats" 8 ) 9 10 //ListJournal flushes operation journal (replica read/write, ping, etc.) accumulated since previous flush 11 func (s *Server) ListJournal(rw http.ResponseWriter, req *http.Request) error { 12 var input JournalInput 13 apiContext := api.GetApiContext(req) 14 if err := apiContext.Read(&input); err != nil { 15 return err 16 } 17 journal.PrintLimited(input.Limit) 18 return nil 19 }