import { IDevKnativePkgApisDuckV1KReference } from "../../duck.knative.dev/v1/KReference.js"; import { IDevKnativeEventingPkgApisDuckV1DeliverySpec } from "../../duck.knative.dev/v1/DeliverySpec.js"; import { IDevKnativePkgApisDuckV1Destination } from "../../duck.knative.dev/v1/Destination.js"; import { ModelData, Model } from "@kubernetes-models/base"; /** * SubscriptionSpec specifies the Channel for incoming events, a Subscriber target * for processing those events and where to put the result of the processing. Only * From (where the events are coming from) is always required. You can optionally * only Process the events (results in no output events) by leaving out the Reply. * You can also perform an identity transformation on the incoming events by leaving * out the Subscriber and only specifying Reply. * * The following are all valid specifications: * channel --[subscriber]--> reply * Sink, no outgoing events: * channel -- subscriber * no-op function (identity transformation): * channel --> reply */ export interface ISubscriptionSpec { /** * Reference to a channel that will be used to create the subscription * You can specify only the following fields of the KReference: * - Kind * - APIVersion * - Name * - Namespace * The resource pointed by this KReference must meet the * contract to the ChannelableSpec duck type. If the resource does not * meet this contract it will be reflected in the Subscription's status. * * This field is immutable. We have no good answer on what happens to * the events that are currently in the channel being consumed from * and what the semantics there should be. For now, you can always * delete the Subscription and recreate it to point to a different * channel, giving the user more control over what semantics should * be used (drain the channel first, possibly have events dropped, * etc.) */ "channel": IDevKnativePkgApisDuckV1KReference; /** * Delivery configuration */ "delivery"?: IDevKnativeEventingPkgApisDuckV1DeliverySpec; /** * Reply specifies (optionally) how to handle events returned from * the Subscriber target. */ "reply"?: IDevKnativePkgApisDuckV1Destination; /** * Subscriber is reference to function for processing events. * Events from the Channel will be delivered here and replies are * sent to a Destination as specified by the Reply. */ "subscriber"?: IDevKnativePkgApisDuckV1Destination; } /** * SubscriptionSpec specifies the Channel for incoming events, a Subscriber target * for processing those events and where to put the result of the processing. Only * From (where the events are coming from) is always required. You can optionally * only Process the events (results in no output events) by leaving out the Reply. * You can also perform an identity transformation on the incoming events by leaving * out the Subscriber and only specifying Reply. * * The following are all valid specifications: * channel --[subscriber]--> reply * Sink, no outgoing events: * channel -- subscriber * no-op function (identity transformation): * channel --> reply */ export declare class SubscriptionSpec extends Model implements ISubscriptionSpec { "channel": IDevKnativePkgApisDuckV1KReference; "delivery"?: IDevKnativeEventingPkgApisDuckV1DeliverySpec; "reply"?: IDevKnativePkgApisDuckV1Destination; "subscriber"?: IDevKnativePkgApisDuckV1Destination; constructor(data?: ModelData); } export type { ISubscriptionSpec as IDevKnativeEventingPkgApisMessagingV1SubscriptionSpec, SubscriptionSpec as DevKnativeEventingPkgApisMessagingV1SubscriptionSpec };