Documentation ¶
Index ¶
- Constants
- Variables
- func CreateBindingMessage(cloudEventVersion string) binding.Message
- func CreateChannelReference(name string, namespace string) eventingChannel.ChannelReference
- func CreateCloudEvent(cloudEventVersion string) *event.Event
- func CreateKafkaChannel(name string, namespace string, ready corev1.ConditionStatus) *kafkav1beta1.KafkaChannel
- func GetProducerMessageHeader(t *testing.T, headers []sarama.RecordHeader, headerKey string) *sarama.RecordHeader
- func ValidateProducerMessageHeader(t *testing.T, headers []sarama.RecordHeader, headerKey string, ...)
- type MockKafkaChannelLister
- type MockKafkaChannelNamespaceLister
Constants ¶
View Source
const ( ChannelName = "TestChannelName" ChannelNamespace = "TestChannelNamespace" TopicName = "TestChannelNamespace.TestChannelName" // Match util.go TopicName() Implementation For Channel Name/Namespace Above PartitionKey = "TestPartitionKey" EventId = "TestEventId" EventType = "com.cloudevents.readme.sent" EventSource = "http://localhost:8080/" EventDataContentType = "application/json" EventSubject = "TestEventSubject" EventDataSchema = "TestEventDataSchema" EventDataKey = "TestEventDataKey" EventDataValue = "TestEventDataValue" )
Test Data
Variables ¶
View Source
var EventDataJson, _ = json.Marshal(map[string]string{EventDataKey: EventDataValue})
Test Data
Functions ¶
func CreateBindingMessage ¶
Utility Function For Creating A CloudEvents sdk-go BindingMessage
func CreateChannelReference ¶
func CreateChannelReference(name string, namespace string) eventingChannel.ChannelReference
Utility Function For Creating A Test ChannelReference (Knative)
func CreateCloudEvent ¶
Utility Function For Creating A Test CloudEvent
func CreateKafkaChannel ¶
func CreateKafkaChannel(name string, namespace string, ready corev1.ConditionStatus) *kafkav1beta1.KafkaChannel
func GetProducerMessageHeader ¶
func GetProducerMessageHeader(t *testing.T, headers []sarama.RecordHeader, headerKey string) *sarama.RecordHeader
Utility Function For Acquiring A Kafka Message Header With The Specified Key
func ValidateProducerMessageHeader ¶
func ValidateProducerMessageHeader(t *testing.T, headers []sarama.RecordHeader, headerKey string, headerValue string)
Utility Function For Validating A Kafka Message Header Is Present With Specified Value
Types ¶
type MockKafkaChannelLister ¶
type MockKafkaChannelLister struct {
// contains filtered or unexported fields
}
func NewMockKafkaChannelLister ¶
func NewMockKafkaChannelLister(name string, namespace string, exists bool, ready corev1.ConditionStatus, err bool) MockKafkaChannelLister
func (MockKafkaChannelLister) KafkaChannels ¶
func (m MockKafkaChannelLister) KafkaChannels(namespace string) kafkalisters.KafkaChannelNamespaceLister
func (MockKafkaChannelLister) List ¶
func (m MockKafkaChannelLister) List(_ labels.Selector) (ret []*kafkav1beta1.KafkaChannel, err error)
type MockKafkaChannelNamespaceLister ¶
type MockKafkaChannelNamespaceLister struct {
// contains filtered or unexported fields
}
func NewMockKafkaChannelNamespaceLister ¶
func NewMockKafkaChannelNamespaceLister(name string, namespace string, exists bool, ready corev1.ConditionStatus, err bool) MockKafkaChannelNamespaceLister
func (MockKafkaChannelNamespaceLister) Get ¶
func (m MockKafkaChannelNamespaceLister) Get(name string) (*kafkav1beta1.KafkaChannel, error)
func (MockKafkaChannelNamespaceLister) List ¶
func (m MockKafkaChannelNamespaceLister) List(_ labels.Selector) (ret []*kafkav1beta1.KafkaChannel, err error)
Click to show internal directories.
Click to hide internal directories.