1package images // import "github.com/docker/docker/daemon/images" 2 3import ( 4 "fmt" 5 6 "github.com/docker/go-metrics" 7) 8 9type invalidFilter struct { 10 filter string 11 value interface{} 12} 13 14func (e invalidFilter) Error() string { 15 msg := "Invalid filter '" + e.filter 16 if e.value != nil { 17 msg += fmt.Sprintf("=%s", e.value) 18 } 19 return msg + "'" 20} 21 22func (e invalidFilter) InvalidParameter() {} 23 24var imageActions metrics.LabeledTimer 25 26func init() { 27 ns := metrics.NewNamespace("engine", "daemon", nil) 28 imageActions = ns.NewLabeledTimer("image_actions", "The number of seconds it takes to process each image action", "action") 29 // TODO: is it OK to register a namespace with the same name? Or does this 30 // need to be exported from somewhere? 31 metrics.Register(ns) 32} 33