events

package
v0.0.0-...-207676e Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AgentScope     = os.Getenv("AGENT_SCOPE")
	AgentNamespace = os.Getenv("AGENT_NAMESPACE")
	ClusterID      = os.Getenv("CLUSTER_ID")
)

Functions

func ChaosEventWatcher

func ChaosEventWatcher(stopCh chan struct{}, stream chan types.WorkflowEvent, clusterData map[string]string)

ChaosEventWatcher initializes the Litmus ChaosEngine event watcher

func CheckChaosData

func CheckChaosData(nodeStatus v1alpha13.NodeStatus, workflowNS string, chaosClient *v1alpha12.LitmuschaosV1alpha1Client) (string, *types.ChaosData, error)

CheckChaosData util function, checks if event is a chaos-exp event, if so - extract the chaos data

func GenerateWorkflowPayload

func GenerateWorkflowPayload(cid, accessKey, version, completed string, wfEvent types.WorkflowEvent) ([]byte, error)

GenerateWorkflowPayload generate graphql mutation payload for events event

func GetWorkflowObj

func GetWorkflowObj(uid string) (*v1alpha1.Workflow, error)

func SendWorkflowUpdates

func SendWorkflowUpdates(clusterData map[string]string, event types.WorkflowEvent) (string, error)

SendWorkflowUpdates generates graphql mutation to send events updates to graphql server

func StrConvTime

func StrConvTime(time int64) string

StrConvTime converts unix timestamp to string

func URLDecodeBase64

func URLDecodeBase64(encoded string) string

func WorkflowEventHandler

func WorkflowEventHandler(workflowObj *v1alpha1.Workflow, eventType string, startTime int64) (types.WorkflowEvent, error)

WorkflowEventHandler responsible for extracting the required data from the event and streaming

func WorkflowEventWatcher

func WorkflowEventWatcher(stopCh chan struct{}, stream chan types.WorkflowEvent, clusterData map[string]string)

WorkflowEventWatcher initializes the Argo Workflow event watcher

func WorkflowUpdates

func WorkflowUpdates(clusterData map[string]string, event chan types.WorkflowEvent)

Types

This section is empty.

Jump to

Keyboard shortcuts

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