Documentation ¶
Index ¶
- type SLO
- type ServiceClient
- func (cs *ServiceClient) Create(item *SLO) (string, error)
- func (cs *ServiceClient) Delete(id string) error
- func (cs *ServiceClient) GET(id string) (interface{}, error)
- func (cs *ServiceClient) Get(id string) (*SLO, error)
- func (cs *ServiceClient) LIST() ([]string, error)
- func (cs *ServiceClient) List() ([]string, error)
- func (cs *ServiceClient) Update(id string, item *SLO) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SLO ¶
type SLO struct { Name string `json:"name"` // The name of the SLO Enabled bool `json:"enabled,omitempty"` // The SLO is enabled (`true`) or disabled (`false`) Description *string `json:"description,omitempty"` // The custom description of the SLO (optional) UseRateMetric bool `json:"useRateMetric"` // The type of the metric to use for SLO calculation: \n\n* `true`: An existing percentage-based metric. \n* `false`: A ratio of two metrics. \n\nFor a list of available metrics, see [Built-in metric page](https://dt-url.net/be03kow) or try the [GET metrics](https://dt-url.net/8e43kxf) API call MetricRate *string `json:"metricRate,omitempty"` // The percentage-based metric for the calculation of the SLO. \n\nRequired when the **useRateMetric** is set to `true` MetricExpression *string `json:"metricExpression,omitempty"` // The percentage-based metric expression for the calculation of the SLO MetricNumerator *string `json:"metricNumerator,omitempty"` // The metric for the count of successes (the numerator in rate calculation). \n\nRequired when the **useRateMetric** is set to `false` MetricDenominator *string `json:"metricDenominator,omitempty"` // The total count metric (the denominator in rate calculation). \n\nRequired when the **useRateMetric** is set to `false` EvaluationType string `json:"evaluationType"` // The evaluation type of the SLO. Currently only `AGGREGATE` is supported Filter *string `json:"filter,omitempty"` // The entity filter for the SLO evaluation. Use the [syntax of entity selector](https://dt-url.net/entityselector) Target float64 `json:"target"` // The target value of the SLO Warning float64 `json:"warning"` // The warning value of the SLO. \n\n At warning state the SLO is still fulfilled but is getting close to failure Timeframe string `json:"timeframe"` // The timeframe for the SLO evaluation. Use the syntax of the global timeframe selector }
func (*SLO) MarshalHCL ¶
type ServiceClient ¶
type ServiceClient struct {
// contains filtered or unexported fields
}
ServiceClient TODO: documentation
func NewService ¶
func NewService(baseURL string, token string) *ServiceClient
NewService creates a new Service Client baseURL should look like this: "https://siz65484.live.dynatrace.com/api/config/v2" token is an API Token
func (*ServiceClient) Create ¶
func (cs *ServiceClient) Create(item *SLO) (string, error)
Create TODO: documentation
func (*ServiceClient) Delete ¶
func (cs *ServiceClient) Delete(id string) error
Delete TODO: documentation
func (*ServiceClient) GET ¶
func (cs *ServiceClient) GET(id string) (interface{}, error)
func (*ServiceClient) Get ¶
func (cs *ServiceClient) Get(id string) (*SLO, error)
Get TODO: documentation
func (*ServiceClient) LIST ¶
func (cs *ServiceClient) LIST() ([]string, error)
func (*ServiceClient) List ¶
func (cs *ServiceClient) List() ([]string, error)
List TODO: documentation
Click to show internal directories.
Click to hide internal directories.