Documentation ¶
Overview ¶
package config provides configuration types and functions for Substation.
Any non-backwards compatible changes to the configuration types should be accompanied by a version bump. Use the guidance below for choosing the appropriate fields for configurations:
For time-based configurations:
Use `Delay` for the amount of time to wait before executing.
Use `Timeout` for the amount of time to wait before interrupting an execution.
Use `Duration` for the total amount of time over many executions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidFactoryInput is returned when an unsupported input is referenced in any factory function. ErrInvalidFactoryInput = fmt.Errorf("invalid factory input") // ErrMissingRequiredOption is returned when a component does not have the required options to properly run. ErrMissingRequiredOption = fmt.Errorf("missing required option") // ErrInvalidOption is returned when an invalid option is received in a constructor. ErrInvalidOption = fmt.Errorf("invalid option") )
Functions ¶
Types ¶
type Metric ¶
type Metric struct { // Name is the name of the metric. Name string `json:"name"` // Attributes are key-value pairs that are associated with the metric. Attributes map[string]string `json:"attributes"` // Destination is the metrics destination that the metric will be sent to (internal/metrics). Destination config.Config `json:"destination"` }
type Object ¶
type Object struct { // SourceKey retrieves a value from a JSON object. SourceKey string `json:"source_key"` // TargetKey place a value into a JSON object. TargetKey string `json:"target_key"` // BatchKey retrieves a value from a JSON object that is used to organize // batched data (internal/aggregate). BatchKey string `json:"batch_key"` }
type Request ¶
type Request struct { // Timeout is the amount of time that the request will wait before timing out. Timeout string `json:"Timeout"` }
type Retry ¶
type Retry struct { // Count is the maximum number of times that the action will be retried. This // can be combined with the Delay field to create a backoff strategy. Count int `json:"count"` // Delay is the amount of time to wait before retrying the action. This can be // combined with the Count field to create a backoff strategy. Delay string `json:"delay"` }
Click to show internal directories.
Click to hide internal directories.