Documentation ¶
Index ¶
- Constants
- Variables
- func Broker(name string, namespace string) *v1alpha1.Broker
- 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) *servingv1alpha1.Configuration
- func EventLoggerPod(name string, namespace string, selector map[string]string) *corev1.Pod
- func EventSenderPod(name string, namespace string, sink string, event CloudEvent) *corev1.Pod
- func IsBrokerReady(b *eventingv1alpha1.Broker) (bool, error)
- func IsChannelReady(c *eventingv1alpha1.Channel) (bool, error)
- func IsRevisionReady(r *servingv1alpha1.Revision) (bool, error)
- func IsRouteReady(r *servingv1alpha1.Route) (bool, error)
- func IsServiceReady(s *servingv1alpha1.Service) (bool, error)
- func IsSubscriptionReady(s *eventingv1alpha1.Subscription) (bool, error)
- func IsTriggerReady(t *eventingv1alpha1.Trigger) (bool, error)
- func PodsRunning(podList *corev1.PodList) (bool, error)
- func Route(name string, namespace string, configName string) *servingv1alpha1.Route
- func Service(name string, namespace string, selector map[string]string) *corev1.Service
- func SubscriberSpecForRoute(name string) *v1alpha1.SubscriberSpec
- func SubscriberSpecForService(name string) *v1alpha1.SubscriberSpec
- func Subscription(name string, namespace string, channel *corev1.ObjectReference, ...) *v1alpha1.Subscription
- func TriggersReady(triggerList *eventingv1alpha1.TriggerList) (bool, error)
- func WaitForBrokerState(client eventingclient.BrokerInterface, name string, ...) error
- func WaitForChannelState(client eventingclient.ChannelInterface, name string, ...) error
- func WaitForRouteState(client servingclient.RouteInterface, name string, ...) error
- func WaitForSubscriptionState(client eventingclient.SubscriptionInterface, name string, ...) error
- func WaitForTriggerState(client eventingclient.TriggerInterface, name string, ...) error
- func WaitForTriggersListState(clients eventingclient.TriggerInterface, ...) error
- type Cleaner
- type Clients
- type CloudEvent
- type EventingEnvironmentFlags
- type ResourceDeleter
- type TriggerBuilder
- func (b *TriggerBuilder) Broker(brokerName string) *TriggerBuilder
- func (b *TriggerBuilder) Build() *eventingv1alpha1.Trigger
- func (b *TriggerBuilder) EventSource(eventSource string) *TriggerBuilder
- func (b *TriggerBuilder) EventType(eventType string) *TriggerBuilder
- func (b *TriggerBuilder) SubscriberSvc(svcName string) *TriggerBuilder
- type TypeAndSource
Constants ¶
const ( CloudEventEncodingBinary = "binary" CloudEventEncodingStructured = "structured" )
Variables ¶
var EventingFlags = initializeEventingFlags()
EventingFlags holds the command line flags specific to knative/eventing
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) *servingv1alpha1.Configuration
Configuration returns a Configuration object in namespace with the name names.Config that uses the image specified by imagePath.
func EventLoggerPod ¶ added in v0.4.0
EventLoggerPod creates a Pod that logs events received.
func EventSenderPod ¶ added in v0.4.0
EventSenderPod creates a Pod that sends a single event to the given address.
func IsBrokerReady ¶ added in v0.5.0
func IsBrokerReady(b *eventingv1alpha1.Broker) (bool, error)
IsBrokerReady will check the status conditions of the Broker and return true if the Broker is ready.
func IsChannelReady ¶ added in v0.4.0
func IsChannelReady(c *eventingv1alpha1.Channel) (bool, error)
IsChannelReady will check the status conditions of the Channel and return true if the Channel is ready.
func IsRevisionReady ¶
func IsRevisionReady(r *servingv1alpha1.Revision) (bool, error)
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 ¶
func IsRouteReady(r *servingv1alpha1.Route) (bool, error)
IsRouteReady will check the status conditions of the route and return true if the route is ready.
func IsServiceReady ¶
func IsServiceReady(s *servingv1alpha1.Service) (bool, error)
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 IsSubscriptionReady ¶ added in v0.4.0
func IsSubscriptionReady(s *eventingv1alpha1.Subscription) (bool, error)
IsSubscriptionReady will check the status conditions of the Subscription and return true if the Subscription is ready.
func IsTriggerReady ¶ added in v0.5.0
func IsTriggerReady(t *eventingv1alpha1.Trigger) (bool, error)
IsTriggerReady will check the status conditions of the Trigger and return true if the Trigger is ready.
func PodsRunning ¶
PodsRunning will check the status conditions of the pod list and return true if all pods are Running.
func Route ¶
func Route(name string, namespace string, configName string) *servingv1alpha1.Route
Route returns a Route object in namespace
func Service ¶ added in v0.4.0
Service creates a Kubernetes Service with the given name, namespace, and selector. Port 8080 is assumed the target port.
func SubscriberSpecForRoute ¶
func SubscriberSpecForRoute(name string) *v1alpha1.SubscriberSpec
SubscriberSpecForRoute returns a SubscriberSpec for a given Knative Service.
func SubscriberSpecForService ¶ added in v0.4.0
func SubscriberSpecForService(name string) *v1alpha1.SubscriberSpec
SubscriberSpecForService 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 TriggersReady ¶ added in v0.5.0
func TriggersReady(triggerList *eventingv1alpha1.TriggerList) (bool, error)
TriggersReady will check the status conditions of the trigger list and return true if all triggers are Ready.
func WaitForBrokerState ¶ added in v0.5.0
func WaitForBrokerState(client eventingclient.BrokerInterface, name string, inState func(r *eventingv1alpha1.Broker) (bool, error), desc string) error
WaitForBrokerState polls the status of the Broker 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.
func WaitForChannelState ¶ added in v0.4.0
func WaitForChannelState(client eventingclient.ChannelInterface, name string, inState func(r *eventingv1alpha1.Channel) (bool, error), desc string) error
WaitForChannelState polls the status of the Channel 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.
func WaitForRouteState ¶
func WaitForRouteState(client servingclient.RouteInterface, name string, inState func(r *servingv1alpha1.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.
func WaitForSubscriptionState ¶ added in v0.4.0
func WaitForSubscriptionState(client eventingclient.SubscriptionInterface, name string, inState func(r *eventingv1alpha1.Subscription) (bool, error), desc string) error
WaitForSubscriptionState polls the status of the Subscription 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.
func WaitForTriggerState ¶ added in v0.5.0
func WaitForTriggerState(client eventingclient.TriggerInterface, name string, inState func(r *eventingv1alpha1.Trigger) (bool, error), desc string) error
WaitForTriggerState polls the status of the Trigger 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.
func WaitForTriggersListState ¶ added in v0.5.0
func WaitForTriggersListState(clients eventingclient.TriggerInterface, inState func(t *eventingv1alpha1.TriggerList) (bool, error), desc string) error
WaitForTriggersListState polls the status of the TriggerList 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 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 CloudEvent ¶ added in v0.4.0
type CloudEvent struct { ID string Type string Source string Data string Encoding string // binary or structured }
CloudEvent specifies the arguments for a CloudEvent sent by the sendevent binary.
type EventingEnvironmentFlags ¶
type EventingEnvironmentFlags struct {
Provisioner string // The name of the Channel's ClusterChannelProvisioner
}
EventingEnvironmentFlags holds the e2e flags needed only by the eventing repo
type ResourceDeleter ¶
type ResourceDeleter struct { Resource dynamic.ResourceInterface Name string }
ResourceDeleter holds the cleaner and name of resource to be cleaned
type TriggerBuilder ¶ added in v0.5.0
type TriggerBuilder struct {
*eventingv1alpha1.Trigger
}
Builder for trigger objects.
func NewTriggerBuilder ¶ added in v0.5.0
func NewTriggerBuilder(name, namespace string) *TriggerBuilder
func (*TriggerBuilder) Broker ¶ added in v0.5.0
func (b *TriggerBuilder) Broker(brokerName string) *TriggerBuilder
func (*TriggerBuilder) Build ¶ added in v0.5.0
func (b *TriggerBuilder) Build() *eventingv1alpha1.Trigger
func (*TriggerBuilder) EventSource ¶ added in v0.5.0
func (b *TriggerBuilder) EventSource(eventSource string) *TriggerBuilder
func (*TriggerBuilder) EventType ¶ added in v0.5.0
func (b *TriggerBuilder) EventType(eventType string) *TriggerBuilder
func (*TriggerBuilder) SubscriberSvc ¶ added in v0.5.0
func (b *TriggerBuilder) SubscriberSvc(svcName string) *TriggerBuilder
type TypeAndSource ¶ added in v0.5.0
TypeAndSource specifies the type and source of an Event.