Documentation ¶
Index ¶
- Variables
- func Channel(name string, namespace string, provisioner *corev1.ObjectReference) *v1alpha1.Channel
- func ChannelRef(name string) *corev1.ObjectReference
- func ClusterChannelProvisioner(name string) *corev1.ObjectReference
- func Configuration(name string, namespace string, imagePath string) *servingv1beta1.Configuration
- func IsRevisionReady(r *v1beta1.Revision) (bool, error)
- func IsRouteReady(r *v1beta1.Route) (bool, error)
- func IsServiceReady(s *v1beta1.Service) (bool, error)
- func Route(name string, namespace string, configName string) *servingv1beta1.Route
- func SubscriberSpecForRoute(name string) *v1alpha1.SubscriberSpec
- func Subscription(name string, namespace string, channel *corev1.ObjectReference, ...) *v1alpha1.Subscription
- func WaitForRouteState(client servingtyped.RouteInterface, name string, ...) error
- type Cleaner
- type Clients
- type EventingSourcesEnvironmentFlags
- type ResourceDeleter
Constants ¶
This section is empty.
Variables ¶
var EventingSourcesFlags = initializeEventingSourcesFlags()
EventingSourcesFlags holds the command line flags specific to knative/eventing-contrib
Functions ¶
func ChannelRef ¶
func ChannelRef(name string) *corev1.ObjectReference
ChannelRef returns an ObjectReference for a given Channel Name
func ClusterChannelProvisioner ¶
func ClusterChannelProvisioner(name string) *corev1.ObjectReference
ClusterChannelProvisioner returns a ClusterChannelProvisioner for a given name
func Configuration ¶
func Configuration(name string, namespace string, imagePath string) *servingv1beta1.Configuration
Configuration returns a Configuration object in namespace with name that uses the image specified by imagePath.
func IsRevisionReady ¶
IsRevisionReady will check the status conditions of the revision and return true if the revision is ready to serve traffic. It will return false if the status indicates a state other than deploying or being ready. It will also return false if the type of the condition is unexpected.
func IsRouteReady ¶
IsRouteReady will check the status conditions of the route and return true if the route is ready.
func IsServiceReady ¶
IsServiceReady will check the status conditions of the service and return true if the service is ready. This means that its configurations and routes have all reported ready.
func Route ¶
func Route(name string, namespace string, configName string) *servingv1beta1.Route
Route returns a Route object in namespace
func SubscriberSpecForRoute ¶
func SubscriberSpecForRoute(name string) *v1alpha1.SubscriberSpec
SubscriberSpecForRoute returns a SubscriberSpec for a given Knative Service.
func Subscription ¶
func Subscription(name string, namespace string, channel *corev1.ObjectReference, subscriber *v1alpha1.SubscriberSpec, reply *v1alpha1.ReplyStrategy) *v1alpha1.Subscription
Subscription returns a Subscription
func WaitForRouteState ¶
func WaitForRouteState(client servingtyped.RouteInterface, name string, inState func(r *servingv1beta1.Route) (bool, error), desc string) error
WaitForRouteState polls the status of the Route called name from client every interval until inState returns `true` indicating it is done, returns an error or timeout. desc will be used to name the metric that is emitted to track how long it took for name to get into the state checked by inState.
Types ¶
type Cleaner ¶
type Cleaner struct {
// contains filtered or unexported fields
}
Cleaner holds resources that will be cleaned after test
func NewCleaner ¶
func NewCleaner(log logging.FormatLogger, client dynamic.Interface) *Cleaner
NewCleaner creates a new Cleaner
func (*Cleaner) Add ¶
func (c *Cleaner) Add(group string, version string, resource string, namespace string, name string) error
Add will register a resource to be cleaned by the Clean function This function is generic enough so as to be able to register any resources Each resource is identified by: * group (e.g. serving.knative.dev) * version (e.g. v1alpha1) * resource's plural (e.g. routes) * namespace (use "" if the resource is not tied to any namespace) * actual name of the resource (e.g. myroute)
type Clients ¶
type Clients struct { Kube *test.KubeClient Serving *serving.Clientset Eventing *eventing.Clientset Dynamic dynamic.Interface }
Clients holds instances of interfaces for making requests to Knative.
func NewClients ¶
NewClients instantiates and returns several clientsets required for making request to the cluster specified by the combination of clusterName and configPath. Clients can make requests within namespace.
type EventingSourcesEnvironmentFlags ¶
type EventingSourcesEnvironmentFlags struct { }
EventingSourcesEnvironmentFlags holds the e2e flags needed only by the eventing-contrib repo
type ResourceDeleter ¶
type ResourceDeleter struct { Resource dynamic.ResourceInterface Name string }
ResourceDeleter holds the cleaner and name of resource to be cleaned