import { GenericClass, GroupVersionKind } from "kubernetes-fluent-client"; import { PeprStore, Storage } from "./storage"; import { Schedule } from "./schedule"; import { Binding, CapabilityCfg, CapabilityExport, WhenSelector } from "../types"; /** * A capability is a unit of functionality that can be registered with the Pepr runtime. */ export declare class Capability implements CapabilityExport { #private; hasSchedule: boolean; /** * Run code on a schedule with the capability. * * @param schedule The schedule to run the code on * @returns */ OnSchedule: (schedule: Schedule) => void; getScheduleStore(): Storage; /** * Store is a key-value data store that can be used to persist data that should be shared * between requests. Each capability has its own store, and the data is persisted in Kubernetes * in the `pepr-system` namespace. * * Note: You should only access the store from within an action. */ Store: PeprStore; /** * ScheduleStore is a key-value data store used to persist schedule data that should be shared * between intervals. Each Schedule shares store, and the data is persisted in Kubernetes * in the `pepr-system` namespace. * * Note: There is no direct access to schedule store */ ScheduleStore: PeprStore; get bindings(): Binding[]; get name(): string; get description(): string; get namespaces(): string[]; constructor(cfg: CapabilityCfg); /** * Register the store with the capability. This is called automatically by the Pepr controller. */ registerScheduleStore: () => Storage; /** * Register the store with the capability. This is called automatically by the Pepr controller. * * @param store */ registerStore: () => Storage; /** * The When method is used to register a action to be executed when a Kubernetes resource is * processed by Pepr. The action will be executed if the resource matches the specified kind and any * filters that are applied. * * @param model the KubernetesObject model to match * @param kind if using a custom KubernetesObject not available in `a.*`, specify the GroupVersionKind * @returns */ When: (model: T, kind?: GroupVersionKind) => WhenSelector; } //# sourceMappingURL=capability.d.ts.map