framework

package
v0.0.0-...-28b2d3d Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: Apache-2.0 Imports: 77 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// OpenShiftCatalogNamespace is the namespace for clusterwide installations on Openshift
	OpenShiftCatalogNamespace = "openshift-marketplace"
	// KubernetesCatalogNamespace is the namespace for clusterwide installations on Kubernetes
	KubernetesCatalogNamespace = "olm"
)

Variables

View Source
var (

	// KogitoOperatorMongoDBDependency is the MongoDB identifier for installation
	KogitoOperatorMongoDBDependency = infrastructure.MongoDBKind
)

Functions

func AddLineToFile

func AddLineToFile(line, filename string) error

AddLineToFile adds the given line to the given file

func AppendImageDefaultValues

func AppendImageDefaultValues(image *api.Image)

AppendImageDefaultValues appends the image default values if none existing

func BumpEvents

func BumpEvents(namespace string) error

BumpEvents will bump all events into events.log file

func CheckCliBinaryExist

func CheckCliBinaryExist() (bool, error)

CheckCliBinaryExist checks if the CLI binary does exist

func CheckPodHasImagePullSecretWithPrefix

func CheckPodHasImagePullSecretWithPrefix(pod *corev1.Pod, imagePullSecretPrefix string) bool

CheckPodHasImagePullSecretWithPrefix checks that a pod has an image pull secret starting with the given prefix

func CheckPodsAreReady

func CheckPodsAreReady(pods *corev1.PodList) bool

CheckPodsAreReady returns true if all pods are ready

func CheckPodsByDeploymentConfigInError

func CheckPodsByDeploymentConfigInError(namespace string, dcName string) func() (bool, error)

CheckPodsByDeploymentConfigInError returns a function that checks the pods error state.

func CheckPodsByDeploymentInError

func CheckPodsByDeploymentInError(namespace string, dName string) func() (bool, error)

CheckPodsByDeploymentInError returns a function that checks the pods error state.

func CheckPodsInNamespaceInError

func CheckPodsInNamespaceInError(namespace string) func() (bool, error)

CheckPodsInNamespaceInError returns a function that checks the pods error state.

func CheckPodsWithLabelInError

func CheckPodsWithLabelInError(namespace, labelName, labelValue string) func() (bool, error)

CheckPodsWithLabelInError returns a function that checks the pods error state.

func CheckPodsWithLabelsInError

func CheckPodsWithLabelsInError(namespace string, labels map[string]string) func() (bool, error)

CheckPodsWithLabelsInError returns a function that checks the pods error state.

func CheckSetup

func CheckSetup() error

CheckSetup verifies the configuration is correct

func ClearNamespaceHistory

func ClearNamespaceHistory()

ClearNamespaceHistory clears all the namespace history content.

func CompleteTask

func CompleteTask(namespace, routeURI, processName, processInstanceID, taskName, taskID, bodyFormat, bodyContent string) (err error)

CompleteTask completes task

func CompleteTaskByUser

func CompleteTaskByUser(namespace, routeURI, processName, processInstanceID, taskName, taskID, user, bodyFormat, bodyContent string) (err error)

CompleteTaskByUser completes task by user

func ConstructDefaultImageFullTag

func ConstructDefaultImageFullTag(imageName string) string

ConstructDefaultImageFullTag construct the full image tag (adding default registry and tag)

func CreateConfigMap

func CreateConfigMap(namespace, name string, data map[string]string, binaryData map[string][]byte) error

CreateConfigMap creates ConfigMap

func CreateFile

func CreateFile(folder, fileName, fileContent string) error

CreateFile Creates file in folder with supplied content

func CreateFolder

func CreateFolder(folder string) error

CreateFolder creates a folder and all its parents if not exist

func CreateInfinispanSecret

func CreateInfinispanSecret(namespace, name string, credentialsMap map[string]string) error

CreateInfinispanSecret creates a new secret for Infinispan instance

func CreateInsecureImageStream

func CreateInsecureImageStream(namespace, imageStreamName, imageTag, imageFullName string) error

CreateInsecureImageStream creates insecure ImageStream pointing to the passed image tag

func CreateKogitoOperatorCatalogSource

func CreateKogitoOperatorCatalogSource() (*olmapiv1alpha1.CatalogSource, error)

CreateKogitoOperatorCatalogSource create a Kogito operator catalog Source

func CreateMongoDBSecret

func CreateMongoDBSecret(namespace, name, password string) error

CreateMongoDBSecret creates a new secret for MongoDB instance

func CreateNamespace

func CreateNamespace(namespace string) error

CreateNamespace creates a new namespace

func CreateNamespaceIfNotExists

func CreateNamespaceIfNotExists(namespace string) (exists bool, err error)

CreateNamespaceIfNotExists creates a new namespace if not exists, returns true if namespaces already existed

func CreateNamespacedSubscriptionIfNotExist

func CreateNamespacedSubscriptionIfNotExist(namespace string, subscriptionName string, operatorName string, catalog OperatorCatalog, channel, startingCSV string) (*olmapiv1alpha1.Subscription, error)

CreateNamespacedSubscriptionIfNotExist create a namespaced subscription if not exists

func CreateObject

func CreateObject(o client.Object) error

CreateObject creates object

func CreateOperatorGroupIfNotExists

func CreateOperatorGroupIfNotExists(namespace, operatorGroupName string) (*olmapiv1.OperatorGroup, error)

CreateOperatorGroupIfNotExists creates an operator group if no exist

func CreatePostgresqlInstance

func CreatePostgresqlInstance(namespace, name string, nbPods int, username, password, databaseName string) error

CreatePostgresqlInstance creates a new Postgresql instance

func CreateSecret

func CreateSecret(namespace, name string, secretContent map[string]string) error

CreateSecret creates a new secret

func CreateServiceAccount

func CreateServiceAccount(namespace, name string) error

CreateServiceAccount creates ServiceAccount

func CreateTemporaryFile

func CreateTemporaryFile(filePattern, fileContent string) (string, error)

CreateTemporaryFile Creates file in default directory for temporary files with supplied content

func CreateTemporaryFolder

func CreateTemporaryFolder(folderPrefix string) (string, error)

CreateTemporaryFolder creates a folder in default directory for temporary files

func CreateTrigger

func CreateTrigger(namespace, name, brokerName, serviceName string) error

CreateTrigger creates Knative Trigger

func DeleteFile

func DeleteFile(folder, fileName string) error

DeleteFile deletes a file

func DeleteFolder

func DeleteFolder(folder string) error

DeleteFolder deletes a folder and all its subfolders

