event

package
v0.0.0-...-1e4a09a Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConsumerNamespace            = "ptp-event-framework-test"
	ProducerNamespace            = "openshift-ptp"
	ConsumerPodName              = "consumer"
	ConsumerSidecarContainerName = "sidecar"
	ConsumerSaName               = "consumer-sa"
	ConsumerServiceName          = "consumer-events-subscription-service"
	TestSidecarSuccessLogString  = "rest service returned healthy status"
	ConsumerContainerName        = "consumer"
	CustomerCloudEventProxyPort  = 8089
	ProviderCloudEventProxyPort  = 9085

	ApiBaseV1 = "127.0.0.1:9085/api/ocloudNotifications/v1/"
	ApiBaseV2 = "127.0.0.1:9043/api/ocloudNotifications/v2"
)
View Source
const DeleteBackground = "deleteBackground"
View Source
const DeleteForeground = "deleteForeground"

Variables

View Source
var (
	PubSub *chanpubsub.Pubsub
)

Functions

func ConfigureRoles

func ConfigureRoles() error

func CreateConsumerApp

func CreateConsumerApp(nodeNameFull string) (err error)

create consumer app without sidecar

func CreateConsumerAppWithSidecar

func CreateConsumerAppWithSidecar(nodeNameFull string) (err error)

func CreateConsumerService

func CreateConsumerService() error

func CreateConsumerServiceAccount

func CreateConsumerServiceAccount() error

func DeleteConsumerNamespace

func DeleteConsumerNamespace() error

delete consumer sidecar pod and associated service

func DeleteService

func DeleteService(namespace, name string)

delete Service

func Enable

func Enable() bool

enables event if ptp event is required

func GetCloudEventProxyImageFromPod

func GetCloudEventProxyImageFromPod() (image string, err error)

gets the cloud-event-proxy sidecar image from the ptp-operator pods

func GetDefaultApiVersion

func GetDefaultApiVersion() string

returns 2.0 if EVENT_API_VERSION is invalid or not set

func InitPubSub

func InitPubSub()

func IsV1EventRegressionNeeded

func IsV1EventRegressionNeeded() bool

IsV1RegressionNeeded returns true when we need to test both v1 and v2 event API

func MonitorPodLogsRegex

func MonitorPodLogsRegex() (term chan bool, err error)

returns last Regex match in the logs for a given pod

func PushInitialEvent

func PushInitialEvent(eventType string, timeout time.Duration) (err error)

returns last Regex match in the logs for a given pod

Types

This section is empty.

Jump to

Keyboard shortcuts

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