instance

package
Version: v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Actions added in v0.6.0

type Actions struct {
	Acknowledge bool `json:"acknowledge"`
	Snooze      bool `json:"snooze"`
	Close       bool `json:"close"`
}

Actions is the structure to enable/disable various actions for Opsgenie in the configuration.

type Config

type Config struct {
	Name        string  `json:"name"`
	DisplayName string  `json:"displayName"`
	Description string  `json:"description"`
	APIKey      string  `json:"apiKey"`
	APIUrl      string  `json:"apiUrl"`
	URL         string  `json:"url"`
	Actions     Actions `json:"actions"`
}

Config is the structure of the configuration for a single Opsgenie instance.

type Instance

type Instance struct {
	Name    string
	Actions Actions
	// contains filtered or unexported fields
}

Instance represents a single Jaeger instance, which can be added via the configuration file.

func New

func New(config Config) (*Instance, error)

New returns a new Elasticsearch instance for the given configuration.

func (*Instance) AcknowledgeAlert added in v0.6.0

func (i *Instance) AcknowledgeAlert(ctx context.Context, id, user string) error

AcknowledgeAlert acknowledges an alert.

func (*Instance) CloseAlert added in v0.6.0

func (i *Instance) CloseAlert(ctx context.Context, id, user string) error

CloseAlert closes an alert.

func (*Instance) GetAlertDetails

func (i *Instance) GetAlertDetails(ctx context.Context, id string) (*alert.GetAlertResult, error)

GetAlertDetails returns the details for single alert.

func (*Instance) GetAlertLogs

func (i *Instance) GetAlertLogs(ctx context.Context, id string) ([]alert.AlertLog, error)

GetAlertLogs returns the logs for single alert.

func (*Instance) GetAlertNotes

func (i *Instance) GetAlertNotes(ctx context.Context, id string) ([]alert.AlertNote, error)

GetAlertNotes returns the notes for single alert.

func (*Instance) GetAlerts

func (i *Instance) GetAlerts(ctx context.Context, query string) ([]alert.Alert, error)

GetAlerts returns a list of Opsgenie alerts for the given query.

func (*Instance) GetIncidentLogs

func (i *Instance) GetIncidentLogs(ctx context.Context, id string) ([]incident.LogResult, error)

GetIncidentLogs returns the logs for single incident.

func (*Instance) GetIncidentNotes

func (i *Instance) GetIncidentNotes(ctx context.Context, id string) ([]incident.NoteResult, error)

GetIncidentNotes returns the notes for single incident.

func (*Instance) GetIncidentTimeline

func (i *Instance) GetIncidentTimeline(ctx context.Context, id string) ([]timeline.Entry, error)

GetIncidentTimeline returns the timeline for single incident.

func (*Instance) GetIncidents

func (i *Instance) GetIncidents(ctx context.Context, query string) ([]incident.Incident, error)

GetIncidents returns a list of Opsgenie incidents for the given query.

func (*Instance) SnoozeAlert added in v0.6.0

func (i *Instance) SnoozeAlert(ctx context.Context, id, user string, duration time.Duration) error

SnoozeAlert snoozes an alert.

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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