func DeleteKogitoOperatorCatalogSource

func DeleteKogitoOperatorCatalogSource() error

DeleteKogitoOperatorCatalogSource delete a Kogito operator catalog Source

func DeleteNamespace

func DeleteNamespace(namespace string) error

DeleteNamespace deletes a namespace

func DeleteObject

func DeleteObject(o client.Object) error

DeleteObject deletes object

func DeleteSubscription

func DeleteSubscription(subscription *olmapiv1alpha1.Subscription) error

DeleteSubscription deletes Subscription and related objects

func DeployBroker

func DeployBroker(namespace, name string) error

DeployBroker deploys Knative Broker

func DeployGrafanaInstance

func DeployGrafanaInstance(namespace, labelName, labelValue string) error

DeployGrafanaInstance deploys an instance of Grafana watching for label with specific name and value

func DeployInfinispanInstance

func DeployInfinispanInstance(namespace string, infinispan *infinispan.Infinispan) error

DeployInfinispanInstance deploys an instance of Infinispan

func DeployKafkaInstance

func DeployKafkaInstance(namespace string, kafka *v1beta2.Kafka) error

DeployKafkaInstance deploys an instance of Kafka

func DeployKafkaTopic

func DeployKafkaTopic(namespace, kafkaTopicName, kafkaInstanceName string) error

DeployKafkaTopic deploys a Kafka topic

func DeployKeycloakClient

func DeployKeycloakClient(namespace, clientName string) error

DeployKeycloakClient deploys a client configuration of Keycloak

func DeployKeycloakInstance

func DeployKeycloakInstance(namespace string) error

DeployKeycloakInstance deploys an instance of Keycloak

func DeployKeycloakRealm

func DeployKeycloakRealm(namespace, realmName string) error

DeployKeycloakRealm deploys a realm configuration of Keycloak

func DeployKeycloakUser

func DeployKeycloakUser(namespace, userName, password string) error

DeployKeycloakUser deploys a realm configuration of Keycloak

func DeployKogitoBuild

func DeployKogitoBuild(namespace string, installerType InstallerType, buildHolder *bddtypes.KogitoBuildHolder) error

DeployKogitoBuild deploy a KogitoBuild

func DeployMongoDBInstance

func DeployMongoDBInstance(namespace string, instance *mongodb.MongoDBCommunity) error

DeployMongoDBInstance deploys an instance of Mongo DB

func DeployPrometheusInstance

func DeployPrometheusInstance(namespace, labelName, labelValue string) error

DeployPrometheusInstance deploys an instance of Prometheus

func DeployRuntimeService

func DeployRuntimeService(namespace string, installerType InstallerType, serviceHolder *bddtypes.KogitoServiceHolder) error

DeployRuntimeService deploy a Kogito service

func DeployService

func DeployService(serviceHolder *bddtypes.KogitoServiceHolder, installerType InstallerType) error

DeployService deploy the Kogito Service component

func DoesHTTPResponseContain

func DoesHTTPResponseContain(namespace string, requestInfo HTTPRequestInfo, responseContent string) (bool, error)

DoesHTTPResponseContain checks whether the response of an http request contains a certain string

func DoesNotHTTPResponseContain

func DoesNotHTTPResponseContain(namespace string, requestInfo HTTPRequestInfo, responseContent string) (bool, error)

DoesNotHTTPResponseContain checks whether the response of an http request does not contain a certain string

func ExecuteCliCommand

func ExecuteCliCommand(namespace string, args ...string) (string, error)

ExecuteCliCommand executes a kogito cli command for a given namespace

func ExecuteCliCommandInNamespace

func ExecuteCliCommandInNamespace(namespace string, args ...string) (string, error)

ExecuteCliCommandInNamespace executes a kogito cli command in a specific namespace

func ExecuteGraphQLRequestWithLogging

func ExecuteGraphQLRequestWithLogging(namespace, uri, path, query, bearerToken string, response interface{}) error

ExecuteGraphQLRequestWithLogging executes a GraphQL query

func ExecuteGraphQLRequestWithLoggingOption

func ExecuteGraphQLRequestWithLoggingOption(namespace, uri, path, query, bearerToken string, response interface{}, logResponse bool) error

ExecuteGraphQLRequestWithLoggingOption executes a GraphQL query with possibility of logging each request

func ExecuteHTTPRequest

func ExecuteHTTPRequest(namespace string, requestInfo HTTPRequestInfo) (*http.Response, error)

ExecuteHTTPRequest executes an HTTP request

func ExecuteHTTPRequestC

func ExecuteHTTPRequestC(client *http.Client, namespace string, requestInfo HTTPRequestInfo) (*http.Response, error)

ExecuteHTTPRequestC executes an HTTP request using a given client

func ExecuteHTTPRequestWithStringResponse

func ExecuteHTTPRequestWithStringResponse(namespace string, requestInfo HTTPRequestInfo) (string, error)

ExecuteHTTPRequestWithStringResponse executes an HTTP request and returns a string response in case there is no error

func ExecuteHTTPRequestWithUnmarshalledResponse

func ExecuteHTTPRequestWithUnmarshalledResponse(namespace string, requestInfo HTTPRequestInfo, response interface{}) error

ExecuteHTTPRequestWithUnmarshalledResponse executes an HTTP request and returns response unmarshalled into specific structure in case there is no error

func ExposeServiceOnKubernetes

func ExposeServiceOnKubernetes(namespace, serviceName string) error

ExposeServiceOnKubernetes adds ingress CR to expose a service

func FlushAllRemainingLoggers

func FlushAllRemainingLoggers()

FlushAllRemainingLoggers flushes all remaining loggers

func FlushLogger

func FlushLogger(namespace string) error

FlushLogger flushes a specific logger

func GenerateNamespaceName

func GenerateNamespaceName(prefix string) string

GenerateNamespaceName generates a namespace name, taking configuration into account (local or not)

func GetAccessTokenFromKeycloak

func GetAccessTokenFromKeycloak(namespace, server, userName, password, realm, clientName string) (string, error)

GetAccessTokenFromKeycloak gets the access token for a user

func GetActiveReplicaSetByDeployment

func GetActiveReplicaSetByDeployment(namespace string, dName string) (*apps.ReplicaSet, error)

GetActiveReplicaSetByDeployment retrieves active ReplicaSet belonging to a Deployment

func GetClusterOperatorNamespace

func GetClusterOperatorNamespace() string

GetClusterOperatorNamespace returns namespace used to deploy cluster wide operators

func GetClusterRole

func GetClusterRole(name string) (*rbac.ClusterRole, error)

GetClusterRole return ClusterRole based on name

