Skip to content

Commit

Permalink
chore(metric): Add default metric
Browse files Browse the repository at this point in the history
Signed-off-by: Bo-Yi Wu <[email protected]>
  • Loading branch information
appleboy committed Dec 24, 2021
1 parent 51bba3f commit c8dddeb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion metric.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ type metric struct {
busyWorkers uint64
}

func newMetric() Metric {
// NewMetric for default metric structure
func NewMetric() Metric {
return &metric{}
}

Expand Down
2 changes: 1 addition & 1 deletion options.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var (
defaultTimeout = 60 * time.Minute
defaultNewLogger = NewLogger()
defaultFn = func(context.Context, QueuedMessage) error { return nil }
defaultMetric = newMetric()
defaultMetric = NewMetric()
)

// Option for queue system
Expand Down

0 comments on commit c8dddeb

Please sign in to comment.