step

package
v0.0.0-...-d13c728 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CloudEventSource = "github.com/tom24d/step-observe-controller"
)

Variables

This section is empty.

Functions

func GetEventTime

func GetEventTime(state *v1beta1.StepState, eventType TektonPluginEventType) (*time.Time, error)

func GetStepStatuses

func GetStepStatuses(taskrun *v1beta1.TaskRun) []v1beta1.StepState

func GetSteps

func GetSteps(taskrun *v1beta1.TaskRun) []v1beta1.Step

Types

type EmissionStatus

type EmissionStatus struct {
	Name    string                  `json:"name"`
	Emitted []TektonPluginEventType `json:"emitted"`
}

func (*EmissionStatus) IsMarked

func (r *EmissionStatus) IsMarked(eventType TektonPluginEventType) bool

func (*EmissionStatus) MarkEvent

func (r *EmissionStatus) MarkEvent(eventType TektonPluginEventType) error

type EmissionStatuses

type EmissionStatuses struct {
	Statuses []EmissionStatus `json:"statuses"`
}

func (*EmissionStatuses) GetStatus

func (s *EmissionStatuses) GetStatus(stepName string) (*EmissionStatus, error)

func (*EmissionStatuses) IsMarked

func (s *EmissionStatuses) IsMarked(stepName string, eventType TektonPluginEventType) bool

type TektonPluginEventType

type TektonPluginEventType string
const (
	CloudEventTypeStepStarted   TektonPluginEventType = "tom24d.event.plugin.step.started.v1"
	CloudEventTypeStepFailed    TektonPluginEventType = "tom24d.event.plugin.step.failed.v1"
	CloudEventTypeStepSucceeded TektonPluginEventType = "tom24d.event.plugin.step.succeeded.v1"
	CloudEventTypeStepSkipped   TektonPluginEventType = "tom24d.event.plugin.step.skipped.v1"
)

func (TektonPluginEventType) String

func (c TektonPluginEventType) String() string

type TektonStepCloudEvent

type TektonStepCloudEvent struct {
	PodRef    *corev1.ObjectReference `json:"podRef,omitempty"`
	Log       string                  `json:"log,omitempty"` // TODO evaluate the security risk.
	Step      *v1beta1.Step           `json:"step,omitempty"`
	StepState *v1beta1.StepState      `json:"stepState,omitempty"`
}

func (*TektonStepCloudEvent) Emit

func (d *TektonStepCloudEvent) Emit(ctx context.Context, eventType TektonPluginEventType, id string)

Jump to

Keyboard shortcuts

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