func GetClusterRoleBinding

func GetClusterRoleBinding(name string) (*rbac.ClusterRoleBinding, error)

GetClusterRoleBinding return ClusterRoleBinding based on name

func GetClusterWideSubscription

func GetClusterWideSubscription(operatorPackageName string, catalog OperatorCatalog) (*olmapiv1alpha1.Subscription, error)

GetClusterWideSubscription returns cluster wide subscription

func GetContainerLog

func GetContainerLog(namespace, podName, containerName string) (string, error)

GetContainerLog exported for Zookeeper workaround, can be unexported once https://github.com/strimzi/strimzi-kafka-operator/issues/3092 is fixed

func GetDeployment

func GetDeployment(namespace, deploymentName string) (*apps.Deployment, error)

GetDeployment retrieves deployment with specified name in namespace

func GetDeploymentConfig

func GetDeploymentConfig(namespace, dcName string) (*ocapps.DeploymentConfig, error)

GetDeploymentConfig retrieves a deployment config

func GetDeploymentWaiting

func GetDeploymentWaiting(namespace, deploymentName string, timeoutInMin int) (deployment *apps.Deployment, err error)

GetDeploymentWaiting waits for a deployment to be available, then returns it

func GetImageStreams

func GetImageStreams(namespace string) (*imagev1.ImageStreamList, error)

GetImageStreams returns ImageStreams in the namespace

func GetInfinispanStub

func GetInfinispanStub(namespace, name, secretName string) *infinispan.Infinispan

GetInfinispanStub returns the preconfigured Infinispan stub with set namespace, name and secretName

func GetIngressURI

func GetIngressURI(namespace, serviceName string) (string, error)

GetIngressURI returns the ingress URI

func GetKafkaInstance

func GetKafkaInstance(namespace, kafkaInstanceName string) (*v1beta2.Kafka, error)

GetKafkaInstance retrieves the Kafka instance

func GetKafkaPods

func GetKafkaPods(namespace, kafkaInstanceName string) (*v1.PodList, error)

GetKafkaPods return the Kafka pods (suffixed with `-kafka`)

func GetKogitoBuild

func GetKogitoBuild(namespace, buildName string) (api.KogitoBuildInterface, error)

GetKogitoBuild returns the KogitoBuild type

func GetKogitoBuildRuntimeImage

func GetKogitoBuildRuntimeImage(native bool) string

GetKogitoBuildRuntimeImage returns the Runtime image tag

func GetKogitoBuildS2IImage

func GetKogitoBuildS2IImage() string

GetKogitoBuildS2IImage returns the S2I builder image tag

func GetKogitoBuildStub

func GetKogitoBuildStub(namespace, runtimeType, name string) api.KogitoBuildInterface

GetKogitoBuildStub Get basic KogitoBuild stub with all needed fields initialized

func GetKogitoDataIndexResourceStub

func GetKogitoDataIndexResourceStub(namespace string, replicas int) *v1beta1.KogitoSupportingService

GetKogitoDataIndexResourceStub Get basic KogitoDataIndex stub with all needed fields initialized

func GetKogitoExplainabilityResourceStub

func GetKogitoExplainabilityResourceStub(namespace string, replicas int) *v1beta1.KogitoSupportingService

GetKogitoExplainabilityResourceStub Get basic KogitoExplainability stub with all needed fields initialized

func GetKogitoInfraResource

func GetKogitoInfraResource(namespace, name string) (api.KogitoInfraInterface, error)

GetKogitoInfraResource retrieves the KogitoInfra resource

func GetKogitoInfraResourceStub

func GetKogitoInfraResourceStub(namespace, name, targetResourceType, targetResourceName string) (api.KogitoInfraInterface, error)

GetKogitoInfraResourceStub Get basic KogitoInfra stub with all needed fields initialized

func GetKogitoJobsService

func GetKogitoJobsService(namespace string) (*v1beta1.KogitoSupportingService, error)

GetKogitoJobsService retrieves the running jobs service

func GetKogitoJobsServiceResourceStub

func GetKogitoJobsServiceResourceStub(namespace string, replicas int) *v1beta1.KogitoSupportingService

GetKogitoJobsServiceResourceStub Get basic KogitoJobsService stub with all needed fields initialized

func GetKogitoManagementConsoleResourceStub

func GetKogitoManagementConsoleResourceStub(namespace string, replicas int) *v1beta1.KogitoSupportingService

GetKogitoManagementConsoleResourceStub Get basic KogitoManagementConsole stub with all needed fields initialized

func GetKogitoRuntimeStub

func GetKogitoRuntimeStub(namespace, runtimeType, name, imageTag string) api.KogitoRuntimeInterface

GetKogitoRuntimeStub Get basic KogitoRuntime stub with all needed fields initialized

func GetKogitoTaskConsoleResourceStub

func GetKogitoTaskConsoleResourceStub(namespace string, replicas int) *v1beta1.KogitoSupportingService

GetKogitoTaskConsoleResourceStub Get basic KogitoTaskConsole stub with all needed fields initialized

func GetKogitoTrustyResourceStub

func GetKogitoTrustyResourceStub(namespace string, replicas int) *v1beta1.KogitoSupportingService

GetKogitoTrustyResourceStub Get basic KogitoTrusty stub with all needed fields initialized

func GetKogitoTrustyUIResourceStub

func GetKogitoTrustyUIResourceStub(namespace string, replicas int) *v1beta1.KogitoSupportingService

GetKogitoTrustyUIResourceStub Get basic KogitoTrustyUI stub with all needed fields initialized

func GetKubernetesDurationFromTimeInMin

func GetKubernetesDurationFromTimeInMin(timeoutInMin int) time.Duration

GetKubernetesDurationFromTimeInMin will calculate the time depending on the configured cluster load factor

func GetLogFolder

func GetLogFolder() string

GetLogFolder returns the main log folder

func GetMessagesOnTopic

func GetMessagesOnTopic(namespace, kafkaInstanceName, topic string) ([]string, error)

GetMessagesOnTopic gets all messages for a topic

func GetMongoDBSecret

func GetMongoDBSecret(namespace, secretName, password string) *corev1.Secret

GetMongoDBSecret returns a MongoDB secret structure

func GetMongoDBStub

func GetMongoDBStub(openshift bool, namespace, name string, users []MongoDBUserCred) *mongodb.MongoDBCommunity

GetMongoDBStub returns the preconfigured MongoDB stub with set namespace, name and secretName

func GetNamespacedLogFolder

func GetNamespacedLogFolder(namespace string) string

GetNamespacedLogFolder retrieves the log folder for a specific namespace

