Documentation ¶
Index ¶
- func CalcRequestTimeout(numDelivered int, ackWait time.Duration) time.Duration
- func CalculateNakDelayForRetryNumber(attemptNum int, config *kncloudevents.RetryConfig) time.Duration
- func ConsumerName(subUID string) string
- func ConsumerSubjectName(namespace, name, uid string) string
- func ConvertDeliverPolicy(in v1alpha1.DeliverPolicy, def nats.DeliverPolicy) nats.DeliverPolicy
- func ConvertDiscardPolicy(in v1alpha1.DiscardPolicy, def nats.DiscardPolicy) nats.DiscardPolicy
- func ConvertJsDeliverPolicy(in v1alpha1.DeliverPolicy, def jetstream.DeliverPolicy) jetstream.DeliverPolicy
- func ConvertJsReplayPolicy(in v1alpha1.ReplayPolicy, def jetstream.ReplayPolicy) jetstream.ReplayPolicy
- func ConvertPlacement(in *v1alpha1.StreamPlacement) *nats.Placement
- func ConvertReplayPolicy(in v1alpha1.ReplayPolicy, def nats.ReplayPolicy) nats.ReplayPolicy
- func ConvertRetentionPolicy(in v1alpha1.RetentionPolicy, def nats.RetentionPolicy) nats.RetentionPolicy
- func ConvertStorage(in v1alpha1.Storage, def nats.StorageType) nats.StorageType
- func ConvertStreamSource(in *v1alpha1.StreamSource) *nats.StreamSource
- func ConvertStreamSources(in []v1alpha1.StreamSource) []*nats.StreamSource
- func ExpBackoff(attemptNum int, delayDuration time.Duration) time.Duration
- func LinearBackoff(attemptNum int, delayDuration time.Duration) time.Duration
- func PublishSubjectName(namespace, name string) string
- func StreamName(nc *v1alpha1.NatsJetStreamChannel) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalcRequestTimeout ¶ added in v0.37.6
func CalculateNakDelayForRetryNumber ¶ added in v0.37.6
func CalculateNakDelayForRetryNumber(attemptNum int, config *kncloudevents.RetryConfig) time.Duration
func ConsumerName ¶
func ConsumerSubjectName ¶
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 ConvertJsDeliverPolicy ¶ added in v0.43.0
func ConvertJsDeliverPolicy(in v1alpha1.DeliverPolicy, def jetstream.DeliverPolicy) jetstream.DeliverPolicy
func ConvertJsReplayPolicy ¶ added in v0.43.0
func ConvertJsReplayPolicy(in v1alpha1.ReplayPolicy, def jetstream.ReplayPolicy) jetstream.ReplayPolicy
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 ConvertStreamSource ¶
func ConvertStreamSource(in *v1alpha1.StreamSource) *nats.StreamSource
func ConvertStreamSources ¶
func ConvertStreamSources(in []v1alpha1.StreamSource) []*nats.StreamSource
func ExpBackoff ¶ added in v0.37.6
func LinearBackoff ¶ added in v0.37.6
func PublishSubjectName ¶
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.
Click to show internal directories.
Click to hide internal directories.