Documentation ¶
Index ¶
- Constants
- func CreateChannelServiceName(name string) string
- func GetServicePorts() []corev1.ServicePort
- func MakeDispatcher(args DispatcherArgs) *v1.Deployment
- func MakeDispatcherService(name, namespace string) *corev1.Service
- func MakeRoleBinding(ns, name string, sa *corev1.ServiceAccount, roleName string) *rbacv1.RoleBinding
- func MakeServiceAccount(namespace, name string) *corev1.ServiceAccount
- func NewK8sService(imc *v1.InMemoryChannel, opts ...K8sServiceOption) (*corev1.Service, error)
- type DispatcherArgs
- type K8sServiceOption
Constants ¶
const ( PortName = "http" PortNumber = 80 MessagingRoleLabel = "messaging.knative.dev/role" MessagingRole = "in-memory-channel" )
Variables ¶
This section is empty.
Functions ¶
func GetServicePorts ¶ added in v0.31.0
func GetServicePorts() []corev1.ServicePort
func MakeDispatcher ¶ added in v0.13.0
func MakeDispatcher(args DispatcherArgs) *v1.Deployment
MakeDispatcher generates the dispatcher deployment for the in-memory channel
func MakeDispatcherService ¶ added in v0.13.0
MakeDispatcherService creates the dispatcher service
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 in-memory 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'.
func NewK8sService ¶
func NewK8sService(imc *v1.InMemoryChannel, opts ...K8sServiceOption) (*corev1.Service, error)
NewK8sService creates a new 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.
Types ¶
type DispatcherArgs ¶ added in v0.13.0
type K8sServiceOption ¶
ServiceOption can be used to optionally modify the K8s service in CreateK8sService
func ExternalService ¶
func ExternalService(namespace, service string) K8sServiceOption
ExternalService is a functional option for CreateK8sService to create a K8s service of type ExternalName pointing to the specified service in a namespace.