mirror of
https://github.com/grafana/grafana.git
synced 2024-11-26 02:40:26 -06:00
e3a4bde622
* create rule evaluator * load header from the context * init one factory * update scheduler
21 lines
385 B
Go
21 lines
385 B
Go
package eval
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/grafana/grafana/pkg/services/user"
|
|
)
|
|
|
|
// EvaluationContext represents the context in which a condition is evaluated.
|
|
type EvaluationContext struct {
|
|
Ctx context.Context
|
|
User *user.SignedInUser
|
|
}
|
|
|
|
func Context(ctx context.Context, user *user.SignedInUser) EvaluationContext {
|
|
return EvaluationContext{
|
|
Ctx: ctx,
|
|
User: user,
|
|
}
|
|
}
|