Documentation ¶
Overview ¶
Copyright 2020 IBM Corporation
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
const ( MAX_RETAINED_MESSAGES = 100 // maximum number of messages to retain /* Operations names */ OPERATION_VALIDATE_WEBHOOK_SECRET = "validate-webhook-secret" OPERATION_RESOLVE_REPOSITORY_TYPE = "resolve-repository-type" OPERATION_FIND_MEDIATION = "find-mediation" OPERATION_INITIALIZE_VARIABLES = "initialize-mediation-variables" OPERATION_EVALUATE_MEDIATION = "evaluate-mediation" OPERATION_SEND_EVENT = "send-event" /* Parameter names */ PARAM_FROM = "from" PARAM_MEDIATION = "mediation" PARAM_FILE = "file" PARAM_DESTINATION = "destination" PARAM_URL = "url" PARAM_URLEXPRESSION = "urlExpression" PARAM_REPOSITORY = "repository" PARAM_BRANCH = "branch" PARAM_GITHUB_EVENT = "github-event" PARAM_STACK = "stack" /* Results */ RESULT_FAILED = "failed" RESULT_COMPLETED = "completed" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StatusManager ¶
type StatusManager struct {
// contains filtered or unexported fields
}
func NewStatusManager ¶
func NewStatusManager() *StatusManager
func (*StatusManager) AddEventSummary ¶
func (sm *StatusManager) AddEventSummary(summary *eventsv1alpha1.EventStatusSummary)
Add an EventSummary.
input:
summary: the summary to add. The caller no longer owns the summary after calling.
func (*StatusManager) GetStatusSummary ¶
func (sm *StatusManager) GetStatusSummary() []eventsv1alpha1.EventStatusSummary
func (*StatusManager) SendStatus ¶
func (sm *StatusManager) SendStatus(updater *Updater)
Send status to Status Updater if there is a status change
type StatusParameters ¶
type StatusParameters struct {
// contains filtered or unexported fields
}
func NewStatusParameters ¶
func NewStatusParameters() *StatusParameters
func (*StatusParameters) AddParameter ¶
func (sp *StatusParameters) AddParameter(name string, value string)
func (*StatusParameters) GetStatusParameters ¶
func (sp *StatusParameters) GetStatusParameters() []eventsv1alpha1.EventStatusParameter
type Updater ¶
type Updater struct {
// contains filtered or unexported fields
}
The Status Updater is used to update status in a resource efficient manner.
Status changes are not updated immediately. Instead, they are accumulated for up to a configurable time. In addition, there is no polling thread to check for status updates.
func NewSatusUpdater ¶
func (*Updater) SendUpdate ¶
func (updater *Updater) SendUpdate(summary []eventsv1alpha1.EventStatusSummary)
Send Update