Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type BatchArchiver ¶ added in v0.13.0
type DataSource ¶ added in v0.13.0
type DataSource interface {
Size() (int64, error)
Remove() error
StreamWriter() (io.WriteCloser, error)
StreamReader() (io.ReadCloser, error)
BatchArchiver() (BatchArchiver, error)
BatchReaders() ([]io.ReadCloser, error)
}
type Recording ¶ added in v0.13.0
type Recording struct {
ID string
// URL for stored Recording data. Currently only file:// is supported.
DataURL string
Type RecordingType
Size int64
Date time.Time
Error string
Status Status
Progress float64
}
func (Recording) MarshalBinary ¶ added in v1.2.0
func (*Recording) UnmarshalBinary ¶ added in v1.2.0
type RecordingDAO ¶ added in v0.13.0
type RecordingDAO interface {
// Retrieve a recording
Get(id string) (Recording, error)
// Create a recording.
// ErrRecordingExists is returned if a recording already exists with the same ID.
Create(recording Recording) error
// Replace an existing recording.
// ErrNoRecordingExists is returned if the recording does not exist.
Replace(recording Recording) error
// Delete a recording.
// It is not an error to delete an non-existent recording.
Delete(id string) error
// List recordings 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) ([]Recording, error)
// Rebuild fixes all indexes of the data.
Rebuild() error
}
Data access object for Recording data.
type RecordingType ¶ added in v0.13.0
type RecordingType int
const ( StreamRecording RecordingType = iota BatchRecording )
type Replay ¶ added in v0.13.0
type Replay struct {
ID string
RecordingID string
TaskID string
RecordingTime bool
Clock Clock
Date time.Time
Error string
Status Status
Progress float64
}
func (Replay) MarshalBinary ¶ added in v1.2.0
func (*Replay) UnmarshalBinary ¶ added in v1.2.0
type ReplayDAO ¶ added in v0.13.0
type ReplayDAO interface {
// Retrieve a replay
Get(id string) (Replay, error)
// Create a replay.
// ErrReplayExists is returned if a replay already exists with the same ID.
Create(replay Replay) error
// Replace an existing replay.
// ErrNoReplayExists is returned if the replay does not exist.
Replace(replay Replay) error
// Delete a replay.
// It is not an error to delete an non-existent replay.
Delete(id string) error
// List replays 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) ([]Replay, error)
// Rebuild rebuilds all indexes for the storage
Rebuild() error
}
Data access object for Recording data.
type Service ¶
type Service struct {
StorageService interface {
Store(namespace string) storage.Interface
Register(name string, store storage.StoreActioner)
}
TaskStore interface {
Load(id string) (*kapacitor.Task, error)
}
HTTPDService interface {
AddRoutes([]httpd.Route) error
DelRoutes([]httpd.Route)
}
InfluxDBService interface {
NewNamedClient(name string) (influxdb.Client, error)
}
TaskMasterLookup interface {
Get(string) *kapacitor.TaskMaster
Set(*kapacitor.TaskMaster)
Delete(*kapacitor.TaskMaster)
}
TaskMaster interface {
NewFork(name string, dbrps []kapacitor.DBRP, measurements []string) (*kapacitor.Edge, error)
DelFork(name string)
New(name string) *kapacitor.TaskMaster
Stream(name string) (kapacitor.StreamCollector, error)
}
// contains filtered or unexported fields
}
Handles recording, starting, and waiting on replays
Click to show internal directories.
Click to hide internal directories.