events

package
v0.6.1-a Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigurationChangeEventType = "sh.keptn.event.configuration.change"

ConfigurationChangeEventType is a CloudEvent type for changing the configuration

View Source
const ConfigureMonitoringEventType = "sh.keptn.event.monitoring.configure"

ConfigureMonitoringEventType is a CloudEvent for configuring monitoring

View Source
const DeploymentFinishedEventType = "sh.keptn.events.deployment-finished"

DeploymentFinishedEventType is a CloudEvent for indicating that the deployment has finished

View Source
const EvaluationDoneEventType = "sh.keptn.events.evaluation-done"

EvaluationDoneEventType is a CloudEvent for indicating that the evaluation has finished

View Source
const InternalGetSLIDoneEventType = "sh.keptn.internal.event.get-sli.done"

InternalGetSLIDoneEventType is a CloudEvent for submitting SLI values

View Source
const InternalGetSLIEventType = "sh.keptn.internal.event.get-sli"

InternalGetSLIEventType is a CloudEvent for retrieving SLI values

View Source
const InternalProjectCreateEventType = "sh.keptn.internal.event.project.create"

InternalProjectCreateEventType is a CloudEvent type for creating a new project

View Source
const InternalProjectDeleteEventType = "sh.keptn.internal.event.project.delete"

InternalProjectDeleteEventType is a CloudEvent type for deleting a project

View Source
const InternalServiceCreateEventType = "sh.keptn.internal.event.service.create"

InternalServiceCreateEventType is a CloudEvent type for creating a new service

View Source
const ProblemEventType = "sh.keptn.events.problem"

ProblemEventType is a CloudEvent type to inform about a problem

View Source
const ProblemOpenEventType = "sh.keptn.event.problem.open"

ProblemOpenEventType is a CloudEvent type to inform about an open problem

View Source
const StartEvaluationEventType = "sh.keptn.event.start-evaluation"

StartEvaluationEventType is a CloudEvent for retrieving SLI values

View Source
const TestsFinishedEventType = "sh.keptn.events.tests-finished"

TestsFinishedEventType is a CloudEvent for indicating that tests have finished

Variables

This section is empty.

Functions

This section is empty.

Types

type Canary

type Canary struct {
	// Value represents the traffic percentage on the canary
	Value int32 `json:"value,omitempty"`
	// Action represents the action of the canary
	Action CanaryAction `json:"action"`
}

Canary describes the new configuration in a canary release

type CanaryAction

type CanaryAction int

CanaryAction describes the excution of a canary release

const (
	// Set is used for setting a new traffic weight for the canary
	Set CanaryAction = iota
	// Promote is used for promoting the canary
	Promote
	// Discard is used for discarding the canary
	Discard
)

func (CanaryAction) MarshalJSON

func (s CanaryAction) MarshalJSON() ([]byte, error)

MarshalJSON marshals the enum as a quoted json string

func (CanaryAction) String

func (s CanaryAction) String() string

func (*CanaryAction) UnmarshalJSON

func (s *CanaryAction) UnmarshalJSON(b []byte) error

UnmarshalJSON unmashals a quoted json string to the enum value

type ConfigurationChangeEventData

type ConfigurationChangeEventData struct {
	// Project is the name of the project
	Project string `json:"project"`
	// Service is the name of the new service
	Service string `json:"service"`
	// Stage is the name of the stage
	Stage string `json:"stage"`
	// ValuesCanary contains new Helm values for canary
	ValuesCanary map[string]interface{} `json:"valuesCanary,omitempty"`
	// Canary contains a new configuration for canary releases
	Canary *Canary `json:"canary,omitempty"`
	// FileChangesUserChart provides new content for the user chart.
	// The key value pairs represent the URI within the chart (i.e. the key) and the new content (i.e. the value).
	FileChangesUserChart map[string]string `json:"fileChangesUserChart,omitempty"`
	// FileChangesGeneratedChart provides new content for the generated chart.
	// The key value pairs represent the URI within the chart (i.e. the key) and the new content (i.e. the value).
	FileChangesGeneratedChart map[string]string `json:"fileChangesGeneratedChart,omitempty"`
	// FileChangesUmbrellaChart provides new content for the umbrella chart.
	// The key value pairs represent the URI within the chart (i.e. the key) and the new content (i.e. the value).
	FileChangesUmbrellaChart map[string]string `json:"fileChangesUmbrellaChart,omitempty"`
	// Labels contains labels
	Labels map[string]string `json:"labels"`
}

ConfigurationChangeEventData represents the data for changing the service configuration

type ConfigureMonitoringEventData

type ConfigureMonitoringEventData struct {
	Type string `json:"type"`
	// Project is the name of the project
	Project string `json:"project"`
	// Service is the name of the new service
	Service string `json:"service"`
}

ConfigureMonitoringEventData represents the data necessary to configure monitoring for a service

type DeploymentFinishedEventData added in v0.4.0

