Documentation
¶
Index ¶
- Constants
- func MakeChannelServiceName(name string) string
- func MakeClient(clientID string, bootstrapServers []string) (sarama.ClusterAdmin, error)
- func MakeDispatcher(args DispatcherArgs) *v1.Deployment
- func MakeDispatcherService(namespace string) *corev1.Service
- func MakeExternalServiceAddress(namespace, service string) string
- func MakeK8sService(kc *v1beta1.KafkaChannel, opts ...ServiceOption) (*corev1.Service, error)
- func MakeRoleBinding(ns, name string, sa *corev1.ServiceAccount, roleName string) *rbacv1.RoleBinding
- func MakeServiceAccount(namespace, name string) *corev1.ServiceAccount
- type DispatcherArgs
- type ServiceOption
Constants ¶
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 MakeDispatcher ¶ added in v0.13.0
func MakeDispatcher(args DispatcherArgs) *v1.Deployment
MakeDispatcher generates the dispatcher deployment for the KafKa channel
func MakeDispatcherService ¶ added in v0.13.0
MakeDispatcherService creates the Kafka dispatcher service
func MakeK8sService ¶
func MakeK8sService(kc *v1beta1.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 MakeRoleBinding ¶ added in v0.13.0
func MakeRoleBinding(ns, name string, sa *corev1.ServiceAccount, roleName string) *rbacv1.RoleBinding
MakeRoleBinding creates a RoleBinding object for the Kafka dispatcher service account 'sa' in the Namespace 'ns'.
func MakeServiceAccount ¶ added in v0.13.0
func MakeServiceAccount(namespace, name string) *corev1.ServiceAccount
MakeServiceAccount creates a ServiceAccount object for the Namespace 'ns'.
Types ¶
type DispatcherArgs ¶ added in v0.13.0
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.