utils

package
v0.41.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConsumerName

func ConsumerName(subUID string) string

func ConsumerSubjectName

func ConsumerSubjectName(namespace, name, uid string) string

ConsumerSubjectName generates a shareable subject name to bind to NATS Consumers for each Knative subscriber. This can be used by multiple dispatcher replicas to share delivery of

func ConvertDeliverPolicy

func ConvertDeliverPolicy(in v1alpha1.DeliverPolicy, def nats.DeliverPolicy) nats.DeliverPolicy

func ConvertDiscardPolicy

func ConvertDiscardPolicy(in v1alpha1.DiscardPolicy, def nats.DiscardPolicy) nats.DiscardPolicy

func ConvertPlacement

func ConvertPlacement(in *v1alpha1.StreamPlacement) *nats.Placement

func ConvertReplayPolicy

func ConvertReplayPolicy(in v1alpha1.ReplayPolicy, def nats.ReplayPolicy) nats.ReplayPolicy

func ConvertRetentionPolicy

func ConvertRetentionPolicy(in v1alpha1.RetentionPolicy, def nats.RetentionPolicy) nats.RetentionPolicy

func ConvertStorage

func ConvertStorage(in v1alpha1.Storage, def nats.StorageType) nats.StorageType

func ConvertStreamSource

func ConvertStreamSource(in *v1alpha1.StreamSource) *nats.StreamSource

func ConvertStreamSources

func ConvertStreamSources(in []v1alpha1.StreamSource) []*nats.StreamSource

func PublishSubjectName

func PublishSubjectName(namespace, name string) string

func StreamName

func StreamName(nc *v1alpha1.NatsJetStreamChannel) string

StreamName builds a valid NATS Jetstream stream name from a *v1alpha1.NatsJetStreamChannel. If overrideName is not set, the format is KN_NAMESPACE__NAME, where hyphens in the namespace or name are replaced with _.

For example: - "default/channel" => "KN_DEFAULT__CHANNEL" - "knative-eventing/my-channel" => "KN_KNATIVE_EVENTING__MY_CHANNEL"

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL