mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
all: make fmt
via the upcoming Go1.19
This commit is contained in:
parent
8851cf68e1
commit
5c8eee26bf
12 changed files with 43 additions and 40 deletions
|
@ -63,6 +63,7 @@ type Config struct {
|
|||
}
|
||||
|
||||
// StaticConfig contains list of static targets in the following form:
|
||||
//
|
||||
// targets:
|
||||
// [ - '<host>' ]
|
||||
type StaticConfig struct {
|
||||
|
|
|
@ -74,9 +74,10 @@ var (
|
|||
|
||||
// Init returns a function for retrieving actual list of Notifier objects.
|
||||
// Init works in two mods:
|
||||
// * configuration via flags (for backward compatibility). Is always static
|
||||
// - configuration via flags (for backward compatibility). Is always static
|
||||
// and don't support live reloads.
|
||||
// * configuration via file. Supports live reloads and service discovery.
|
||||
// - configuration via file. Supports live reloads and service discovery.
|
||||
//
|
||||
// Init returns an error if both mods are used.
|
||||
func Init(gen AlertURLGenerator, extLabels map[string]string, extURL string) (func() []Notifier, error) {
|
||||
if externalLabels != nil || externalURL != "" {
|
||||
|
|
|
@ -1036,7 +1036,6 @@ func (cp *commonParams) IsDefaultTimeRange() bool {
|
|||
// - match[]
|
||||
// - extra_label
|
||||
// - extra_filters[]
|
||||
//
|
||||
func getExportParams(r *http.Request, startTime time.Time) (*commonParams, error) {
|
||||
cp, err := getCommonParams(r, startTime, true)
|
||||
if err != nil {
|
||||
|
@ -1054,7 +1053,6 @@ func getExportParams(r *http.Request, startTime time.Time) (*commonParams, error
|
|||
// - match[]
|
||||
// - extra_label
|
||||
// - extra_filters[]
|
||||
//
|
||||
func getCommonParams(r *http.Request, startTime time.Time, requireNonEmptyMatch bool) (*commonParams, error) {
|
||||
deadline := searchutils.GetDeadlineForQuery(r, startTime)
|
||||
start, err := searchutils.GetTime(r, "start", 0)
|
||||
|
|
|
@ -219,8 +219,11 @@ func (d *Deadline) String() string {
|
|||
//
|
||||
// Label filters can be present in extra_label and extra_filters[] query args.
|
||||
// They are combined. For example, the following query args:
|
||||
//
|
||||
// extra_label=t1=v1&extra_label=t2=v2&extra_filters[]={env="prod",team="devops"}&extra_filters={env=~"dev|staging",team!="devops"}
|
||||
//
|
||||
// should be translated to the following filters joined with "or":
|
||||
//
|
||||
// {env="prod",team="devops",t1="v1",t2="v2"}
|
||||
// {env=~"dev|staging",team!="devops",t1="v1",t2="v2"}
|
||||
func GetExtraTagFilters(r *http.Request) ([][]storage.TagFilter, error) {
|
||||
|
|
|
@ -8,8 +8,9 @@ import (
|
|||
)
|
||||
|
||||
// specific files
|
||||
//go:embed favicon-32x32.png robots.txt index.html manifest.json asset-manifest.json
|
||||
// static content
|
||||
//
|
||||
//go:embed favicon-32x32.png robots.txt index.html manifest.json asset-manifest.json
|
||||
//go:embed static
|
||||
var files embed.FS
|
||||
|
||||
|
|
|
@ -57,7 +57,6 @@ func NewArrayInt(name string, description string) *ArrayInt {
|
|||
// Flag values may be quoted. For instance, the following arg creates an array of ("a", "b, c") items:
|
||||
//
|
||||
// -foo='a,"b, c"'
|
||||
//
|
||||
type Array []string
|
||||
|
||||
// String implements flag.Value interface
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
// Package metricsql has been moved to https://github.com/VictoriaMetrics/metricsql .
|
||||
//
|
||||
package metricsql
|
||||
|
|
|
@ -41,10 +41,10 @@ const maxColumnsPerRow = 64 * 1024
|
|||
// - <column_pos> is numeric csv column position. The first column has position 1.
|
||||
// - <column_type> is one of the following types:
|
||||
// - time - the corresponding column contains timestamp. Timestamp format is determined by <extension>. The following formats are supported:
|
||||
// - unix_s - unix timestamp in seconds
|
||||
// - unix_ms - unix timestamp in milliseconds
|
||||
// - unix_ns - unix_timestamp in nanoseconds
|
||||
// - rfc3339 - RFC3339 format in the form `2006-01-02T15:04:05Z07:00`
|
||||
// - - unix_s - unix timestamp in seconds
|
||||
// - - unix_ms - unix timestamp in milliseconds
|
||||
// - - unix_ns - unix_timestamp in nanoseconds
|
||||
// - - rfc3339 - RFC3339 format in the form `2006-01-02T15:04:05Z07:00`
|
||||
// - label - the corresponding column contains metric label with the name set in <extension>.
|
||||
// - metric - the corresponding column contains metric value with the name set in <extension>.
|
||||
//
|
||||
|
|
|
@ -58,7 +58,7 @@ func (pts *partitionSearch) reset() {
|
|||
// tsids must be sorted.
|
||||
// tsids cannot be modified after the Init call, since it is owned by pts.
|
||||
//
|
||||
/// MustClose must be called when partition search is done.
|
||||
// MustClose must be called when partition search is done.
|
||||
func (pts *partitionSearch) Init(pt *partition, tsids []TSID, tr TimeRange) {
|
||||
if pts.needClosing {
|
||||
logger.Panicf("BUG: missing partitionSearch.MustClose call before the next call to Init")
|
||||
|
|
|
@ -567,6 +567,7 @@ func newMatchFuncForOrSuffixes(orValues []string) (reMatch func(b []byte) bool,
|
|||
}
|
||||
|
||||
// getOptimizedReMatchFunc tries returning optimized function for matching the given expr.
|
||||
//
|
||||
// '.*'
|
||||
// '.+'
|
||||
// 'literal.*'
|
||||
|
|
Loading…
Reference in a new issue