Documentation ¶
Overview ¶
Package capture implements datacapture for the builtin datamanger
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Capture ¶ added in v0.44.0
type Capture struct {
// contains filtered or unexported fields
}
Capture polls data sources (resource/method pairs) and writes the responses files. There must be only one Capture per DataManager.
The lifecycle of a Capture is:
- New - Reconfigure (any number of times) - Close (any number of times).
func (*Capture) FlushCollectors ¶ added in v0.44.0
func (c *Capture) FlushCollectors()
FlushCollectors flushes collectors.
func (*Capture) Reconfigure ¶ added in v0.44.0
func (c *Capture) Reconfigure( ctx context.Context, collectorConfigsByResource CollectorConfigsByResource, config Config, )
Reconfigure reconfigures Capture. It is only called by the builtin data manager.
type CollectorConfigsByResource ¶ added in v0.44.0
type CollectorConfigsByResource map[resource.Resource][]datamanager.DataCaptureConfig
CollectorConfigsByResource describes the data capture configuration of the resources/mathod pairs which data capture should capture data from.
type Config ¶
type Config struct { // CaptureDisabled if set to true disables all data capture collectors CaptureDisabled bool // CaptureDir defines where data capture should write capture files CaptureDir string // Tags defines the tags that should be added to capture file metadata Tags []string // MaximumCaptureFileSizeBytes defines the maximum size that in progress data capture // (.prog) files should be allowed to grow to before they are convered into .capture // files MaximumCaptureFileSizeBytes int64 MongoConfig *MongoConfig }
Config is the capture config.
type MongoConfig ¶ added in v0.50.0
type MongoConfig struct { URI string `json:"uri"` Database string `json:"database"` Collection string `json:"collection"` }
MongoConfig is the optional data capture mongo config.
func (MongoConfig) Equal ¶ added in v0.50.0
func (mc MongoConfig) Equal(o MongoConfig) bool
Equal returns true when both MongoConfigs are equal.