type DeploymentFinishedEventData struct {
	// Project is the name of the project
	Project string `json:"project"`
	// Stage is the name of the stage
	Stage string `json:"stage"`
	// Service is the name of the new service
	Service string `json:"service"`
	// TestStrategy is the testing strategy
	TestStrategy string `json:"teststrategy"`
	// DeploymentStrategy is the deployment strategy
	DeploymentStrategy string `json:"deploymentstrategy"`
	// Tag of the new deployed artifact
	Tag string `json:"tag"`
	// Image of the new deployed artifact
	Image string `json:"image"`
	// Labels contains labels
	Labels map[string]string `json:"labels"`
	// DeploymentURILocal contains the local URL
	DeploymentURILocal string `json:"deploymentURILocal,omitempty"`
	// DeploymentURIPublic contains the public URL
	DeploymentURIPublic string `json:"deploymentURIPublic,omitempty"`
}

DeploymentFinishedEventData represents the data for a deployment finished event

type DeploymentStrategy

type DeploymentStrategy int

DeploymentStrategy describes how a keptn-managed service is deployed

const (
	// Direct stores the chart which results in the
	Direct DeploymentStrategy = iota + 1

	// Duplicate generates a second chart in order to duplicate the deployments
	Duplicate
)

func GetDeploymentStrategy added in v0.2.3

func GetDeploymentStrategy(deploymentStrategy string) (DeploymentStrategy, error)

GetDeploymentStrategy tries to parse the deployment strategy into the enum If the provided deployment strategy is unsupported, an error is returned

func (DeploymentStrategy) MarshalJSON

func (s DeploymentStrategy) MarshalJSON() ([]byte, error)

MarshalJSON marshals the enum as a quoted json string

func (DeploymentStrategy) String

func (s DeploymentStrategy) String() string

func (*DeploymentStrategy) UnmarshalJSON

func (s *DeploymentStrategy) UnmarshalJSON(b []byte) error

UnmarshalJSON unmashals a quoted json string to the enum value

type EvaluationDetails added in v0.4.0

type EvaluationDetails struct {
	TimeStart        string                 `json:"timeStart"`
	TimeEnd          string                 `json:"timeEnd"`
	Result           string                 `json:"result"`
	Score            float64                `json:"score"`
	SLOFileContent   string                 `json:"sloFileContent"`
	IndicatorResults []*SLIEvaluationResult `json:"indicatorResults"`
}

type EvaluationDoneEventData added in v0.4.0

type EvaluationDoneEventData struct {
	EvaluationDetails *EvaluationDetails `json:"evaluationdetails"`
	// Result is the result of an evaluation; possible values are: pass, warning, fail
	Result string `json:"result"`
	// Project is the name of the project
	Project string `json:"project"`
	// Stage is the name of the stage
	Stage string `json:"stage"`
	// Service is the name of the new service
	Service string `json:"service"`
	// TestStrategy is the testing strategy
	TestStrategy string `json:"teststrategy"`
	// DeploymentStrategy is the deployment strategy
	DeploymentStrategy string `json:"deploymentstrategy"`
	// Labels contains labels
	Labels map[string]string `json:"labels"`
}

EvaluationDoneEventData contains information about evaluation results

type InternalGetSLIDoneEventData added in v0.4.0

type InternalGetSLIDoneEventData struct {
	// Project is the name of the project
	Project string `json:"project"`
	// Stage is the name of the stage
	Stage string `json:"stage"`
	// Service is the name of the new service
	Service string `json:"service"`
	Start   string `json:"start"`
	End     string `json:"end"`
	// TestStrategy is the testing strategy
	TestStrategy    string       `json:"teststrategy"`
	IndicatorValues []*SLIResult `json:"indicatorValues"`
	// DeploymentStrategy is the deployment strategy
	DeploymentStrategy string `json:"deploymentstrategy"`
	Deployment         string `json:"deployment"`
	// Labels contains labels
	Labels map[string]string `json:"labels"`
}

InternalGetSLIDoneEventData contains a list of SLIs and their values

type InternalGetSLIEventData added in v0.4.0

type InternalGetSLIEventData struct {
	// SLIProvider is the name of the SLI provider which is queried
	SLIProvider string `json:"sliProvider"`
	// Project is the name of the project
	Project string `json:"project"`
	// Stage is the name of the stage
	Stage string `json:"stage"`
	// Service is the name of the new service
	Service string `json:"service"`
	Start   string `json:"start"`
	End     string `json:"end"`
	// TestStrategy is the testing strategy
	TestStrategy string `json:"teststrategy"`
	// DeploymentStrategy is the deployment strategy
	DeploymentStrategy string       `json:"deploymentstrategy"`
	Deployment         string       `json:"deployment"`
	Indicators         []string     `json:"indicators"`
	CustomFilters      []*SLIFilter `json:"customFilters"`
	// Labels contains labels
	Labels map[string]string `json:"labels"`
}

InternalGetSLIEventData describes a set of SLIs to be retrieved by a data source

