Skip to content

Commit

Permalink
move shared consts to own file
Browse files Browse the repository at this point in the history
  • Loading branch information
wazazaby committed Oct 8, 2023
1 parent 916a690 commit 485df6b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
13 changes: 13 additions & 0 deletions constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package vimebu

const (
MetricNameMaxLen = 256 // MetricNameMaxLen is the maximum len in bytes allowed for the metric name.
LabelNameMaxLen = 128 // LabelNameMaxLen is the maximum len in bytes allowed for a label name.
LabelValueLen = 1024 // LabelValueLen is the maximum len in bytes allowed for a label value.

leftBracketByte = byte('{')
rightBracketByte = byte('}')
commaByte = byte(',')
equalByte = byte('=')
doubleQuotesByte = byte('"')
)
12 changes: 0 additions & 12 deletions vimebu.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,6 @@ import (
"strings"
)

const (
MetricNameMaxLen = 256 // MetricNameMaxLen is the maximum len in bytes allowed for the metric name.
LabelNameMaxLen = 128 // LabelNameMaxLen is the maximum len in bytes allowed for a label name.
LabelValueLen = 1024 // LabelValueLen is the maximum len in bytes allowed for a label value.

leftBracketByte = byte('{')
rightBracketByte = byte('}')
commaByte = byte(',')
equalByte = byte('=')
doubleQuotesByte = byte('"')
)

// Builder is used to efficiently build a VictoriaMetrics metric.
// It's backed by a bytes.Buffer to minimize memory copying.
//
Expand Down

0 comments on commit 485df6b

Please sign in to comment.