-
Notifications
You must be signed in to change notification settings - Fork 1
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recipient
makes me think of emails :D
Still gonna be int, === datasource.id, right? or will it take datasource.name as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recipient sounds good, but we'll need to ensure a datasource name won't conflict with this reserved "grafana"key.
In the suggested implementation if it equals the reserved "grafana" key is handled by the grafana otherwise is expected to be convertible to integer and that this number corresponds to a lotex datasource id. |
That's cool, just wanted to be sure. Thanks! |
@@ -31,7 +31,21 @@ type Ack struct{} | |||
type Backend int | |||
|
|||
const ( | |||
GrafanaBackend Backend = iota | |||
GrafanaBackend Backend = iota + 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you change this to be iota + 1
?
edit: to not conflict with the zero value -- that's fine.
We hope that this would be less confusing for grafana users.
Its value should be
grafana
for requests to be handled by grafana and the numeric datasource id for requests to be forwarded to a lotex datasource.The chosen name
Recipient
is discussable.Update
I have added a 0ed8a62 which is also required for grafana/grafana#32208.