Documentation
¶
Index ¶
- Constants
- func Decode(in, out interface{}) error
- func EventDataAs(in models.KeptnContextExtendedCE, out interface{}) error
- func GetFinishedEventType(task string) string
- func GetStartedEventType(task string) string
- func GetStatusChangedEventType(task string) string
- func GetTriggeredEventType(task string) string
- type ActionData
- type ActionFinishedEventData
- type ActionInfo
- type ActionStartedEventData
- type ActionTriggeredEventData
- type ApprovalFinishedEventData
- type ApprovalStartedEventData
- type ApprovalStatusChangedEventData
- type ApprovalTriggeredEventData
- type ConfigurationChange
- type ConfigureMonitoringFinishedEventData
- type ConfigureMonitoringStartedEventData
- type ConfigureMonitoringTriggeredEventData
- type ConfigureMonitoringTriggeredParams
- type DeploymentData
- type DeploymentFinishedEventData
- type DeploymentStartedEventData
- type DeploymentStatusChangedEventData
- type DeploymentTriggeredEventData
- type DeploymentWithStrategy
- type EvaluationDetails
- type EvaluationFinishedEventData
- type EvaluationStartedEventData
- type EvaluationStatusChangedEventData
- type EvaluationTriggeredEventData
- type EventData
- type GetSLIFinishedEventData
- type GetSLIStartedEventData
- type GetSLITriggeredEventData
- type Helm
- type Keptn
- type Metadata
- type ProblemDetails
- type ProjectCreateData
- type ProjectCreateFinishedEventData
- type ProjectCreateStartedEventData
- type ProjectDeleteData
- type ProjectDeleteFinishedEventData
- type ProjectDeleteStartedEventData
- type ReleaseData
- type ReleaseFinishedEventData
- type ReleaseStartedEventData
- type ReleaseStatusChangedEventData
- type ReleaseTriggeredEventData
- type Remediation
- type RemediationFinishedEventData
- type RemediationStartedEventData
- type RemediationStatusChangedEventData
- type RemediationTriggeredEventData
- type ResultType
- type SLIEvaluationResult
- type SLIFilter
- type SLIResult
- type SLITarget
- type Sequence
- type ServiceCreateFinishedEventData
- type ServiceCreateStartedEventData
- type ServiceCreateStatusChangedEventData
- type ServiceDeleteFinishedEventData
- type ServiceDeleteStartedEventData
- type ServiceDeleteStatusChangedEventData
- type Shipyard
- type ShipyardSpec
- type Stage
- type StatusType
- type Task
- type TestFinishedEventData
- type TestStartedEventData
- type TestStatusChangedEventData
- type TestTriggeredEventData
Constants ¶
const ActionTaskName = "action"
const ApprovalAutomatic = "automatic"
ApprovalAutomatic indicates an automatic approval strategy
const ApprovalManual = "manual"
ApprovalManual indicates a manual approval strategy
const ApprovalTaskName = "approval"
const ConfigureMonitoringTaskName = "configure-monitoring"
const DefaultLocalEventBrokerURL = "http://localhost:8081/event"
const DeploymentTaskName = "deployment"
const EvaluationTaskName = "evaluation"
const GetSLITaskName = "get-sli"
const MAX_SEND_RETRIES = 3
const ProjectCreateTaskName = "project.create"
const ProjectDeleteTaskName = "project.delete"
const ReleaseTaskName = "release"
const ServiceCreateTaskName = "service.create"
const ServiceDeleteTaskName = "service.delete"
const TestTaskName = "test"
Variables ¶
This section is empty.
Functions ¶
func Decode ¶ added in v0.8.0
func Decode(in, out interface{}) error
Decode decodes the given raw interface to the target pointer specified by the out paratmeter
func EventDataAs ¶ added in v0.8.0
func EventDataAs(in models.KeptnContextExtendedCE, out interface{}) error
EventDataAs decodes the event data of the given keptn cloud event to the target pointer specified by the out parameter
func GetFinishedEventType ¶
GetFinishedEventType returns for the given task the name of the finished event type
func GetStartedEventType ¶
GetStartedEventType returns for the given task the name of the started event type
func GetStatusChangedEventType ¶
GetStatusChangedEventType returns for the given task the name of the status.changed event type
func GetTriggeredEventType ¶
GetTriggeredEventType returns for the given task the name of the triggered event type
Types ¶
type ActionData ¶ added in v0.8.0
type ActionData struct {
// GitCommit indicates the action
GitCommit string `json:"gitCommit"`
}
type ActionFinishedEventData ¶ added in v0.8.0
type ActionFinishedEventData struct {
EventData
Action ActionData `json:"action"`
}
ActionFinishedEventData contains information about the execution of an action
type ActionInfo ¶ added in v0.8.0
type ActionInfo struct {
// Name is the name of the action
Name string `json:"name"`
// Action determines the type of action to be executed
Action string `json:"action"`
// Description contains the description of the action
Description string `json:"description"`
// Value contains the value of the action
Value interface{} `json:"value,omitempty"`
}
ActionInfo contains information about the action to be performed
type ActionStartedEventData ¶ added in v0.8.0
type ActionStartedEventData struct {
EventData
}
ActionStartedEventData contains information about an action.started event
type ActionTriggeredEventData ¶ added in v0.8.0
type ActionTriggeredEventData struct {
EventData
// Action describes the type of action
Action ActionInfo `json:"action"`
// Problem contains details about the problem
Problem ProblemDetails `json:"problem"`
}
ActionTriggeredEventData contains information about an action.triggered event
type ApprovalFinishedEventData ¶
type ApprovalFinishedEventData struct {
EventData
}
type ApprovalStartedEventData ¶
type ApprovalStartedEventData struct {
EventData
}
type ApprovalStatusChangedEventData ¶
type ApprovalStatusChangedEventData struct {
EventData
}
type ConfigurationChange ¶ added in v0.8.0
type ConfigurationChange struct {
Values map[string]interface{} `json:"values"`
}
type ConfigureMonitoringFinishedEventData ¶ added in v0.8.0
type ConfigureMonitoringFinishedEventData struct {
EventData
}
ConfigureMonitoringFinishedEventData godoc
type ConfigureMonitoringStartedEventData ¶ added in v0.8.0
type ConfigureMonitoringStartedEventData struct {
EventData
}
ConfigureMonitoringStartedEventData godoc
type ConfigureMonitoringTriggeredEventData ¶ added in v0.8.0
type ConfigureMonitoringTriggeredEventData struct {
EventData
ConfigureMonitoring ConfigureMonitoringTriggeredParams `json:"configureMonitoring"`
}
ConfigureMonitoringTriggeredEventData godoc
type ConfigureMonitoringTriggeredParams ¶ added in v0.8.0
type ConfigureMonitoringTriggeredParams struct {
Type string `json:"type"`
}
ConfigureMonitoringTriggeredParams godoc
type DeploymentData ¶
type DeploymentData struct {
// DeploymentStrategy defines the used deployment strategy
DeploymentStrategy string `json:"deploymentstrategy,omitempty"`
// DeploymentURILocal contains the local URL
DeploymentURIsLocal []string `json:"deploymentURIsLocal,omitempty"`
// DeploymentURIPublic contains the public URL
DeploymentURIsPublic []string `json:"deploymentURIsPublic,omitempty"`
// DeploymentNames gives the names of the deployments
DeploymentNames []string `json:"deploymentNames"`
// GitCommit indicates the version which should be deployed
GitCommit string `json:"gitCommit"`
}
type DeploymentFinishedEventData ¶
type DeploymentFinishedEventData struct {
EventData
Deployment DeploymentData `json:"deployment"`
}
type DeploymentStartedEventData ¶
type DeploymentStartedEventData struct {
EventData
}
type DeploymentStatusChangedEventData ¶
type DeploymentStatusChangedEventData struct {
EventData
}
type DeploymentTriggeredEventData ¶
type DeploymentTriggeredEventData struct {
EventData
ConfigurationChange ConfigurationChange `json:"configurationChange"`
Deployment DeploymentWithStrategy `json:"deployment"`
}
type DeploymentWithStrategy ¶
type DeploymentWithStrategy struct {
// DeploymentStrategy defines the used deployment strategy
DeploymentStrategy string `json:"deploymentstrategy,omitempty"`
}
type EvaluationDetails ¶
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"`
ComparedEvents []string `json:"comparedEvents"`
// GitCommit indicates the version which should be deployed
GitCommit string `json:"gitCommit"`
}
type EvaluationFinishedEventData ¶
type EvaluationFinishedEventData struct {
EventData
Evaluation EvaluationDetails `json:"evaluation"`
}
type EvaluationStartedEventData ¶
type EvaluationStartedEventData struct {
EventData
}
type EvaluationStatusChangedEventData ¶
type EvaluationStatusChangedEventData struct {
EventData
}
type EvaluationTriggeredEventData ¶
type EvaluationTriggeredEventData struct {
EventData
Test struct {
// Start indicates the starting timestamp of the tests
Start string `json:"start"`
// End indicates the end timestamp of the tests
End string `json:"end"`
} `json:"test"`
Evaluation struct {
// Start indicates the starting timestamp of the tests
Start string `json:"start"`
// End indicates the end timestamp of the tests
End string `json:"end"`
} `json:"evaluation"`
Deployment struct {
// DeploymentNames gives the names of the deployments
DeploymentNames []string `json:"deploymentNames"`
} `json:"deployment"`
}
type EventData ¶
type EventData struct {
Project string `json:"project"`
Stage string `json:"stage"`
Service string `json:"service"`
Labels map[string]string `json:"labels"`
Status StatusType `json:"status"`
Result ResultType `json:"result"`
Message string `json:"message"`
}
EventData contains mandatory fields of all Keptn CloudEvents
func (EventData) GetProject ¶ added in v0.8.0
func (EventData) GetService ¶ added in v0.8.0
type GetSLIFinishedEventData ¶ added in v0.8.0
type GetSLIFinishedEventData struct {
EventData
GetSLI struct {
// Start defines the start timestamp
Start string `json:"start"`
// End defines the end timestamp
End string `json:"end"`
// IndicatorValues defines the fetched SLI values
IndicatorValues []*SLIResult `json:"indicatorValues"`
} `json:"get-sli"`
}
type GetSLIStartedEventData ¶ added in v0.8.0
type GetSLIStartedEventData struct {
EventData
}
type GetSLITriggeredEventData ¶ added in v0.8.0
type GetSLITriggeredEventData struct {
EventData
GetSLI struct {
// SLIProvider defines the name of the monitoring solution that provides the SLIs
SLIProvider string `json:"sliProvider"`
// Start defines the start timestamp
Start string `json:"start"`
// End defines the end timestamp
End string `json:"end"`
// Indicators defines the SLI names
Indicators []string `json:"indicators"`
// CustomFilters defines filters on the SLIs
CustomFilters []*SLIFilter `json:"customFilters"`
} `json:"get-sli"`
}
type Keptn ¶ added in v0.8.0
func (*Keptn) GetShipyard ¶ added in v0.8.0
GetShipyard returns the shipyard definition of a project
func (*Keptn) SendCloudEvent ¶ added in v0.8.0
func (k *Keptn) SendCloudEvent(event cloudevents.Event) error
SendCloudEvent sends a cloudevent to the event broker
type Metadata ¶
type Metadata struct {
Name string `json:"name" yaml:"name"`
}
Metadata contains meta-data of a resource
type ProblemDetails ¶
type ProblemDetails 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
// ProblemURL is a back link to the original problem
ProblemURL string `json:"ProblemURL,omitempty"`
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"`
}
ProblemDetails contains information about a problem
type ProjectCreateData ¶ added in v0.8.0
type ProjectCreateFinishedEventData ¶ added in v0.8.0
type ProjectCreateFinishedEventData struct {
EventData
CreatedProject ProjectCreateData `json:"createdProject"`
}
type ProjectCreateStartedEventData ¶ added in v0.8.0
type ProjectCreateStartedEventData struct {
EventData
}
type ProjectDeleteData ¶ added in v0.8.0
type ProjectDeleteData struct {
}
type ProjectDeleteFinishedEventData ¶ added in v0.8.0
type ProjectDeleteFinishedEventData struct {
EventData
}
type ProjectDeleteStartedEventData ¶ added in v0.8.0
type ProjectDeleteStartedEventData struct {
EventData
}
type ReleaseData ¶ added in v0.8.0
type ReleaseData struct {
// GitCommit indicates the version which should be deployed
GitCommit string `json:"gitCommit"`
}
type ReleaseFinishedEventData ¶
type ReleaseFinishedEventData struct {
EventData
Release ReleaseData `json:"release"`
}
type ReleaseStartedEventData ¶
type ReleaseStartedEventData struct {
EventData
}
type ReleaseStatusChangedEventData ¶
type ReleaseStatusChangedEventData struct {
EventData
}
type ReleaseTriggeredEventData ¶
type ReleaseTriggeredEventData struct {
EventData
Deployment DeploymentWithStrategy `json:"deployment"`
}
type Remediation ¶
type Remediation struct {
// ActionIndex is the index of the action
ActionIndex int `json:"actionIndex"`
// ActionName is the name of the action
ActionName string `json:"actionName"`
}
RemediationStatus describes the status of a remediation
type RemediationFinishedEventData ¶
type RemediationFinishedEventData struct {
EventData
}
RemediationFinishedEventData describes a finished remediation
type RemediationStartedEventData ¶
type RemediationStartedEventData struct {
EventData
}
RemediationTriggeredEventType is a CloudEvent to indicate the start of a remediation
type RemediationStatusChangedEventData ¶
type RemediationStatusChangedEventData struct {
EventData
// Remediation indicates the result
Remediation Remediation `json:"remediation"`
}
RemediationStatus describes the result and status of a remediation
type RemediationTriggeredEventData ¶
type RemediationTriggeredEventData struct {
EventData
// Problem contains details about the problem
Problem ProblemDetails `json:"problem"`
}
RemediationTriggeredEventData is a CloudEvent for triggering remediations
type ResultType ¶
type ResultType string
const ( ResultPass ResultType = "pass" ResultWarning ResultType = "warning" ResultFailed ResultType = "fail" )
type SLIEvaluationResult ¶
type Sequence ¶
type Sequence struct {
Name string `json:"name" yaml:"name"`
Triggers []string `json:"triggers" yaml:"triggers"`
Tasks []Task `json:"tasks" yaml:"tasks"`
}
Sequence defines a task sequence by its name and tasks. The triggers property is optional
type ServiceCreateFinishedEventData ¶ added in v0.8.0
type ServiceCreateStartedEventData ¶ added in v0.8.0
type ServiceCreateStartedEventData struct {
EventData
}
type ServiceCreateStatusChangedEventData ¶ added in v0.8.0
type ServiceCreateStatusChangedEventData struct {
EventData
}
type ServiceDeleteFinishedEventData ¶ added in v0.8.0
type ServiceDeleteFinishedEventData struct {
EventData
}
type ServiceDeleteStartedEventData ¶ added in v0.8.0
type ServiceDeleteStartedEventData struct {
EventData
}
type ServiceDeleteStatusChangedEventData ¶ added in v0.8.0
type ServiceDeleteStatusChangedEventData struct {
EventData
}
type Shipyard ¶
type Shipyard struct {
ApiVersion string `json:"apiVersion" yaml:"apiVersion"`
Kind string `json:"kind" yaml:"kind"`
Metadata Metadata `json:"metadata" yaml:"metadata"`
Spec ShipyardSpec `json:"spec" yaml:"spec"`
}
Shipyard describes a shipyard specification according to Keptn spec 0.2.0
type ShipyardSpec ¶
type ShipyardSpec struct {
Stages []Stage `json:"stages" yaml:"stages"`
}
ShipyardSpec consists of any number of stages
type Stage ¶
type Stage struct {
Name string `json:"name" yaml:"name"`
Sequences []Sequence `json:"sequences" yaml:"sequences"`
}
Stage defines a stage by its name and list of task sequences
type StatusType ¶
type StatusType string
const ( StatusSucceeded StatusType = "succeeded" StatusErrored StatusType = "errored" StatusUnknown StatusType = "unknown" )
type Task ¶
type Task struct {
Name string `json:"name" yaml:"name"`
Properties interface{} `json:"properties" yaml:"properties"`
}
Task defines a task by its name and optional properties
type TestFinishedEventData ¶
type TestFinishedEventData struct {
EventData
Test struct {
// Start indicates the starting timestamp of the tests
Start string `json:"start"`
// End indicates the end timestamp of the tests
End string `json:"end"`
// GitCommit indicates the version which should be deployed
GitCommit string `json:"gitCommit"`
} `json:"test"`
}
type TestStartedEventData ¶
type TestStartedEventData struct {
EventData
}
type TestStatusChangedEventData ¶
type TestStatusChangedEventData struct {
EventData
}
type TestTriggeredEventData ¶
type TestTriggeredEventData struct {
EventData
Test struct {
// TestStrategy is the testing strategy and is defined in the shipyard
TestStrategy string `json:"teststrategy"`
} `json:"test"`
Deployment struct {
// DeploymentURILocal contains the local URL
DeploymentURIsLocal []string `json:"deploymentURIsLocal,omitempty"`
// DeploymentURIPublic contains the public URL
DeploymentURIsPublic []string `json:"deploymentURIsPublic,omitempty"`
} `json:"deployment"`
}