Documentation ¶
Index ¶
- Constants
- func MakeChannelServiceName(name string) string
- func MakeClient(clientID string, bootstrapServers []string) (sarama.ClusterAdmin, error)
- func MakeExternalServiceAddress(namespace, service string) string
- func MakeK8sService(kc *v1alpha1.KafkaChannel, opts ...ServiceOption) (*corev1.Service, error)
- func MakeTopicName(channel *v1alpha1.KafkaChannel) string
- type ServiceOption
Constants ¶
View Source
const ( MessagingRoleLabel = "messaging.knative.dev/role" MessagingRole = "kafka-channel" )
Variables ¶
This section is empty.
Functions ¶
func MakeChannelServiceName ¶
func MakeClient ¶
func MakeClient(clientID string, bootstrapServers []string) (sarama.ClusterAdmin, error)
func MakeK8sService ¶
func MakeK8sService(kc *v1alpha1.KafkaChannel, opts ...ServiceOption) (*corev1.Service, error)
MakeK8sService creates a new K8s Service for a Channel resource. It also sets the appropriate OwnerReferences on the resource so handleObject can discover the Channel resource that 'owns' it. As well as being garbage collected when the Channel is deleted.
func MakeTopicName ¶
func MakeTopicName(channel *v1alpha1.KafkaChannel) string
Types ¶
type ServiceOption ¶
ServiceOption can be used to optionally modify the K8s service in MakeK8sService.
func ExternalService ¶
func ExternalService(namespace, service string) ServiceOption
ExternalService is a functional option for MakeK8sService to create a K8s service of type ExternalName pointing to the specified service in a namespace.
Click to show internal directories.
Click to hide internal directories.