{"modulePath":"github.com/zcube/serving","version":"v0.12.1","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package stats\n\n## Types\n\n```go\ntype Reporter struct {\n\t// contains filtered or unexported fields\n}\n```\nReporter holds cached metric objects to report queue proxy metrics.\n\n```go\nfunc NewStatsReporter(ns, service, config, rev, pod string, countMetric *stats.Int64Measure,\n\tlatencyMetric *stats.Float64Measure, queueSizeMetric *stats.Int64Measure) (*Reporter, error)\n```\nNewStatsReporter creates a reporter that collects and reports queue proxy metrics.\n\n```go\nfunc (r *Reporter) ReportQueueDepth(d int) error\n```\nReportQueueDepth captures queue depth metric.\n\n```go\nfunc (r *Reporter) ReportRequestCount(responseCode int) error\n```\nReportRequestCount captures request count metric.\n\n```go\nfunc (r *Reporter) ReportResponseTime(responseCode int, d time.Duration) error\n```\nReportResponseTime captures response time requests\n\n```go\ntype StatsReporter interface {\n\tReportRequestCount(responseCode int) error\n\tReportResponseTime(responseCode int, d time.Duration) error\n\tReportQueueDepth(depth int) error\n}\n```\nStatsReporter defines the interface for sending queue proxy metrics.\n\n","path":"github.com/zcube/serving/pkg/queue/stats","name":"stats","synopsis":"","isRedistributable":true}
