Versions in this module Expand all Collapse all v1 v1.2.11 Jun 17, 2021 v1.2.10 Jun 17, 2021 v1.2.9 Jun 11, 2021 Changes in this version + const Version + var AvailableMetricTypes = []MetricType + var UserAgentHeader string + type ApiError struct + ErrorHeader string + Errors map[string]string + Message string + RequestId string + StatusCode int + Took float32 + func (ar *ApiError) Error() string + type ApiMetric struct + Duration int64 + HttpResponse http.Response + ResourcePath string + ResultMetadata ResultMetadata + TransactionId string + func (apiMetric *ApiMetric) Type() string + type ApiRequest interface + Metadata func(apiRequest ApiRequest) map[string]interface{} + Method func() string + RequestParams func() map[string]string + ResourcePath func() string + Validate func() error + type ApiResult interface + Parse func(response *http.Response, result ApiResult) error + ValidateResultMetadata func() error + type ApiUrl string + const API_URL + const API_URL_EU + const API_URL_SANDBOX + type AsyncApiResult interface + RetrieveStatus func(ctx context.Context, request ApiRequest, result ApiResult) error + type AsyncBaseResult struct + Client *OpsGenieClient + func (ar *AsyncBaseResult) RetrieveStatus(ctx context.Context, request ApiRequest, result ApiResult) error + type BaseRequest struct + func (r *BaseRequest) Metadata(apiRequest ApiRequest) map[string]interface{} + func (r *BaseRequest) RequestParams() map[string]string + type Config struct + ApiKey string + Backoff retryablehttp.Backoff + HttpClient *http.Client + LogLevel logrus.Level + Logger *logrus.Logger + OpsGenieAPIURL ApiUrl + ProxyConfiguration *ProxyConfiguration + RequestTimeout time.Duration + RetryCount int + RetryPolicy retryablehttp.CheckRetry + func Default() *Config + func (conf *Config) ConfigureLogLevel(level string) + func (conf Config) Validate() error + type HttpMetric struct + Duration int64 + Error error + HttpRequest request + ResourcePath string + RetryCount int + Status string + StatusCode int + TransactionId string + func (hm *HttpMetric) Type() string + type Metric interface + Type func() string + type MetricPublisher struct + SubscriberMap map[string][]MetricSubscriber + type MetricSubscriber struct + Process Process + func (s *MetricSubscriber) Register(metricType MetricType) + type MetricType string + const API + const HTTP + const SDK + type OpsGenieClient struct + Config *Config + RetryableClient *retryablehttp.Client + func NewOpsGenieClient(cfg *Config) (*OpsGenieClient, error) + func (cli *OpsGenieClient) Exec(ctx context.Context, request ApiRequest, result ApiResult) error + type Process func(metric Metric) interface + type Protocol string + const Http + const Https + const Socks5 + type ProxyConfiguration struct + Host string + Password string + Port int + Protocol Protocol + Username string + type ResultMetadata struct + RateLimitPeriod string + RateLimitReason string + RateLimitState string + RequestId string + ResponseTime float32 + RetryCount int + func (rm *ResultMetadata) Parse(response *http.Response, result ApiResult) error + func (rm *ResultMetadata) ValidateResultMetadata() error + type SdkMetric struct + Duration int64 + ErrorMessage string + ErrorType string + ResourcePath string + SdkRequestDetails ApiRequest + SdkResultDetails ApiResult + TransactionId string + func (apiMetric *SdkMetric) Type() string