func GetNamespacesInHistory

func GetNamespacesInHistory() []string

GetNamespacesInHistory retrieves all the namespaces in the history.

func GetObjectWithKey

func GetObjectWithKey(key types.NamespacedName, o client.Object) (exists bool, err error)

GetObjectWithKey returns object matching provided key

func GetObjectsInNamespace

func GetObjectsInNamespace(namespace string, list client.ObjectList) error

GetObjectsInNamespace returns list of objects in specific namespace based on type

func GetOpenshiftDurationFromTimeInMin

func GetOpenshiftDurationFromTimeInMin(timeoutInMin int) time.Duration

GetOpenshiftDurationFromTimeInMin will calculate the time depending on the configured cluster load factor

func GetPods

func GetPods(namespace string) (*corev1.PodList, error)

GetPods retrieves all pods in namespace

func GetPodsByDeployment

func GetPodsByDeployment(namespace string, dName string) (pods []corev1.Pod, err error)

GetPodsByDeployment retrieves pods belonging to a Deployment

func GetPodsByDeploymentConfig

func GetPodsByDeploymentConfig(namespace string, dcName string) (*corev1.PodList, error)

GetPodsByDeploymentConfig retrieves pods with a deploymentconfig label set to <dcName>

func GetPodsWithLabels

func GetPodsWithLabels(namespace string, labels map[string]string) (*corev1.PodList, error)

GetPodsWithLabels retrieves pods based on label name and value

func GetProcessInstances

func GetProcessInstances(namespace, routeURI, processName string) (foundProcessInstances []map[string]interface{}, err error)

GetProcessInstances retrieves process instance of process name

func GetRoute

func GetRoute(namespace, routeName string) (*routev1.Route, error)

GetRoute retrieves a route

func GetRouteURI

func GetRouteURI(namespace, serviceName string) (string, error)

GetRouteURI retrieves a route URI

func GetRunningInfinispanPodLabels

func GetRunningInfinispanPodLabels(crName string) map[string]string

GetRunningInfinispanPodLabels returns the labels set to infinispan pod instances

func GetService

func GetService(namespace, name string) (*corev1.Service, error)

GetService return Service based on namespace and name

func GetStatefulSet

func GetStatefulSet(namespace, name string) (*apps.StatefulSet, error)

GetStatefulSet returns the given StatefulSet

func GetSubscription

func GetSubscription(namespace, operatorPackageName string, catalog OperatorCatalog) (*olmapiv1alpha1.Subscription, error)

GetSubscription returns subscription

func InitKubeClient

func InitKubeClient(scheme *runtime.Scheme) error

InitKubeClient initializes the Kubernetes Client

func InstallClusterWideOperator

func InstallClusterWideOperator(subscriptionName, channel, startingCSV string, catalog OperatorCatalog) error

InstallClusterWideOperator installs an operator for all namespaces via subscrition

func InstallKogitoDataIndexService

func InstallKogitoDataIndexService(namespace string, installerType InstallerType, dataIndex *bddtypes.KogitoServiceHolder) error

InstallKogitoDataIndexService install the Kogito Data Index service

func InstallKogitoExplainabilityService

func InstallKogitoExplainabilityService(namespace string, installerType InstallerType, explainability *bddtypes.KogitoServiceHolder) error

InstallKogitoExplainabilityService install the Kogito Explainability service

func InstallKogitoInfraComponent

func InstallKogitoInfraComponent(namespace string, installerType InstallerType, infra api.KogitoInfraInterface) error

InstallKogitoInfraComponent installs the desired component with the given installer type

func InstallKogitoJobsService

func InstallKogitoJobsService(installerType InstallerType, jobsService *bddtypes.KogitoServiceHolder) error

InstallKogitoJobsService install the Kogito Jobs Service component

func InstallKogitoManagementConsole

func InstallKogitoManagementConsole(installerType InstallerType, managementConsole *bddtypes.KogitoServiceHolder) error

InstallKogitoManagementConsole install the Kogito Management Console component

func InstallKogitoTaskConsole

func InstallKogitoTaskConsole(installerType InstallerType, taskConsole *bddtypes.KogitoServiceHolder) error

InstallKogitoTaskConsole install the Kogito Task Console component

func InstallKogitoTrustyService

func InstallKogitoTrustyService(namespace string, installerType InstallerType, trusty *bddtypes.KogitoServiceHolder) error

InstallKogitoTrustyService install the Kogito Trusty service

func InstallKogitoTrustyUI

func InstallKogitoTrustyUI(installerType InstallerType, trustyUI *bddtypes.KogitoServiceHolder) error

InstallKogitoTrustyUI install the Kogito Management Console component

func InstallOperator

func InstallOperator(namespace, subscriptionName, channel, startingCSV string, catalog OperatorCatalog) error

InstallOperator installs an operator via subscrition

func InstallService

func InstallService(serviceHolder *bddtypes.KogitoServiceHolder, installerType InstallerType, cliDeploymentName string) error

InstallService install the Kogito Service component

func IsConfigMapExist

func IsConfigMapExist(key types.NamespacedName) (bool, error)

IsConfigMapExist returns true if ConfigMap exists

func IsCrdAvailable

func IsCrdAvailable(crdName string) (bool, error)

IsCrdAvailable returns whether the crd is available on cluster

func IsGraphQLRequestSuccessful

func IsGraphQLRequestSuccessful(namespace, uri, path, query, bearerToken string, response interface{}) (bool, error)

IsGraphQLRequestSuccessful makes and checks whether a GraphQL query is successful

func IsHTTPRequestFailed

func IsHTTPRequestFailed(namespace string, requestInfo HTTPRequestInfo) (bool, error)

IsHTTPRequestFailed makes and checks whether an http request fails

func IsHTTPRequestForbidden

func IsHTTPRequestForbidden(namespace string, requestInfo HTTPRequestInfo) (bool, error)

IsHTTPRequestForbidden makes and checks whether an http request is unauthorized

func IsHTTPRequestSuccessful

func IsHTTPRequestSuccessful(namespace string, requestInfo HTTPRequestInfo) (bool, error)

IsHTTPRequestSuccessful makes and checks whether an http request is successful

func IsHTTPResponseArraySize

func IsHTTPResponseArraySize(namespace string, requestInfo HTTPRequestInfo, arraySize int) (bool, error)

IsHTTPResponseArraySize makes and checks whether an http request returns an array of a specific size

func IsInfinispanAvailable

func IsInfinispanAvailable(namespace string) bool

IsInfinispanAvailable checks if Infinispan CRD is available in the cluster

