Interface IScheduleStore

Schedule Store API

interface IScheduleStore {
    create(id, ikey, description, cron, tags, promiseId, promiseTimeout, promiseHeaders, promiseData, promiseTags): Promise<Schedule>;
    delete(id): Promise<void>;
    get(id): Promise<Schedule>;
    search(id, tags, limit?): AsyncGenerator<Schedule[], void, unknown>;
}

Implemented by

Methods

  • Creates a new schedule.

    Parameters

    • id: string

      Unique identifier for the schedule.

    • ikey: undefined | string

      Idempotency key associated with the create operation.

    • description: undefined | string

      Description of the schedule.

    • cron: string

      CRON expression defining the schedule's execution time.

    • tags: undefined | Record<string, string>

      Key-value pairs associated with the schedule.

    • promiseId: string

      Unique identifier for the associated promise.

    • promiseTimeout: number

      Timeout for the associated promise in milliseconds.

    • promiseHeaders: undefined | Record<string, string>

      Headers associated with the promise data.

    • promiseData: undefined | string

      Encoded data for the promise of type string.

    • promiseTags: undefined | Record<string, string>

      Key-value pairs associated with the promise.

    Returns Promise<Schedule>

    A Promise resolving to the created schedule.

  • Deletes a schedule based on its id.

    Parameters

    • id: string

      Unique identifier for the promise to be deleted.

    Returns Promise<void>

    A promise schedule that is pending, canceled, resolved, or rejected.

  • Retrieves a schedule based on its id.

    Parameters

    • id: string

      Unique identifier for the promise to be retrieved.

    Returns Promise<Schedule>

    A promise schedule that is pending, canceled, resolved, or rejected.

  • Search for schedules.

    Parameters

    • id: string

      Ids to match, can include wildcards.

    • tags: undefined | Record<string, string>

      Tags to match.

    • Optional limit: number

    Returns AsyncGenerator<Schedule[], void, unknown>

    A list of promise schedules.