type ProblemEventData

type ProblemEventData struct {
	// State is the state of the problem; possible values are: OPEN, RESOLVED
	State string `json:"State,omitempty"`
	// ProblemID is a unique system identifier of the reported problem
	ProblemID string `json:"ProblemID"`
	// ProblemTitle is the display number of the reported problem.
	ProblemTitle string `json:"ProblemTitle"`
	// ProblemDetails are all problem event details including root cause
	ProblemDetails json.RawMessage `json:"ProblemDetails"`
	// PID is a unique system identifier of the reported problem.
	PID string `json:"PID"`
	// ImpcatedEntity is an identifier of the impacted entity
	ImpactedEntity string `json:"ImpactedEntity,omitempty"`
	// Tags is a comma separated list of tags that are defined for all impacted entities.
	Tags string `json:"Tags,omitempty"`
	// Project is the name of the project
	Project string `json:"project,omitempty"`
	// Stage is the name of the stage
	Stage string `json:"stage,omitempty"`
	// Service is the name of the new service
	Service string `json:"service,omitempty"`
	// Labels contains labels
	Labels map[string]string `json:"labels"`
}

ProblemEventData represents the data for describing a problem

type ProjectCreateEventData

type ProjectCreateEventData struct {
	// Project is the name of the project
	Project string `json:"project"`
	// Shipyard is a base64 encoded string of the shipyard file
	Shipyard string `json:"shipyard"`
	// GitUser is the name of a git user of an upstream repository
	GitUser string `json:"gitUser,omitempty"`
	// GitToken is the authentication token for the git user
	GitToken string `json:"gitToken,omitempty"`
	// GitRemoteURL is the remote url of a repository
	GitRemoteURL string `json:"gitRemoteURL,omitempty"`
}

ProjectCreateEventData represents the data for creating a new project

type ProjectDeleteEventData

type ProjectDeleteEventData struct {
	// Project is the name of the project
	Project string `json:"project"`
}

ProjectDeleteEventData represents the data for deleting a project

type SLIEvaluationResult added in v0.4.0

type SLIEvaluationResult struct {
	Score   float64      `json:"score"`
	Value   *SLIResult   `json:"value"`
	Targets []*SLITarget `json:"targets"`
	Status  string       `json:"status"` // pass | warning | fail
}

type SLIFilter added in v0.4.0

type SLIFilter struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type SLIResult added in v0.4.0

type SLIResult struct {
	Metric  string  `json:"metric"`
	Value   float64 `json:"value"`
	Success bool    `json:"success"`
	Message string  `json:"message,omitempty"`
}

type SLITarget added in v0.4.0

type SLITarget struct {
	Criteria    string  `json:"criteria"`
	TargetValue float64 `json:"targetValue"`
	Violated    bool    `json:"violated"`
}

type ServiceCreateEventData

type ServiceCreateEventData struct {
	// Project is the name of the project
	Project string `json:"project"`
	// Service is the name of the new service
	Service string `json:"service"`
	// HelmChart are the data of a Helm chart packed as tgz and base64 encoded
	HelmChart string `json:"helmChart"`
	// DeploymentStrategies contains the deployment strategy for the stages
	DeploymentStrategies map[string]DeploymentStrategy `json:"deploymentStrategies"`
}

ServiceCreateEventData represents the data for creating a new service

type StartEvaluationEventData added in v0.4.0

type StartEvaluationEventData struct {
	// Project is the name of the project
	Project string `json:"project"`
	// Service is the name of the new service
	Service string `json:"service"`
	// Stage is the name of the stage
	Stage string `json:"stage"`
	// TestStrategy is the testing strategy
	TestStrategy string `json:"teststrategy"`
	// DeploymentStrategy is the deployment strategy
	DeploymentStrategy string `json:"deploymentstrategy"`
	// Start indicates the starting timestamp of the tests
	Start string `json:"start"`
	// End indicates the end timestamp of the tests
	End string `json:"end"`
	// Labels contains labels
	Labels map[string]string `json:"labels"`
}

StartEvaluationEventData represents the data for a test finished event

type TestsFinishedEventData

type TestsFinishedEventData struct {
	// Project is the name of the project
	Project string `json:"project"`
	// Service is the name of the new service
	Service string `json:"service"`
	// Stage is the name of the stage
	Stage string `json:"stage"`
	// TestStrategy is the testing strategy
	TestStrategy string `json:"teststrategy"`
	// DeploymentStrategy is the deployment strategy
	DeploymentStrategy string `json:"deploymentstrategy"`
	// Start indicates the starting timestamp of the tests
	Start string `json:"start"`
	// End indicates the end timestamp of the tests
	End string `json:"end"`
	// Labels contains labels
	Labels map[string]string `json:"labels"`
	// Result shows the status of the test
	Result string `json:"result"`
}

TestsFinishedEventData represents the data for a test finished event

Jump to

Keyboard shortcuts

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