func IsKogitoOperatorRunning

func IsKogitoOperatorRunning(namespace string) (bool, error)

IsKogitoOperatorRunning returns whether Kogito operator is running

func IsMongoDBAvailable

func IsMongoDBAvailable(namespace string) bool

IsMongoDBAvailable checks if MongoDB CRD is available in the cluster

func IsNamespace

func IsNamespace(namespace string) (bool, error)

IsNamespace checks whether a namespace exists

func IsOpenshift

func IsOpenshift() bool

IsOpenshift returns whether the cluster is running on Openshift

func IsOperatorRunning

func IsOperatorRunning(namespace, operatorPackageName string, catalog OperatorCatalog) (bool, error)

IsOperatorRunning checks whether an operator is running

func IsPodRunning

func IsPodRunning(pod *corev1.Pod) bool

IsPodRunning returns true if pod is running

func IsPodStatusConditionReady

func IsPodStatusConditionReady(pod *corev1.Pod) bool

IsPodStatusConditionReady returns true if all pod's containers are ready (really running)

func KogitoOperatorExists

func KogitoOperatorExists(namespace string) (bool, error)

KogitoOperatorExists returns whether Kogito operator exists and is running. If it is existing but not running, it returns true and an error

func LoadResource

func LoadResource(namespace, uri string, resourceRef client.Object, beforeCreate func(object interface{})) error

LoadResource loads the resource from provided URI and creates it in the cluster

func LogKubernetesObjects

func LogKubernetesObjects(namespace string, runtimeObjects ...client.ObjectList) error

LogKubernetesObjects log Kubernetes objects for test analysis

func NewImageOrDefault

func NewImageOrDefault(fullImage string, defaultImageName string) string

NewImageOrDefault Returns Image parsed from provided image tag or created from configuration options

func NewKogitoServiceSpec

func NewKogitoServiceSpec(replicas int32, fullImage string, defaultImageName string) v1beta1.KogitoServiceSpec

NewKogitoServiceSpec creates a new Kogito Service Spec object.

func NewObjectMetadata

func NewObjectMetadata(namespace string, name string) metav1.ObjectMeta

NewObjectMetadata creates a new Object Metadata object.

func OnKogitoServiceDeployed

func OnKogitoServiceDeployed(namespace string, service api.KogitoService) error

OnKogitoServiceDeployed is called when a service deployed.

func OnNamespacePostCreated

func OnNamespacePostCreated(namespace string)

OnNamespacePostCreated hook when a namespace has been created

func OnNamespacePostDeleted

func OnNamespacePostDeleted(namespace string)

OnNamespacePostDeleted hook when a namespace has been deleted

func OperateOnNamespaceIfExists

func OperateOnNamespaceIfExists(namespace string, operate func(namespace string) error) error

OperateOnNamespaceIfExists do some operations on the namespace if that one exists

func OperatorExistsUsingSubscription

func OperatorExistsUsingSubscription(namespace, operatorPackageName, operatorSource string) (bool, error)

OperatorExistsUsingSubscription returns whether operator exists and is running. If it is existing but not running, it returns true and an error For this check informations from subscription are used.

func PrintDataMap

func PrintDataMap(keys []string, dataMaps []map[string]string, writer io.StringWriter) error

PrintDataMap prints a formatted dataMap using the given writer

func ReadFromURI

func ReadFromURI(uri string) (string, error)

ReadFromURI reads string content from given URI (URL or Filesystem)

func RemoveKogitoOperatorDeployment

func RemoveKogitoOperatorDeployment(namespace string) error

RemoveKogitoOperatorDeployment remove the Kogito operator deployment in the given namespace

func RenameLogFolder

func RenameLogFolder(namespace string, newLogFolderNames ...string) error

RenameLogFolder changes the name of the log folder for a specific namespace

func ReportPerformanceMetric

func ReportPerformanceMetric(metric, value, unit string)

ReportPerformanceMetric reports a new metric with its value and unit to a results file. If the file does not exist, it will be created. It depends on the existence of the log folder which is created by the framework before the tests are run.

func RetrieveKeycloakEndpointURI

func RetrieveKeycloakEndpointURI(namespace string) (string, error)

RetrieveKeycloakEndpointURI retrieves the keycloak endpoint

func ScaleKafkaInstanceDown

func ScaleKafkaInstanceDown(namespace, kafkaInstanceName string) error

ScaleKafkaInstanceDown scales a Kafka instance down by killing its pod temporarily

func SetInfinispanReplicas

func SetInfinispanReplicas(namespace, name string, nbPods int) error

SetInfinispanReplicas sets the number of replicas for an Infinispan instance

func SetKogitoJobsServiceReplicas

func SetKogitoJobsServiceReplicas(namespace string, nbPods int32) error

SetKogitoJobsServiceReplicas sets the number of replicas for the Kogito Jobs Service

func SetKogitoRuntimeReplicas

func SetKogitoRuntimeReplicas(namespace, name string, nbPods int) error

SetKogitoRuntimeReplicas sets the number of replicas for a Kogito application

func SetMongoDBReplicas

func SetMongoDBReplicas(namespace, name string, nbPods int) error

SetMongoDBReplicas sets the number of replicas for an MongoDB instance

func SetPostgresqlReplicas

func SetPostgresqlReplicas(namespace, name string, nbPods int) error

SetPostgresqlReplicas sets the number of replicas for an Postgresql instance

func SetupKogitoBuildImageStreams

func SetupKogitoBuildImageStreams(kogitoBuild api.KogitoBuildInterface)

SetupKogitoBuildImageStreams sets the correct images for the KogitoBuild

func StartPodLogCollector

func StartPodLogCollector(namespace string) error

StartPodLogCollector monitors a namespace and stores logs of all pods running in the namespace

func StartProcess

func StartProcess(namespace, routeURI, processName, bodyFormat, bodyContent string) (err error)

StartProcess starts new process instance

func StopPodLogCollector

func StopPodLogCollector(namespace string) error

StopPodLogCollector waits until all logs are stored on disc

func SubscriptionResolutionFails

func SubscriptionResolutionFails(namespace, operatorPackageName, operatorSource string) (bool, error)

SubscriptionResolutionFails returns true when Subscription fails to be resolved with error message

func ToResourceRequirements

func ToResourceRequirements(requests string, limits string) corev1.ResourceRequirements

ToResourceRequirements parses the requests and limits into corev1.ResourceRequirements

func UpdateObject

func UpdateObject(o client.Object) error

UpdateObject updates object

func WaitAndRetrieveEndpointURI

func WaitAndRetrieveEndpointURI(namespace, serviceName string) (string, error)

