Skip to main content
Version: 3.0

LocalEventManager

Hierarchy

  • EventManager
    • LocalEventManager

Index

Constructors

constructor

  • new LocalEventManager(config?: Configuration): LocalEventManager
  • Parameters

    • config: Configuration = ...

    Returns LocalEventManager

Properties

readonlyconfig

config: Configuration = ...

Methods

close

  • close(): Promise<void>
  • Clears the internal persistState event interval. This is automatically called at the end of crawler.run().


    Returns Promise<void>

emit

  • emit(event: EventTypeName, ...args: unknown[]): void
  • Parameters

    • event: EventTypeName
    • rest...args: unknown[]

    Returns void

init

  • init(): Promise<void>
  • Initializes the EventManager and sets up periodic systemInfo and persistState events. This is automatically called at the beginning of crawler.run().


    Returns Promise<void>

isInitialized

  • isInitialized(): boolean
  • Returns boolean

off

  • off(event: EventTypeName, listener?: (...args: any[]) => any): void
  • Parameters

    • event: EventTypeName
    • optionallistener: (...args: any[]) => any

      Returns void

    on

    • on(event: EventTypeName, listener: (...args: any[]) => any): void
    • Parameters

      • event: EventTypeName
      • listener: (...args: any[]) => any

        Returns void