config

package
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseConfiguration

func ParseConfiguration()

func ValidateConfiguration

func ValidateConfiguration()

Types

type Specification

type Specification struct {
	// The New Relic Base Url, like 'https://api.newrelic.com' or 'https://api.eu.newrelic.com'
	ApiBaseUrl string `json:"apiBaseUrl" split_words:"true" required:"true"`
	// The New Relic API Key
	ApiKey string `json:"apiKey" split_words:"true" required:"true"`
	// The New Relic Insights Base Url, like 'https://insights-collector.newrelic.com' or 'https://insights-collector.eu01.nr-data.net'
	InsightsCollectorApiBaseUrl string `json:"insightsCollectorApiBaseUrl" split_words:"true" required:"true"`
	// The New Relic API Key of type "INGEST - LICENSE"
	InsightsCollectorApiKey string `json:"insightsCollectorApiKey" split_words:"true" required:"true"`
}

Specification is the configuration specification for the extension. Configuration values can be applied through environment variables. Learn more through the documentation of the envconfig package. https://github.com/kelseyhightower/envconfig

var (
	Config Specification
)

func (*Specification) CreateMutingRule

func (s *Specification) CreateMutingRule(_ context.Context, accountId int64, name string, description string, end time.Time) (*string, error)

func (*Specification) DeleteMutingRule

func (s *Specification) DeleteMutingRule(_ context.Context, accountId int64, mutingRuleId string) error

func (*Specification) GetAccountIds

func (s *Specification) GetAccountIds(_ context.Context) ([]int64, error)

func (*Specification) GetEntityTags

func (s *Specification) GetEntityTags(_ context.Context, guid string) (map[string][]string, error)

func (*Specification) GetIncidents

func (s *Specification) GetIncidents(_ context.Context, incidentPriorityFilter []string, accountId int64) ([]types.Incident, error)

func (*Specification) GetWorkloadStatus

func (s *Specification) GetWorkloadStatus(_ context.Context, workloadGuid string, accountId int64) (*string, error)

func (*Specification) GetWorkloads

func (s *Specification) GetWorkloads(_ context.Context, accountId int64) ([]types.Workload, error)

func (*Specification) PostEvent

func (s *Specification) PostEvent(_ context.Context, event *types.EventIngest, accountId int64) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL