Skip to main content
Glama
IUrlQueue.ts1.38 kB
/** * Interface for URL queue management. * Implementations track URLs to be crawled, visited URLs, * and provide methods for queue management. */ export interface IUrlQueue { /** * Add a URL to the queue with its depth level * @param url The URL to add * @param depth The depth level of the URL */ add(url: string, depth: number): void; /** * Add multiple URLs to the queue in bulk * @param urls Array of URL and depth pairs to add */ addBulk(urls: Array<{url: string, depth: number}>): void; /** * Get the next URL to process from the queue * @returns The next URL and its depth, or null if the queue is empty */ getNext(): {url: string, depth: number} | null; /** * Check if a URL is in the queue * @param url The URL to check * @returns True if the URL is in the queue */ has(url: string): boolean; /** * Get the number of URLs in the queue * @returns The queue size */ size(): number; /** * Mark a URL as visited * @param url The URL to mark as visited */ markVisited(url: string): void; /** * Check if a URL has been visited * @param url The URL to check * @returns True if the URL has been visited */ isVisited(url: string): boolean; /** * Get the number of visited URLs * @returns The visited URL count */ visitedCount(): number; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/visheshd/docmcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server