Documentation ¶
Overview ¶
Package logs implements decision log buffering and uploading.
Index ¶
Constants ¶
View Source
const Name = "decision_logs"
Name identifies the plugin on manager.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BundleInfoV1 ¶ added in v0.13.0
type BundleInfoV1 struct {
Revision string `json:"revision,omitempty"`
}
BundleInfoV1 describes a bundle associated with a decision log event.
func (*BundleInfoV1) AST ¶ added in v0.22.0
func (b *BundleInfoV1) AST() ast.Value
AST returns the BundleInfoV1 as an AST value
type Config ¶
type Config struct { Plugin *string `json:"plugin"` Service string `json:"service"` PartitionName string `json:"partition_name,omitempty"` Reporting ReportingConfig `json:"reporting"` MaskDecision *string `json:"mask_decision"` ConsoleLogs bool `json:"console"` // contains filtered or unexported fields }
Config represents the plugin configuration.
type EventV1 ¶
type EventV1 struct { Labels map[string]string `json:"labels"` DecisionID string `json:"decision_id"` Revision string `json:"revision,omitempty"` // Deprecated: Use Bundles instead Bundles map[string]BundleInfoV1 `json:"bundles,omitempty"` Path string `json:"path,omitempty"` Query string `json:"query,omitempty"` Input *interface{} `json:"input,omitempty"` Result *interface{} `json:"result,omitempty"` Erased []string `json:"erased,omitempty"` Masked []string `json:"masked,omitempty"` Error error `json:"error,omitempty"` RequestedBy string `json:"requested_by"` Timestamp time.Time `json:"timestamp"` Metrics map[string]interface{} `json:"metrics,omitempty"` // contains filtered or unexported fields }
EventV1 represents a decision log event. WARNING: The AST() function for EventV1 must be kept in sync with the struct. Any changes here MUST be reflected in the AST() implementation below.
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
Plugin implements decision log buffering and uploading.
func (*Plugin) Reconfigure ¶ added in v0.10.2
Reconfigure notifies the plugin with a new configuration.
type ReportingConfig ¶
type ReportingConfig struct { BufferSizeLimitBytes *int64 `json:"buffer_size_limit_bytes,omitempty"` // max size of in-memory buffer UploadSizeLimitBytes *int64 `json:"upload_size_limit_bytes,omitempty"` // max size of upload payload MinDelaySeconds *int64 `json:"min_delay_seconds,omitempty"` // min amount of time to wait between successful poll attempts MaxDelaySeconds *int64 `json:"max_delay_seconds,omitempty"` // max amount of time to wait between poll attempts MaxDecisionsPerSecond *float64 `json:"max_decisions_per_second,omitempty"` // max number of decision logs to buffer per second }
ReportingConfig represents configuration for the plugin's reporting behaviour.
Click to show internal directories.
Click to hide internal directories.