{"modulePath":"github.com/hellofresh/janus","version":"v0.0.0-20230925145208-ce8de8183c67","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package cb\n\n## Functions\n\n```go\nfunc NewCBMiddleware(cfg Config) func(http.Handler) http.Handler\n```\nNewCBMiddleware creates a new cb middleware\n\n```go\nfunc NewCollectorRegistry(client client.Client) func(string) metricCollector.MetricCollector\n```\nNewCollectorRegistry returns a function to be registerd with metricCollector.Registry.Register(NewCollectorRegistry).\n\n## Types\n\n```go\ntype Config struct {\n\thystrix.CommandConfig\n\tName      string `json:\"name\"`\n\tPredicate string `json:\"predicate\"`\n}\n```\nConfig represents the Body Limit configuration\n\n```go\ntype StatsCollector struct {\n\t// contains filtered or unexported fields\n}\n```\nStatsCollector fulfills the metricCollector interface allowing users to ship circuit stats to a metric backend. To use users must call InitializeStatsCollector before circuits are started.\n\n```go\nfunc NewStatsCollector(name string, client client.Client) (*StatsCollector, error)\n```\nNewStatsCollector creates a collector for a specific circuit. The prefix given to this circuit will be {config.Prefix}.{circuit\\_name}.{metric}. Circuits with \"/\" in their names will have them replaced with \".\".\n\n```go\nfunc (g *StatsCollector) Reset()\n```\nReset is a noop operation in this collector.\n\n```go\nfunc (g *StatsCollector) Update(r metricCollector.MetricResult)\n```\nUpdate metrics\n\n","path":"github.com/hellofresh/janus/pkg/plugin/cb","name":"cb","synopsis":"","isRedistributable":true}
