Documentation ¶
Index ¶
- type ChannelBuilder
- type ChannelsRecorder
- func (sr *ChannelsRecorder) CreateChannel(channels interface{}, err error)
- func (sr *ChannelsRecorder) DeleteChannel(name interface{}, err error)
- func (sr *ChannelsRecorder) GetChannel(name interface{}, channels *v1beta1.Channel, err error)
- func (sr *ChannelsRecorder) ListChannel(channelsList *v1beta1.ChannelList, err error)
- func (sr *ChannelsRecorder) Validate()
- type KnChannelsClient
- type KnMessagingClient
- type KnSubscriptionsClient
- type MockKnChannelsClient
- func (c *MockKnChannelsClient) CreateChannel(channels *v1beta1.Channel) error
- func (c *MockKnChannelsClient) DeleteChannel(name string) error
- func (c *MockKnChannelsClient) GetChannel(name string) (*v1beta1.Channel, error)
- func (c *MockKnChannelsClient) ListChannel() (*v1beta1.ChannelList, error)
- func (c *MockKnChannelsClient) Namespace() string
- func (c *MockKnChannelsClient) Recorder() *ChannelsRecorder
- type MockKnSubscriptionsClient
- func (c *MockKnSubscriptionsClient) CreateSubscription(subscription *v1beta1.Subscription) error
- func (c *MockKnSubscriptionsClient) DeleteSubscription(name string) error
- func (c *MockKnSubscriptionsClient) GetSubscription(name string) (*v1beta1.Subscription, error)
- func (c *MockKnSubscriptionsClient) ListSubscription() (*v1beta1.SubscriptionList, error)
- func (c *MockKnSubscriptionsClient) Namespace() string
- func (c *MockKnSubscriptionsClient) Recorder() *SubscriptionsRecorder
- func (c *MockKnSubscriptionsClient) UpdateSubscription(subscription *v1beta1.Subscription) error
- type SubscriptionBuilder
- func (s *SubscriptionBuilder) Build() *v1beta1.Subscription
- func (s *SubscriptionBuilder) Channel(channel *corev1.ObjectReference) *SubscriptionBuilder
- func (s *SubscriptionBuilder) DeadLetterSink(dls *duckv1.Destination) *SubscriptionBuilder
- func (s *SubscriptionBuilder) Reply(reply *duckv1.Destination) *SubscriptionBuilder
- func (s *SubscriptionBuilder) Subscriber(subs *duckv1.Destination) *SubscriptionBuilder
- type SubscriptionsRecorder
- func (sr *SubscriptionsRecorder) CreateSubscription(subscription interface{}, err error)
- func (sr *SubscriptionsRecorder) DeleteSubscription(name interface{}, err error)
- func (sr *SubscriptionsRecorder) GetSubscription(name interface{}, subscription *v1beta1.Subscription, err error)
- func (sr *SubscriptionsRecorder) ListSubscription(subscriptionsList *v1beta1.SubscriptionList, err error)
- func (sr *SubscriptionsRecorder) UpdateSubscription(subscription interface{}, err error)
- func (sr *SubscriptionsRecorder) Validate()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChannelBuilder ¶
type ChannelBuilder struct {
// contains filtered or unexported fields
}
ChannelBuilder is for building the Channel object
func NewChannelBuilder ¶
func NewChannelBuilder(name string) *ChannelBuilder
NewChannelBuilder for building Channel object
func (*ChannelBuilder) Build ¶
func (c *ChannelBuilder) Build() *v1beta1.Channel
Build returns the Channel object from the builder
func (*ChannelBuilder) Type ¶
func (c *ChannelBuilder) Type(gvk *schema.GroupVersionKind) *ChannelBuilder
Type sets the type of the channel to create
type ChannelsRecorder ¶
type ChannelsRecorder struct {
// contains filtered or unexported fields
}
recorder for service
func (*ChannelsRecorder) CreateChannel ¶
func (sr *ChannelsRecorder) CreateChannel(channels interface{}, err error)
CreateChannel records a call for CreateChannel with the expected error
func (*ChannelsRecorder) DeleteChannel ¶
func (sr *ChannelsRecorder) DeleteChannel(name interface{}, err error)
DeleteChannel records a call for DeleteChannel with the expected error (nil if none)
func (*ChannelsRecorder) GetChannel ¶
func (sr *ChannelsRecorder) GetChannel(name interface{}, channels *v1beta1.Channel, err error)
GetChannel records a call for GetChannel with the expected object or error. Either channels or err should be nil
func (*ChannelsRecorder) ListChannel ¶
func (sr *ChannelsRecorder) ListChannel(channelsList *v1beta1.ChannelList, err error)
ListChannel records a call for ListChannel with the expected error (nil if none)
func (*ChannelsRecorder) Validate ¶
func (sr *ChannelsRecorder) Validate()
Validates validates whether every recorded action has been called
type KnChannelsClient ¶
type KnChannelsClient interface { // GetChannel returns a Channel by its name GetChannel(name string) (*v1beta1.Channel, error) // CreteChannel creates a Channel with given spec CreateChannel(channel *v1beta1.Channel) error // DeleteChannel deletes a Channel by its name DeleteChannel(name string) error // ListChannel lists all Channels ListChannel() (*v1beta1.ChannelList, error) // Namespace returns the namespace for this channel client Namespace() string }
KnChannelsClient for interacting with Channels
type KnMessagingClient ¶
type KnMessagingClient interface { // Get the Channels client ChannelsClient() KnChannelsClient // Get the Subscriptions client SubscriptionsClient() KnSubscriptionsClient }
KnMessagingClient to Eventing Messaging. All methods are relative to the namespace specificied during construction
func NewKnMessagingClient ¶
func NewKnMessagingClient(client clientv1beta1.MessagingV1beta1Interface, namespace string) KnMessagingClient
NewKnMessagingClient for managing all eventing messaging types
type KnSubscriptionsClient ¶ added in v0.17.1
type KnSubscriptionsClient interface { // GetSubscription returns a Subscription by its name GetSubscription(name string) (*v1beta1.Subscription, error) // CreteSubscription creates a Subscription with given spec CreateSubscription(subscription *v1beta1.Subscription) error // UpdateSubscription updates a Subscription with given spec UpdateSubscription(subscription *v1beta1.Subscription) error // DeleteSubscription deletes a Subscription by its name DeleteSubscription(name string) error // ListSubscription lists all Subscriptions ListSubscription() (*v1beta1.SubscriptionList, error) // Namespace returns the namespace for this subscription client Namespace() string }
KnSubscriptionsClient for interacting with Subscriptions
type MockKnChannelsClient ¶
type MockKnChannelsClient struct {
// contains filtered or unexported fields
}
func NewMockKnChannelsClient ¶
func NewMockKnChannelsClient(t *testing.T, ns ...string) *MockKnChannelsClient
NewMockKnChannelsClient returns a new mock instance which you need to record for
func (*MockKnChannelsClient) CreateChannel ¶
func (c *MockKnChannelsClient) CreateChannel(channels *v1beta1.Channel) error
CreateChannel performs a previously recorded action, failing if non has been registered
func (*MockKnChannelsClient) DeleteChannel ¶
func (c *MockKnChannelsClient) DeleteChannel(name string) error
DeleteChannel performs a previously recorded action, failing if non has been registered
func (*MockKnChannelsClient) GetChannel ¶
func (c *MockKnChannelsClient) GetChannel(name string) (*v1beta1.Channel, error)
GetChannel performs a previously recorded action, failing if non has been registered
func (*MockKnChannelsClient) ListChannel ¶
func (c *MockKnChannelsClient) ListChannel() (*v1beta1.ChannelList, error)
ListChannel performs a previously recorded action, failing if non has been registered
func (*MockKnChannelsClient) Namespace ¶
func (c *MockKnChannelsClient) Namespace() string
Namespace of this client
func (*MockKnChannelsClient) Recorder ¶
func (c *MockKnChannelsClient) Recorder() *ChannelsRecorder
Recorder returns the recorder for registering API calls
type MockKnSubscriptionsClient ¶ added in v0.17.1
type MockKnSubscriptionsClient struct {
// contains filtered or unexported fields
}
func NewMockKnSubscriptionsClient ¶ added in v0.17.1
func NewMockKnSubscriptionsClient(t *testing.T, ns ...string) *MockKnSubscriptionsClient
NewMockKnSubscriptionsClient returns a new mock instance which you need to record for
func (*MockKnSubscriptionsClient) CreateSubscription ¶ added in v0.17.1
func (c *MockKnSubscriptionsClient) CreateSubscription(subscription *v1beta1.Subscription) error
CreateSubscription performs a previously recorded action, failing if non has been registered
func (*MockKnSubscriptionsClient) DeleteSubscription ¶ added in v0.17.1
func (c *MockKnSubscriptionsClient) DeleteSubscription(name string) error
DeleteSubscription performs a previously recorded action, failing if non has been registered
func (*MockKnSubscriptionsClient) GetSubscription ¶ added in v0.17.1
func (c *MockKnSubscriptionsClient) GetSubscription(name string) (*v1beta1.Subscription, error)
GetSubscription performs a previously recorded action, failing if non has been registered
func (*MockKnSubscriptionsClient) ListSubscription ¶ added in v0.17.1
func (c *MockKnSubscriptionsClient) ListSubscription() (*v1beta1.SubscriptionList, error)
ListSubscription performs a previously recorded action, failing if non has been registered
func (*MockKnSubscriptionsClient) Namespace ¶ added in v0.17.1
func (c *MockKnSubscriptionsClient) Namespace() string
Namespace of this client
func (*MockKnSubscriptionsClient) Recorder ¶ added in v0.17.1
func (c *MockKnSubscriptionsClient) Recorder() *SubscriptionsRecorder
Recorder returns the recorder for registering API calls
func (*MockKnSubscriptionsClient) UpdateSubscription ¶ added in v0.17.1
func (c *MockKnSubscriptionsClient) UpdateSubscription(subscription *v1beta1.Subscription) error
UpdateSubscription performs a previously recorded action, failing if non has been registered
type SubscriptionBuilder ¶ added in v0.17.1
type SubscriptionBuilder struct {
// contains filtered or unexported fields
}
SubscriptionBuilder is for building the Subscription object
func NewSubscriptionBuilder ¶ added in v0.17.1
func NewSubscriptionBuilder(name string) *SubscriptionBuilder
NewSubscriptionBuilder for building Subscription object
func NewSubscriptionBuilderFromExisting ¶ added in v0.17.1
func NewSubscriptionBuilderFromExisting(subs *v1beta1.Subscription) *SubscriptionBuilder
NewSubscriptionBuilderFromExisting for building Subscription object from existing Subscription object
func (*SubscriptionBuilder) Build ¶ added in v0.17.1
func (s *SubscriptionBuilder) Build() *v1beta1.Subscription
Build returns the Subscription object from the builder
func (*SubscriptionBuilder) Channel ¶ added in v0.17.1
func (s *SubscriptionBuilder) Channel(channel *corev1.ObjectReference) *SubscriptionBuilder
Channel sets the channel reference for this subscription
func (*SubscriptionBuilder) DeadLetterSink ¶ added in v0.17.1
func (s *SubscriptionBuilder) DeadLetterSink(dls *duckv1.Destination) *SubscriptionBuilder
func (*SubscriptionBuilder) Reply ¶ added in v0.17.1
func (s *SubscriptionBuilder) Reply(reply *duckv1.Destination) *SubscriptionBuilder
func (*SubscriptionBuilder) Subscriber ¶ added in v0.17.1
func (s *SubscriptionBuilder) Subscriber(subs *duckv1.Destination) *SubscriptionBuilder
type SubscriptionsRecorder ¶ added in v0.17.1
type SubscriptionsRecorder struct {
// contains filtered or unexported fields
}
recorder for service
func (*SubscriptionsRecorder) CreateSubscription ¶ added in v0.17.1
func (sr *SubscriptionsRecorder) CreateSubscription(subscription interface{}, err error)
CreateSubscription records a call for CreateSubscription with the expected error
func (*SubscriptionsRecorder) DeleteSubscription ¶ added in v0.17.1
func (sr *SubscriptionsRecorder) DeleteSubscription(name interface{}, err error)
DeleteSubscription records a call for DeleteSubscription with the expected error (nil if none)
func (*SubscriptionsRecorder) GetSubscription ¶ added in v0.17.1
func (sr *SubscriptionsRecorder) GetSubscription(name interface{}, subscription *v1beta1.Subscription, err error)
GetSubscription records a call for GetSubscription with the expected object or error. Either subscriptions or err should be nil
func (*SubscriptionsRecorder) ListSubscription ¶ added in v0.17.1
func (sr *SubscriptionsRecorder) ListSubscription(subscriptionsList *v1beta1.SubscriptionList, err error)
ListSubscription records a call for ListSubscription with the expected error (nil if none)
func (*SubscriptionsRecorder) UpdateSubscription ¶ added in v0.17.1
func (sr *SubscriptionsRecorder) UpdateSubscription(subscription interface{}, err error)
UpdateSubscription records a call for CreateSubscription with the expected error
func (*SubscriptionsRecorder) Validate ¶ added in v0.17.1
func (sr *SubscriptionsRecorder) Validate()
Validates validates whether every recorded action has been called