Documentation ¶
Index ¶
- Constants
- Variables
- func SetRangeStartOption(start interface{}) func(objx.Map)
- func SetRangeStopOption(stop interface{}) func(objx.Map)
- type DefaultTimerStorage
- func (s *DefaultTimerStorage) AddConfigsToTimer(ctx context.Context, timer_id string, config_ids []string) error
- func (s *DefaultTimerStorage) CreateTimer(ctx context.Context, t *Timer) (*Timer, error)
- func (s *DefaultTimerStorage) DeleteTimer(ctx context.Context, id string) error
- func (s *DefaultTimerStorage) ExistTimer(ctx context.Context, t *Timer) (bool, error)
- func (s *DefaultTimerStorage) GetDBConn(ctx context.Context) *gorm.DB
- func (s *DefaultTimerStorage) GetRootDBConn() *gorm.DB
- func (s *DefaultTimerStorage) GetTimer(ctx context.Context, id string) (*Timer, error)
- func (s *DefaultTimerStorage) ListTimers(ctx context.Context, t *Timer) ([]*Timer, error)
- func (s *DefaultTimerStorage) PatchTimer(ctx context.Context, id string, t *Timer) (*Timer, error)
- func (s *DefaultTimerStorage) RemoveConfigsFromTimer(ctx context.Context, timer_id string, config_ids []string) error
- type DefaultTimerStorageOption
- type Evaluator
- type EvaluatorSourceMapping
- type Influxdb2TaskStorage
- func (s *Influxdb2TaskStorage) GetTask(ctx context.Context, id string) (*Task, error)
- func (s *Influxdb2TaskStorage) ListTasksBySource(ctx context.Context, src *Resource, opts ...ListTasksBySourceOption) ([]*Task, error)
- func (s *Influxdb2TaskStorage) PatchTask(ctx context.Context, tsk *Task, ts *TaskState) error
- type Influxdb2TaskStorageOption
- type ListTasksBySourceOption
- type LuaDescriptor
- type Operator
- type Resource
- type Storage
- type StorageImpl
- func (stor *StorageImpl) AddSourcesToEvaluator(ctx context.Context, evaluator_id string, sources []*Resource) error
- func (stor *StorageImpl) CreateEvaluator(ctx context.Context, e *Evaluator) (*Evaluator, error)
- func (stor *StorageImpl) DeleteEvaluator(ctx context.Context, id string) error
- func (stor *StorageImpl) ExistEvaluator(ctx context.Context, e *Evaluator) (bool, error)
- func (stor *StorageImpl) ExistOperator(ctx context.Context, o *Operator) (bool, error)
- func (stor *StorageImpl) GetDBConn(ctx context.Context) *gorm.DB
- func (stor *StorageImpl) GetEvaluator(ctx context.Context, id string) (*Evaluator, error)
- func (stor *StorageImpl) GetRootDBConn() *gorm.DB
- func (stor *StorageImpl) ListEvaluators(ctx context.Context, e *Evaluator) ([]*Evaluator, error)
- func (stor *StorageImpl) ListEvaluatorsBySource(ctx context.Context, src *Resource) ([]*Evaluator, error)
- func (stor *StorageImpl) PatchEvaluator(ctx context.Context, id string, e *Evaluator) (*Evaluator, error)
- func (stor *StorageImpl) RemoveSourcesFromEvaluator(ctx context.Context, evaluator_id string, sources []*Resource) error
- type StorageImplOption
- type Task
- type TaskState
- type TaskStorage
- type TaskStorageFactory
- type Timer
- type TimerConfigMapping
- type TimerStorage
- type TimerStorageFactory
- type TracedStorage
- func (s *TracedStorage) AddSourcesToEvaluator(ctx context.Context, evaluator_id string, sources []*Resource) error
- func (s *TracedStorage) CreateEvaluator(ctx context.Context, e *Evaluator) (*Evaluator, error)
- func (s *TracedStorage) DeleteEvaluator(ctx context.Context, id string) error
- func (s *TracedStorage) ExistEvaluator(ctx context.Context, e *Evaluator) (bool, error)
- func (s *TracedStorage) ExistOperator(ctx context.Context, o *Operator) (bool, error)
- func (s *TracedStorage) GetEvaluator(ctx context.Context, id string) (*Evaluator, error)
- func (s *TracedStorage) ListEvaluators(ctx context.Context, e *Evaluator) ([]*Evaluator, error)
- func (s *TracedStorage) PatchEvaluator(ctx context.Context, id string, e *Evaluator) (*Evaluator, error)
- func (s *TracedStorage) RemoveSourcesFromEvaluator(ctx context.Context, evaluator_id string, sources []*Resource) error
- type TracedTimerStorage
- func (s *TracedTimerStorage) AddConfigsToTimer(ctx context.Context, timer_id string, config_ids []string) error
- func (s *TracedTimerStorage) CreateTimer(ctx context.Context, t *Timer) (*Timer, error)
- func (s *TracedTimerStorage) DeleteTimer(ctx context.Context, id string) error
- func (s *TracedTimerStorage) ExistTimer(ctx context.Context, t *Timer) (bool, error)
- func (s *TracedTimerStorage) GetTimer(ctx context.Context, id string) (*Timer, error)
- func (s *TracedTimerStorage) ListTimers(ctx context.Context, t *Timer) ([]*Timer, error)
- func (s *TracedTimerStorage) PatchTimer(ctx context.Context, id string, t *Timer) (*Timer, error)
- func (s *TracedTimerStorage) RemoveConfigsFromTimer(ctx context.Context, timer_id string, config_ids []string) error
Constants ¶
View Source
const (
INFLUXDB2_TASK_MASUREMENT = "evaluatord.task"
)
Variables ¶
Functions ¶
func SetRangeStartOption ¶ added in v1.1.28
func SetRangeStopOption ¶ added in v1.1.28
Types ¶
type DefaultTimerStorage ¶ added in v1.1.28
type DefaultTimerStorage struct {
// contains filtered or unexported fields
}
func (*DefaultTimerStorage) AddConfigsToTimer ¶ added in v1.1.28
func (*DefaultTimerStorage) CreateTimer ¶ added in v1.1.28
func (*DefaultTimerStorage) DeleteTimer ¶ added in v1.1.28
func (s *DefaultTimerStorage) DeleteTimer(ctx context.Context, id string) error
func (*DefaultTimerStorage) ExistTimer ¶ added in v1.1.28
func (*DefaultTimerStorage) GetDBConn ¶ added in v1.1.28
func (s *DefaultTimerStorage) GetDBConn(ctx context.Context) *gorm.DB
func (*DefaultTimerStorage) GetRootDBConn ¶ added in v1.1.28
func (s *DefaultTimerStorage) GetRootDBConn() *gorm.DB
func (*DefaultTimerStorage) ListTimers ¶ added in v1.1.28
func (*DefaultTimerStorage) PatchTimer ¶ added in v1.1.28
func (*DefaultTimerStorage) RemoveConfigsFromTimer ¶ added in v1.1.28
type DefaultTimerStorageOption ¶ added in v1.1.28
type EvaluatorSourceMapping ¶
type Influxdb2TaskStorage ¶ added in v1.1.28
type Influxdb2TaskStorage struct {
// contains filtered or unexported fields
}
func (*Influxdb2TaskStorage) ListTasksBySource ¶ added in v1.1.28
func (s *Influxdb2TaskStorage) ListTasksBySource(ctx context.Context, src *Resource, opts ...ListTasksBySourceOption) ([]*Task, error)
type Influxdb2TaskStorageOption ¶ added in v1.1.28
type ListTasksBySourceOption ¶ added in v1.1.28
type LuaDescriptor ¶
type Storage ¶
type Storage interface { CreateEvaluator(context.Context, *Evaluator) (*Evaluator, error) DeleteEvaluator(ctx context.Context, id string) error PatchEvaluator(ctx context.Context, id string, evaluator *Evaluator) (*Evaluator, error) GetEvaluator(ctx context.Context, id string) (*Evaluator, error) ListEvaluators(context.Context, *Evaluator) ([]*Evaluator, error) ListEvaluatorsBySource(context.Context, *Resource) ([]*Evaluator, error) AddSourcesToEvaluator(ctx context.Context, evaluator_id string, sources []*Resource) error RemoveSourcesFromEvaluator(ctx context.Context, evaluator_id string, sources []*Resource) error ExistEvaluator(context.Context, *Evaluator) (bool, error) ExistOperator(context.Context, *Operator) (bool, error) }
func NewStorage ¶
func NewStorageImpl ¶
func NewTracedStorage ¶
func NewTracedStorage(s Storage, getter opentracing_storage_helper.RootDBConnGetter) (Storage, error)
type StorageImpl ¶
type StorageImpl struct {
// contains filtered or unexported fields
}
func (*StorageImpl) AddSourcesToEvaluator ¶
func (*StorageImpl) CreateEvaluator ¶
func (*StorageImpl) DeleteEvaluator ¶
func (stor *StorageImpl) DeleteEvaluator(ctx context.Context, id string) error
func (*StorageImpl) ExistEvaluator ¶
func (*StorageImpl) ExistOperator ¶
func (*StorageImpl) GetEvaluator ¶
func (*StorageImpl) GetRootDBConn ¶
func (stor *StorageImpl) GetRootDBConn() *gorm.DB
func (*StorageImpl) ListEvaluators ¶
func (*StorageImpl) ListEvaluatorsBySource ¶
func (*StorageImpl) PatchEvaluator ¶
func (*StorageImpl) RemoveSourcesFromEvaluator ¶
type StorageImplOption ¶
type StorageImplOption struct {
IsTraced bool
}
type TaskStorage ¶ added in v1.1.28
type TaskStorage interface { ListTasksBySource(ctx context.Context, src *Resource, opts ...ListTasksBySourceOption) ([]*Task, error) GetTask(context.Context, string) (*Task, error) PatchTask(context.Context, *Task, *TaskState) error }
func NewInfluxdb2TaskStorage ¶ added in v1.1.28
func NewInfluxdb2TaskStorage(args ...interface{}) (TaskStorage, error)
func NewTaskStorage ¶ added in v1.1.28
func NewTaskStorage(driver string, args ...interface{}) (TaskStorage, error)
type TaskStorageFactory ¶ added in v1.1.28
type TaskStorageFactory func(...interface{}) (TaskStorage, error)
type Timer ¶ added in v1.1.28
type Timer struct { Id *string CreatedAt time.Time UpdatedAt time.Time Alias *string `gorm:"column:alias"` Description *string `gorm:"column:description"` Schedule *string `gorm:"column:schedule"` Timezone *string `gorm:"column:timezone"` Enabled *bool `gorm:"column:enabled"` Configs []string `gorm:"-"` }
type TimerConfigMapping ¶ added in v1.1.28
type TimerStorage ¶ added in v1.1.28
type TimerStorage interface { CreateTimer(context.Context, *Timer) (*Timer, error) DeleteTimer(context.Context, string) error PatchTimer(context.Context, string, *Timer) (*Timer, error) GetTimer(context.Context, string) (*Timer, error) ListTimers(context.Context, *Timer) ([]*Timer, error) AddConfigsToTimer(ctx context.Context, timer_id string, config_ids []string) error RemoveConfigsFromTimer(ctx context.Context, timer_id string, config_ids []string) error ExistTimer(context.Context, *Timer) (bool, error) }
func NewDefaultTimerStorage ¶ added in v1.1.28
func NewDefaultTimerStorage(args ...interface{}) (TimerStorage, error)
func NewTimerStorage ¶ added in v1.1.28
func NewTimerStorage(driver string, args ...interface{}) (TimerStorage, error)
func NewTracedTimerStorage ¶ added in v1.1.28
func NewTracedTimerStorage(s TimerStorage, getter opentracing_storage_helper.RootDBConnGetter) (TimerStorage, error)
type TimerStorageFactory ¶ added in v1.1.28
type TimerStorageFactory func(...interface{}) (TimerStorage, error)
type TracedStorage ¶
type TracedStorage struct { *opentracing_storage_helper.BaseTracedStorage Storage }
func (*TracedStorage) AddSourcesToEvaluator ¶
func (*TracedStorage) CreateEvaluator ¶
func (*TracedStorage) DeleteEvaluator ¶
func (s *TracedStorage) DeleteEvaluator(ctx context.Context, id string) error
func (*TracedStorage) ExistEvaluator ¶
func (*TracedStorage) ExistOperator ¶
func (*TracedStorage) GetEvaluator ¶
func (*TracedStorage) ListEvaluators ¶
func (*TracedStorage) PatchEvaluator ¶
func (*TracedStorage) RemoveSourcesFromEvaluator ¶
type TracedTimerStorage ¶ added in v1.1.28
type TracedTimerStorage struct { *opentracing_storage_helper.BaseTracedStorage TimerStorage }
func (*TracedTimerStorage) AddConfigsToTimer ¶ added in v1.1.28
func (*TracedTimerStorage) CreateTimer ¶ added in v1.1.28
func (*TracedTimerStorage) DeleteTimer ¶ added in v1.1.28
func (s *TracedTimerStorage) DeleteTimer(ctx context.Context, id string) error
func (*TracedTimerStorage) ExistTimer ¶ added in v1.1.28
func (*TracedTimerStorage) ListTimers ¶ added in v1.1.28
func (*TracedTimerStorage) PatchTimer ¶ added in v1.1.28
func (*TracedTimerStorage) RemoveConfigsFromTimer ¶ added in v1.1.28
Click to show internal directories.
Click to hide internal directories.