Documentation ¶
Index ¶
- Variables
- type Config
- type DBRP
- type Service
- func (ts *Service) Close() error
- func (ts *Service) HasSnapshot(id string) bool
- func (ts *Service) Load(id string) (*kapacitor.Task, error)
- func (ts *Service) LoadSnapshot(id string) (*kapacitor.TaskSnapshot, error)
- func (ts *Service) Open() error
- func (ts *Service) SaveSnapshot(id string, snapshot *kapacitor.TaskSnapshot) error
- type Snapshot
- type SnapshotDAO
- type Status
- type Task
- type TaskDAO
- type TaskInfo
- type TaskType
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Service ¶
type Service struct { StorageService interface { Store(namespace string) storage.Interface } HTTPDService interface { AddRoutes([]httpd.Route) error DelRoutes([]httpd.Route) } TaskMaster interface { NewTask( name, script string, tt kapacitor.TaskType, dbrps []kapacitor.DBRP, snapshotInterval time.Duration, ) (*kapacitor.Task, error) StartTask(t *kapacitor.Task) (*kapacitor.ExecutingTask, error) StopTask(name string) error IsExecuting(name string) bool ExecutionStats(name string) (kapacitor.ExecutionStats, error) ExecutingDot(name string, labels bool) string } // contains filtered or unexported fields }
func (*Service) HasSnapshot ¶ added in v0.10.0
func (*Service) LoadSnapshot ¶ added in v0.10.0
func (ts *Service) LoadSnapshot(id string) (*kapacitor.TaskSnapshot, error)
func (*Service) SaveSnapshot ¶ added in v0.10.0
func (ts *Service) SaveSnapshot(id string, snapshot *kapacitor.TaskSnapshot) error
type SnapshotDAO ¶ added in v0.13.0
type SnapshotDAO interface { // Load a saved snapshot. // ErrNoSnapshotExists will be returned if HasSnapshot returns false. Get(id string) (*Snapshot, error) // Save a snapshot. Put(id string, snapshot *Snapshot) error // Whether a snapshot exists in the store. Exists(id string) (bool, error) }
Data access object for Snapshot data.
type Task ¶ added in v0.13.0
type Task struct { // Unique identifier for the task ID string // The task type (stream|batch). Type TaskType // The DBs and RPs the task is allowed to access. DBRPs []DBRP // The TICKscript for the task. TICKscript string // Last error the task had either while defining or executing. Error string // Status of the task Status Status // Created Date Created time.Time // The time the task was last modified Modified time.Time // The time the task was last changed to status Enabled. LastEnabled time.Time }
type TaskDAO ¶ added in v0.13.0
type TaskDAO interface { // Retrieve a task Get(id string) (Task, error) // Create a task. // ErrTaskExists is returned if a task already exists with the same ID. Create(t Task) error // Replace an existing task. // ErrNoTaskExists is returned if the task does not exist. Replace(t Task) error // Delete a task. // It is not an error to delete an non-existent task. Delete(id string) error // List tasks matching a pattern. // The pattern is shell/glob matching see https://golang.org/pkg/path/#Match // Offset and limit are pagination bounds. Offset is inclusive starting at index 0. // More results may exist while the number of returned items is equal to limit. List(pattern string, offset, limit int) ([]Task, error) }
Data access object for Task Snapshot data.
Click to show internal directories.
Click to hide internal directories.