Class DeployWatcher

Represents a deploy watcher responsible for monitoring deploy events.

This struct allows clients to subscribe to deploy events, start watching for events, or wait for an event and handle the received deploy event data.

Fields

  • events_url - The URL for deploy events.
  • deploy_subscriptions - Vector containing deploy subscriptions.
  • active - Reference-counted cell indicating whether the deploy watcher is active.
  • timeout_duration - Duration representing the optional timeout for watching events.

Constructors

  • Creates a new DeployWatcher instance.

    Arguments

    • events_url - The URL for deploy events.
    • timeout_duration - Optional duration in milliseconds for watching events. If not provided, a default timeout of 60,000 milliseconds (1 minute) is used.

    Returns

    A new DeployWatcher instance.

    Parameters

    • events_url: string
    • Optionaltimeout_duration: bigint

    Returns DeployWatcher

Methods

  • Returns void

  • Starts watching for deploy events (JavaScript-friendly).

    Returns

    Result containing the serialized deploy events data or an error message.

    Returns Promise<any>

  • Stops watching for deploy events.

    This method sets the deploy watcher as inactive and stops the event listener if it exists.

    Returns void

  • Subscribes to deploy events.

    Arguments

    • deploy_subscriptions - Vector of deploy subscriptions to be added.

    Returns

    Result indicating success or an error message.

    Parameters

    Returns void

  • Unsubscribes from deploy events based on the provided deploy hash.

    Arguments

    • deploy_hash - The deploy hash to unsubscribe.

    This method removes the deploy subscription associated with the provided deploy hash.

    Parameters

    • deploy_hash: string

    Returns void