WaitAndRetrieveEndpointURI waits for a route and returns its URI

func WaitFor

func WaitFor(namespace, display string, timeout time.Duration, condition func() (bool, error), errorConditions ...func() (bool, error)) error

WaitFor waits for a specification condition to be met or until one error condition is met

func WaitForAllPodsByDeploymentConfigToContainTextInLog

func WaitForAllPodsByDeploymentConfigToContainTextInLog(namespace, dcName, logText string, timeoutInMin int) error

WaitForAllPodsByDeploymentConfigToContainTextInLog waits for pods of specified deployment config to contain specified text in log

func WaitForAllPodsByDeploymentToContainTextInLog

func WaitForAllPodsByDeploymentToContainTextInLog(namespace, dName, logText string, timeoutInMin int) error

WaitForAllPodsByDeploymentToContainTextInLog waits for pods of specified deployment to contain specified text in log

func WaitForAnyPodsByDeploymentToContainTextInLog

func WaitForAnyPodsByDeploymentToContainTextInLog(namespace, dName, logText string, timeoutInMin int) error

WaitForAnyPodsByDeploymentToContainTextInLog waits for pods of specified deployment to contain specified text in log

func WaitForBrokerResource

func WaitForBrokerResource(namespace, name string, timeoutInMin int) error

WaitForBrokerResource waits until the Broker ready status is True

func WaitForBuildComplete

func WaitForBuildComplete(namespace, buildName string, timeoutInMin int) error

WaitForBuildComplete waits for a build to be completed

func WaitForBuildConfigCreated

func WaitForBuildConfigCreated(namespace, buildConfigName string, timeoutInMin int) error

WaitForBuildConfigCreated waits for a build config to be created

func WaitForBuildConfigCreatedWithWebhooks

func WaitForBuildConfigCreatedWithWebhooks(namespace, buildConfigName string, expectedWebhooks []api.WebHookSecretInterface, timeoutInMin int) error

WaitForBuildConfigCreatedWithWebhooks waits for a build config to be created with webhooks

func WaitForBuildConfigToHaveResources

func WaitForBuildConfigToHaveResources(namespace, buildConfigName string, expected v1.ResourceRequirements, timeoutInMin int) error

WaitForBuildConfigToHaveResources waits for build config to have the expected resources

func WaitForClusterWideOperatorRunning

func WaitForClusterWideOperatorRunning(operatorPackageName string, catalog OperatorCatalog, timeoutInMin int) error

WaitForClusterWideOperatorRunning waits for a cluster wide operator to be running

func WaitForDeploymentConfigRunning

func WaitForDeploymentConfigRunning(namespace, dcName string, podNb int, timeoutInMin int) error

WaitForDeploymentConfigRunning waits for a deployment config to be running, with a specific number of pod

func WaitForDeploymentRunning

func WaitForDeploymentRunning(namespace, dName string, podNb int, timeoutInMin int) error

WaitForDeploymentRunning waits for a deployment to be running, with a specific number of pod

func WaitForFailedHTTPRequest

func WaitForFailedHTTPRequest(namespace string, requestInfo HTTPRequestInfo, timeoutInMin int) error

WaitForFailedHTTPRequest waits for an HTTP request to fail

func WaitForFailingGraphQLRequest

func WaitForFailingGraphQLRequest(namespace, uri, path, query string, timeoutInMin int) error

WaitForFailingGraphQLRequest waits for an GraphQL request to be fail

func WaitForFailingGraphQLRequestUsingAccessToken

func WaitForFailingGraphQLRequestUsingAccessToken(namespace, uri, path, query, accessToken string, timeoutInMin int) error

WaitForFailingGraphQLRequestUsingAccessToken waits for an GraphQL request using access token to be fail

func WaitForForbiddenHTTPRequest

func WaitForForbiddenHTTPRequest(namespace string, requestInfo HTTPRequestInfo, timeoutInMin int) error

WaitForForbiddenHTTPRequest waits for an HTTP request to be unauthorized

func WaitForInfinispanPodsToBeRunningWithConfig

func WaitForInfinispanPodsToBeRunningWithConfig(namespace string, expectedConfig infinispan.InfinispanContainerSpec, numberOfPods, timeoutInMin int) error

WaitForInfinispanPodsToBeRunningWithConfig waits for an Infinispan pod to be running with the expected configuration

func WaitForKogitoDataIndexService

func WaitForKogitoDataIndexService(namespace string, replicas int, timeoutInMin int) error

WaitForKogitoDataIndexService wait for Kogito Data Index to be deployed

func WaitForKogitoExplainabilityService

func WaitForKogitoExplainabilityService(namespace string, replicas int, timeoutInMin int) error

WaitForKogitoExplainabilityService wait for Kogito Explainability to be deployed

func WaitForKogitoInfraResource

func WaitForKogitoInfraResource(namespace, name string, timeoutInMin int, getKogitoInfra func(namespace, name string) (api.KogitoInfraInterface, error)) error

WaitForKogitoInfraResource waits for the given KogitoInfra resource to be ready

func WaitForKogitoJobsService

func WaitForKogitoJobsService(namespace string, replicas int, timeoutInMin int) error

WaitForKogitoJobsService wait for Kogito Jobs Service to be deployed

func WaitForKogitoJobsServiceLogContainsTextWithinMinutes

func WaitForKogitoJobsServiceLogContainsTextWithinMinutes(namespace, logText string, timeoutInMin int) error

WaitForKogitoJobsServiceLogContainsTextWithinMinutes waits until any pods contains a text

func WaitForKogitoManagementConsoleService

func WaitForKogitoManagementConsoleService(namespace string, replicas int, timeoutInMin int) error

WaitForKogitoManagementConsoleService wait for Kogito Management Console to be deployed

func WaitForKogitoOperatorCatalogSourceReady

func WaitForKogitoOperatorCatalogSourceReady() error

WaitForKogitoOperatorCatalogSourceReady waits for Kogito operator CatalogSource to be ready

func WaitForKogitoOperatorRunning

func WaitForKogitoOperatorRunning(namespace string) error

WaitForKogitoOperatorRunning waits for Kogito operator running

func WaitForKogitoTaskConsoleService

func WaitForKogitoTaskConsoleService(namespace string, replicas int, timeoutInMin int) error

WaitForKogitoTaskConsoleService wait for Kogito Task Console to be deployed

func WaitForKogitoTrustyService

func WaitForKogitoTrustyService(namespace string, replicas int, timeoutInMin int) error

WaitForKogitoTrustyService wait for Kogito Trusty to be deployed

func WaitForKogitoTrustyUIService

