Skip to content

armgit / dbx

Public Imported from GitHub
0

25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。

797 B
Raw Blame
import type { MqExchangeInfo, MqExchangeType } from "@/types/mq";

/** Exchange types creatable through the RabbitMQ admin API. */
export const RABBITMQ_EXCHANGE_TYPES: MqExchangeType[] = ["direct", "fanout", "topic", "headers"];

/**
 * The default exchange has an empty name; display it as "(AMQP default)" in
 * the list, the same way the RabbitMQ management UI does.
 */
export function rabbitMqExchangeDisplayName(exchange: Pick<MqExchangeInfo, "name">): string {
  return exchange.name || "(AMQP default)";
}

/**
 * Built-in exchanges (the default exchange and the amq.* set) must not be
 * deleted from the console.
 */
export function isBuiltinRabbitMqExchange(exchange: MqExchangeInfo): boolean {
  return exchange.name === "" || exchange.name.startsWith("amq.") || exchange.internal;
}