import { IDevKnativeEventingPkgApisDuckV1BackoffPolicyType } from "./BackoffPolicyType.js"; import { IDevKnativePkgApisDuckV1Destination } from "./Destination.js"; import { IDevKnativeEventingPkgApisDuckV1FormatType } from "./FormatType.js"; import { ModelData, Model } from "@kubernetes-models/base"; /** * DeliverySpec contains the delivery options for event senders, * such as channelable and source. */ export interface IDeliverySpec { /** * BackoffDelay is the delay before retrying. * More information on Duration format: * - https://www.iso.org/iso-8601-date-and-time-format.html * - https://en.wikipedia.org/wiki/ISO_8601 * * For linear policy, backoff delay is backoffDelay\*. * For exponential policy, backoff delay is backoffDelay\*2^. */ "backoffDelay"?: string; /** * BackoffPolicy is the retry backoff policy (linear, exponential). */ "backoffPolicy"?: IDevKnativeEventingPkgApisDuckV1BackoffPolicyType; /** * DeadLetterSink is the sink receiving event that could not be sent to * a destination. */ "deadLetterSink"?: IDevKnativePkgApisDuckV1Destination; /** * format specifies the desired event format for the cloud event. * It can be one of the following values: * - nil: default value, no specific format required. * - "JSON": indicates the event should be in structured mode. * - "binary": indicates the event should be in binary mode. */ "format"?: IDevKnativeEventingPkgApisDuckV1FormatType; /** * Retry is the minimum number of retries the sender should attempt when * sending an event before moving it to the dead letter sink. */ "retry"?: number; /** * RetryAfterMax provides an optional upper bound on the duration specified in a "Retry-After" header * when calculating backoff times for retrying 429 and 503 response codes. Setting the value to * zero ("PT0S") can be used to opt-out of respecting "Retry-After" header values altogether. This * value only takes effect if "Retry" is configured, and also depends on specific implementations * (Channels, Sources, etc.) choosing to provide this capability. * * Note: This API is EXPERIMENTAL and might be changed at anytime. While this experimental * feature is in the Alpha/Beta stage, you must provide a valid value to opt-in for * supporting "Retry-After" headers. When the feature becomes Stable/GA "Retry-After" * headers will be respected by default, and you can choose to specify "PT0S" to * opt-out of supporting "Retry-After" headers. * For more details: https://github.com/knative/eventing/issues/5811 * * More information on Duration format: * - https://www.iso.org/iso-8601-date-and-time-format.html * - https://en.wikipedia.org/wiki/ISO_8601 */ "retryAfterMax"?: string; /** * Timeout is the timeout of each single request. The value must be greater than 0. * More information on Duration format: * - https://www.iso.org/iso-8601-date-and-time-format.html * - https://en.wikipedia.org/wiki/ISO_8601 * * Note: This API is EXPERIMENTAL and might break anytime. For more details: https://github.com/knative/eventing/issues/5148 */ "timeout"?: string; } /** * DeliverySpec contains the delivery options for event senders, * such as channelable and source. */ export declare class DeliverySpec extends Model implements IDeliverySpec { "backoffDelay"?: string; "backoffPolicy"?: IDevKnativeEventingPkgApisDuckV1BackoffPolicyType; "deadLetterSink"?: IDevKnativePkgApisDuckV1Destination; "format"?: IDevKnativeEventingPkgApisDuckV1FormatType; "retry"?: number; "retryAfterMax"?: string; "timeout"?: string; constructor(data?: ModelData); } export type { IDeliverySpec as IDevKnativeEventingPkgApisDuckV1DeliverySpec, DeliverySpec as DevKnativeEventingPkgApisDuckV1DeliverySpec };