opsgenie

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(cfg []Config, grpcServer *grpc.Server) ([]*pluginsProto.PluginShort, error)

Register is used to initialize the Opsgenie service and to register it at the given gRPC server.

Types

type Config

type Config struct {
	Name        string `yaml:"name"`
	Description string `yaml:"description"`
	ApiKey      string `yaml:"apiKey"`
	ApiUrl      string `yaml:"apiUrl"`
}

Config is the configuration for an Opsgenie instance. It contains a name, description and an API Key and URL for the Opsgenie API.

type Instance

type Instance struct {
	// contains filtered or unexported fields
}

type Opsgenie

type Opsgenie struct {
	opsgenieProto.UnimplementedOpsgenieServer
	// contains filtered or unexported fields
}

func (*Opsgenie) GetAlert

GetAlert implements the GetAlert function of the Opsgenie gRPC service. It returns a single alert by it's id. When the alert was retrieved from the Opsgenie API, we also loop through the returned responders and add the names of the teams by using the team API of Opsgenie.

func (*Opsgenie) GetAlerts

GetAlerts implements the GetAlerts function for the Opsgenie gRPC service. It returns a list of alert for the given query. Currently the list of results is limited to 100 alerts (Opsgenie API limit). Maybe we can implement a pageination logic later by using the offset parameter.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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