这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Conversation

@kylebrandt
Copy link
Member

Also fix nv() so it creates a result when the entire set is empty

$now = epoch()
$hourAgo =  $now-d("1h")
$s = merge(series("foo=bar", $hourAgo, 5, $now, 10), series("foo=bar2", $hourAgo, 6, $now, 11))

@kylebrandt kylebrandt force-pushed the seriesFunc branch 2 times, most recently from d5aeb97 to 231c38a Compare March 14, 2016 03:02
@kylebrandt
Copy link
Member Author

Also fixes #1655

F interface{}
VArgs bool
VArgsPos int
VArgsOmit bool
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does VArgsOmit do?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@captncraig Makes it so the vargs are optional. You are allowed to omit them.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about inverting it. Maybe VArgsRequired or even MinVArgs would be clearer.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of the time it isn't true. So when defining funcs you don't have to
include it. So false is a better default

On Mon, Mar 14, 2016 at 1:19 PM, Craig Peterson notifications@github.com
wrote:

In cmd/bosun/expr/parse/parse.go
#1667 (comment):

@@ -31,13 +31,14 @@ type Tree struct {
}

type Func struct {

  • Args []models.FuncType
  • Return models.FuncType
  • Tags func([]Node) (Tags, error)
  • F interface{}
  • VArgs bool
  • VArgsPos int
  • Check func(*Tree, *FuncNode) error
  • Args []models.FuncType
  • Return models.FuncType
  • Tags func([]Node) (Tags, error)
  • F interface{}
  • VArgs bool
  • VArgsPos int
  • VArgsOmit bool

How about inverting it. Maybe VArgsRequired or even MinVArgs would be
clearer.


Reply to this email directly or view it on GitHub
https://github.com/bosun-monitor/bosun/pull/1667/files#r56038601.

@kylebrandt kylebrandt merged commit 2acf8e5 into master Mar 14, 2016
@kylebrandt kylebrandt deleted the seriesFunc branch March 16, 2016 13:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants