event

package
v0.0.0-...-ab50414 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const TypePrefix = "io.argoproj.argocd-agent.event"

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

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

func FromWire

func FromWire(pev *pb.CloudEvent) (*Event, error)

FromWire validates an event from the wire in protobuf format, converts it into an Event object and returns it. If the event on the wire is invalid, or could not be converted for another reason, FromWire returns an error.

func (Event) AppProject

func (ev Event) AppProject() (*v1alpha1.AppProject, error)

func (Event) Application

func (ev Event) Application() (*v1alpha1.Application, error)

func (Event) Target

func (ev Event) Target() EventTarget

func (Event) Type

func (ev Event) Type() EventType

type EventSource

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

func NewEventSource

func NewEventSource(source string) *EventSource

func (EventSource) NewApplicationEvent

func (evs EventSource) NewApplicationEvent(evType EventType, app *v1alpha1.Application) *cloudevents.Event

type EventTarget

type EventTarget string
const (
	TargetUnknown     EventTarget = "unknown"
	TargetApplication EventTarget = "application"
	TargetAppProject  EventTarget = "appproject"
)

func Target

func Target(raw *cloudevents.Event) EventTarget

func (EventTarget) String

func (t EventTarget) String() string

type EventType

type EventType string
const (
	Ping            EventType = TypePrefix + ".ping"
	Pong            EventType = TypePrefix + ".pong"
	Create          EventType = TypePrefix + ".create"
	Delete          EventType = TypePrefix + ".delete"
	Update          EventType = TypePrefix + ".update"
	SpecUpdate      EventType = TypePrefix + ".spec-update"
	StatusUpdate    EventType = TypePrefix + ".status-update"
	OperationUpdate EventType = TypePrefix + ".operation-update"
)

func (EventType) String

func (t EventType) String() string

Jump to

Keyboard shortcuts

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