func WaitForKogitoTrustyUIService(namespace string, replicas int, timeoutInMin int) error

WaitForKogitoTrustyUIService wait for Kogito Management Console to be deployed

func WaitForMessagesOnTopic

func WaitForMessagesOnTopic(namespace, kafkaInstanceName, topic string, numberOfMsg int, timeoutInMin int) error

WaitForMessagesOnTopic waits for at least a certain number of messages are present on the given topic

func WaitForMongoDBOperatorRunning

func WaitForMongoDBOperatorRunning(namespace string) error

WaitForMongoDBOperatorRunning waits for MongoDB operator to be running

func WaitForOnKubernetes

func WaitForOnKubernetes(namespace, display string, timeoutInMin int, condition func() (bool, error)) error

WaitForOnKubernetes is a specific method

func WaitForOnOpenshift

func WaitForOnOpenshift(namespace, display string, timeoutInMin int, condition func() (bool, error), errorConditions ...func() (bool, error)) error

WaitForOnOpenshift waits for a specification condition

func WaitForOperatorGroup

func WaitForOperatorGroup(namespace, operatorGroupName string) error

WaitForOperatorGroup for an operator group to be available

func WaitForOperatorRunning

func WaitForOperatorRunning(namespace, operatorPackageName string, catalog OperatorCatalog, timeoutInMin int) error

WaitForOperatorRunning waits for an operator to be running

func WaitForPodsByDeploymentConfigToHaveResources

func WaitForPodsByDeploymentConfigToHaveResources(namespace, dcName string, expected v1.ResourceRequirements, timeoutInMin int) error

WaitForPodsByDeploymentConfigToHaveResources waits for pods to have the expected resources

func WaitForPodsByDeploymentToHaveResources

func WaitForPodsByDeploymentToHaveResources(namespace, dName string, expected v1.ResourceRequirements, timeoutInMin int) error

WaitForPodsByDeploymentToHaveResources waits for pods to have the expected resources

func WaitForPodsInNamespace

func WaitForPodsInNamespace(namespace string, numberOfPods, timeoutInMin int) error

WaitForPodsInNamespace waits for pods in specific namespace to be available and running

func WaitForPodsWithLabel

func WaitForPodsWithLabel(namespace, labelName, labelValue string, numberOfPods, timeoutInMin int) error

WaitForPodsWithLabel waits for pods with specific label to be available and running

func WaitForPodsWithLabels

func WaitForPodsWithLabels(namespace string, labels map[string]string, numberOfPods, timeoutInMin int) error

WaitForPodsWithLabels waits for pods with specific label to be available and running

func WaitForPostgresqlInstance

func WaitForPostgresqlInstance(namespace string, nbPods, timeoutInMin int) error

WaitForPostgresqlInstance waits for Postgresql instance pods to be up

func WaitForRoute

func WaitForRoute(namespace, routeName string, timeoutInMin int) error

WaitForRoute waits for a route to be available

func WaitForService

func WaitForService(namespace string, serviceName string, replicas int, timeoutInMin int) error

WaitForService waits that the service has a certain number of replicas

func WaitForSuccessfulGraphQLRequest

func WaitForSuccessfulGraphQLRequest(namespace, uri, path, query string, timeoutInMin int, response interface{}, analyzeResponse func(response interface{}) (bool, error)) error

WaitForSuccessfulGraphQLRequest waits for an GraphQL request to be successful

func WaitForSuccessfulGraphQLRequestUsingAccessToken

func WaitForSuccessfulGraphQLRequestUsingAccessToken(namespace, uri, path, query, accessToken string, timeoutInMin int, response interface{}, analyzeResponse func(response interface{}) (bool, error)) error

WaitForSuccessfulGraphQLRequestUsingAccessToken waits for an GraphQL request using access token to be successful

func WaitForSuccessfulGraphQLRequestUsingPagination

func WaitForSuccessfulGraphQLRequestUsingPagination(namespace, uri, path, query string, timeoutInMin, pageSize, totalSize int, response interface{}, afterEachResponse func(response interface{}) (bool, error), afterFullRequest func() (bool, error)) error

WaitForSuccessfulGraphQLRequestUsingPagination waits for a GraphQL request with pagination to be successful. You can provide 2 functions:

1. After each response. This is called after every page is queried. Useful for checking the content of each page or appending results for final checks after all pages are retrieved.

2. After full request. This is called once after all pages are queried. Useful for final checks on all results.

If more than one page is to be retrieved, include the `$offset` variable in the query which will be used for pagination.

func WaitForSuccessfulHTTPRequest

func WaitForSuccessfulHTTPRequest(namespace string, requestInfo HTTPRequestInfo, timeoutInMin int) error

WaitForSuccessfulHTTPRequest waits for an HTTP request to be successful

func WaitForTrigger

func WaitForTrigger(namespace, name string, timeoutInMin int) error

WaitForTrigger waits until the Trigger ready status is True

Types

type Command

type Command interface {
	// WithLoggerContext method attaches a logger context to trace all the command logs when executing it.
	WithLoggerContext(loggerContext string) Command
	// InDirectory method sets the directory where the command will be executed.
	InDirectory(directory string) Command
	// WithRetry method defines retry options to be applied to the command.
	WithRetry(opts ...RetryOption) Command
	// Sync method allows to execute only one command at a time based on the syncID.
	Sync(syncID string) Command
	// Execute command and returns the outputs.
	Execute() (string, error)
}

Command wraps information about the command to execute.

func CreateCommand

func CreateCommand(commandName string, args ...string) Command

CreateCommand methods initializes the basic data to run commands.

type ContainerEngine

type ContainerEngine interface {
	// PullImage pull image from external registry to internal registry
	PullImage(imageTag string) ContainerEngine

	// PushImage push image from internal registry to external registry
	PushImage(imageTag string) ContainerEngine

	// BuildImage builds the container image from specified directory
	BuildImage(projectLocation, imageTag string) ContainerEngine

	// Setup the retry for the different commands
	WithRetry(retryNb int) ContainerEngine

	// GetError returns error in case any execution failed
	GetError() error
}

ContainerEngine is the engine providing container and registry functionality

func GetContainerEngine

func GetContainerEngine(namespace string) ContainerEngine

GetContainerEngine returns container engine based on test configuration

type DecisionsResponse

type DecisionsResponse struct {
	Status    string     `json:"status"`
	Saliences []Salience `json:"saliencies"`
}

DecisionsResponse represents the decision response

func GetKogitoTrustyDecisionsByExecutionName

func GetKogitoTrustyDecisionsByExecutionName(namespace, executionName string, timeoutInMin int) (*DecisionsResponse, error)

