problem

package
v0.0.0-...-3da42c7 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DTProblemEvent

type DTProblemEvent struct {
	PID          string `json:"PID"`
	ProblemID    string `json:"ProblemID"`
	ProblemURL   string `json:"ProblemURL"`
	State        string `json:"State"`
	Tags         string `json:"Tags"`
	KeptnProject string `json:"KeptnProject"`
	KeptnService string `json:"KeptnService"`
	KeptnStage   string `json:"KeptnStage"`
}

type ProblemAdapter

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

ProblemAdapter is a content adaptor for events of type sh.keptn.event.action.finished

func NewProblemAdapterFromEvent

func NewProblemAdapterFromEvent(e cloudevents.Event) (*ProblemAdapter, error)

NewProblemAdapterFromEvent creates a new ProblemAdapter from a cloudevents Event

func (ProblemAdapter) GetDeployment

func (a ProblemAdapter) GetDeployment() string

GetDeployment returns the name of the deployment

func (ProblemAdapter) GetDeploymentStrategy

func (a ProblemAdapter) GetDeploymentStrategy() string

GetDeploymentStrategy returns the used deployment strategy

func (ProblemAdapter) GetEvent

func (a ProblemAdapter) GetEvent() string

GetEvent returns the event type

func (ProblemAdapter) GetLabels

func (a ProblemAdapter) GetLabels() map[string]string

GetLabels returns a map of labels

func (ProblemAdapter) GetPID

func (a ProblemAdapter) GetPID() string

GetPID returns the PID

func (ProblemAdapter) GetProblemID

func (a ProblemAdapter) GetProblemID() string

GetProblemID returns the problem ID

func (ProblemAdapter) GetProblemURL

func (a ProblemAdapter) GetProblemURL() string

GetProblemURL returns the problem URL

func (ProblemAdapter) GetProject

func (a ProblemAdapter) GetProject() string

GetProject returns the project

func (ProblemAdapter) GetRawProblem

func (a ProblemAdapter) GetRawProblem() RawProblem

GetRawProblem returns the raw problem datastructure

func (ProblemAdapter) GetService

func (a ProblemAdapter) GetService() string

GetService returns the service

func (ProblemAdapter) GetShKeptnContext

func (a ProblemAdapter) GetShKeptnContext() string

GetShKeptnContext returns the shkeptncontext

func (ProblemAdapter) GetSource

func (a ProblemAdapter) GetSource() string

GetSource returns the source specified in the CloudEvent context

func (ProblemAdapter) GetStage

func (a ProblemAdapter) GetStage() string

GetStage returns the stage

func (ProblemAdapter) GetState

func (a ProblemAdapter) GetState() string

GetState returns problem state as OPEN or RESOLVED

func (ProblemAdapter) GetTestStrategy

func (a ProblemAdapter) GetTestStrategy() string

GetTestStrategy returns the used test strategy

func (ProblemAdapter) IsNotFromDynatrace

func (a ProblemAdapter) IsNotFromDynatrace() bool

IsNotFromDynatrace returns true if the source of the event is not dynatrace

func (ProblemAdapter) IsOpen

func (a ProblemAdapter) IsOpen() bool

IsOpen returns true if the problem is open

func (ProblemAdapter) IsResolved

func (a ProblemAdapter) IsResolved() bool

IsResolved returns true if the problem is resolved

type ProblemAdapterInterface

type ProblemAdapterInterface interface {
	adapter.EventContentAdapter
	IsNotFromDynatrace() bool
	GetState() string
	GetPID() string
	GetProblemID() string
	IsOpen() bool
	IsResolved() bool
	GetProblemURL() string
	GetRawProblem() RawProblem
}

type ProblemClosedEventFactory

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

func NewProblemClosedEventFactory

func NewProblemClosedEventFactory(event ProblemAdapterInterface) *ProblemClosedEventFactory

func (*ProblemClosedEventFactory) CreateCloudEvent

func (f *ProblemClosedEventFactory) CreateCloudEvent() (*cloudevents.Event, error)

type ProblemEventHandler

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

func (ProblemEventHandler) HandleEvent

func (eh ProblemEventHandler) HandleEvent(workCtx context.Context, replyCtx context.Context) error

HandleEvent handles a problem event.

type RawProblem

type RawProblem map[string]interface{}

RawProblem is the raw problem datastructure

type RemediationTriggeredEventData

type RemediationTriggeredEventData struct {
	keptnv2.EventData

	// Problem contains details about the problem
	Problem RawProblem `json:"problem"`
}

type RemediationTriggeredEventFactory

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

func (*RemediationTriggeredEventFactory) CreateCloudEvent

func (f *RemediationTriggeredEventFactory) CreateCloudEvent() (*cloudevents.Event, error)

Jump to

Keyboard shortcuts

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