GetKogitoTrustyDecisionsByExecutionName gets the decisions made by a given execution name

type HTTPRequestInfo

type HTTPRequestInfo struct {
	HTTPMethod, URI, Path, BodyFormat, BodyContent, Token string
	Unsecure                                              bool
	Headers                                               map[string]string
}

HTTPRequestInfo structure encapsulates all information needed to execute an HTTP request

func NewGETHTTPRequestInfo

func NewGETHTTPRequestInfo(uri, path string) HTTPRequestInfo

NewGETHTTPRequestInfo constructor creates a new HTTPRequestInfo struct with the GET HTTP method

func NewPOSTHTTPRequestInfo

func NewPOSTHTTPRequestInfo(uri, path, bodyFormat, bodyContent string) HTTPRequestInfo

NewPOSTHTTPRequestInfo constructor creates a new HTTPRequestInfo struct with the POST HTTP method

func NewPOSTHTTPRequestInfoWithHeaders

func NewPOSTHTTPRequestInfoWithHeaders(uri, path string, headers map[string]string, bodyFormat, bodyContent string) HTTPRequestInfo

NewPOSTHTTPRequestInfoWithHeaders constructor creates a new HTTPRequestInfo struct with the POST HTTP method and provided headers

type HTTPRequestResult

type HTTPRequestResult string

HTTPRequestResult represents the success or error of an HTTP request

const (
	// HTTPRequestResultSuccess in case of success
	HTTPRequestResultSuccess HTTPRequestResult = "success"
	// HTTPRequestResultError in case of error
	HTTPRequestResultError HTTPRequestResult = "error"
)

func ExecuteHTTPRequestsInThreads

func ExecuteHTTPRequestsInThreads(namespace string, requestCount, threadCount int, requestInfo HTTPRequestInfo) ([]HTTPRequestResult, error)

ExecuteHTTPRequestsInThreads executes given number of requests using given number of threads (Go routines). Returns []HTTPRequestResult with the outcome of each thread (HTTPRequestResultSuccess or HTTPRequestResultError). Returns error if the desired number of requests cannot be precisely divided to the threads. Useful for performance testing.

type InstallerType

type InstallerType string

InstallerType defines the type of installer for services

var (
	// CLIInstallerType defines the CLI installer
	CLIInstallerType InstallerType = cliInstallerKey
	// CRInstallerType defines the CR installer
	CRInstallerType InstallerType = crInstallerKey
)

func GetDefaultInstallerType

func GetDefaultInstallerType() InstallerType

GetDefaultInstallerType returns the default installer type for the tests

type KogitoApplicationDockerfileProvider

type KogitoApplicationDockerfileProvider interface {
	// GetDockerfileContent returns Dockerfile content for image creation
	GetDockerfileContent() (string, error)
}

KogitoApplicationDockerfileProvider is the API to provide Dockerfile content for image creation based on built project content

func GetKogitoApplicationDockerfileProvider

func GetKogitoApplicationDockerfileProvider(projectLocation string) KogitoApplicationDockerfileProvider

GetKogitoApplicationDockerfileProvider returns KogitoApplicationDockerfileProvider based on project location

type Logger

type Logger struct {
	logr.Logger
}

Logger shared logger struct

func GetLogger

func GetLogger(namespace string) Logger

GetLogger retrieves the logger for a namespace

func GetMainLogger

func GetMainLogger() Logger

GetMainLogger returns the main logger

func (Logger) Debug

func (l Logger) Debug(message string, keysAndValues ...interface{})

Debug alternative for info format with DEBUG named and correct log level

func (Logger) Warn

func (l Logger) Warn(message string, keysAndValues ...interface{})

Warn alternative for info format with sprintf and WARN named.

type MavenCommand

type MavenCommand interface {
	// WithLoggerContext method attaches a logger context to trace all the command logs when executing it.
	WithLoggerContext(loggerContext string) MavenCommand
	// Execute command and returns the outputs.
	Execute(targets ...string) (string, error)

	// SkipTests will skip testing automatically
	SkipTests() MavenCommand
	// UpdateArtifacts will force the update of local artifacts
	UpdateArtifacts() MavenCommand
	// Profiles sets the profiles to execute
	Profiles(profiles ...string) MavenCommand
	// Options adds additional command line options for the Maven command
	Options(options ...string) MavenCommand
}

MavenCommand wraps information about the maven command to execute.

func CreateMavenCommand

func CreateMavenCommand(directory string) MavenCommand

CreateMavenCommand methods initializes the basic data to run maven commands.

type MongoDBUserCred

type MongoDBUserCred struct {
	Name         string
	AuthDatabase string
	SecretName   string
	Databases    []string
}

MongoDBUserCred holds information to create a MongoDB user in MongoDB, secretName containing the password

type OperatorCatalog

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

OperatorCatalog OLM operator catalog

func GetCommunityCatalog

func GetCommunityCatalog() OperatorCatalog

GetCommunityCatalog returns OperatorCatalog with community operators

func GetCustomKogitoOperatorCatalog

func GetCustomKogitoOperatorCatalog() OperatorCatalog

GetCustomKogitoOperatorCatalog returns OperatorCatalog containing custom Kogito operator informations

func GetOperatorCatalog

func GetOperatorCatalog(namespace, source string) OperatorCatalog

GetOperatorCatalog creates the operator catalog based given on Source and namespace

func GetProductCatalog

func GetProductCatalog() OperatorCatalog

GetProductCatalog returns OperatorCatalog with red hat operators

type Opts

type Opts struct {
	// Verbose will increase logging
	Verbose bool
	// Output specifies where to log
	Output io.Writer
}

Opts describe logger options

type RetryOption

type RetryOption func(*commandStruct)

RetryOption declares funtion to be applied on Retry

func NumberOfRetries

func NumberOfRetries(retries int) RetryOption

NumberOfRetries declares funtion setting number of retries

func RetryDelay

func RetryDelay(delay time.Duration) RetryOption

RetryDelay declares funtion setting delay between retries

type Salience

type Salience struct {
	OutcomeName string `json:"outcomeName"`
}

Salience represents the salience response

type Task

type Task struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

Task Kogito process task representation

func GetTasks

func GetTasks(namespace, routeURI, processName, processInstanceID string) (foundTasks []Task, err error)

GetTasks retrieves tasks of specific process instance

func GetTasksByUser

func GetTasksByUser(namespace, routeURI, processName, processInstanceID, user string) (foundTasks []Task, err error)

GetTasksByUser retrieves tasks of specific process instance and user

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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