技能 dbos-golang
📦

dbos-golang

安全

بناء تطبيقات Go موثوقة مع DBOS

يوفر DBOS Go SDK تنفيذًا متينًا لسير العمل يقاوم ��لأعطال وإعادة التشغيل. ابنِ تطبيقات متسامحة مع الأخطاء مع إعادة المحاولة التلقائية، والتزامن القائم على الطوابير، وضمانات المعاملات.

支援: Claude Codex Code(CC)
🥈 77 白銀
1

下載技能 ZIP

2

在 Claude 中上傳

前往 設定 → 功能 → 技能 → 上傳技能

3

開啟並開始使用

測試它

正在使用「dbos-golang」。 Create a DBOS workflow that fetches data from an API, processes it, and stores results in a database.

預期結果:

  • Workflow registered with DBOS that handles the complete data pipeline
  • Steps defined for API fetch, data processing, and database storage
  • Automatic retry configuration for transient failures
  • Proper error handling that preserves workflow state on failure

正在使用「dbos-golang」。 How do I configure DBOS to use environment variables for database connection?

預期結果:

  • DBOS context configuration with DatabaseURL from environment
  • Proper environment variable naming (DBOS_SYSTEM_DATABASE_URL)
  • Example showing how to handle missing database configuration gracefully

安全審計

安全
v1 • 2/24/2026

This is a documentation skill for the DBOS Go SDK. All 479 static findings are false positives: the scanner incorrectly interprets markdown code blocks as shell commands, documentation URLs as hardcoded URLs, and environment variable access for database configuration as sensitive data exposure. No real security risks present.

32
已掃描檔案
2,062
分析行數
0
發現項
1
審計總數
未發現安全問題
審計者: claude

品質評分

45
架構
100
可維護性
87
內容
50
社群
100
安全
100
規範符合性

你能建構什麼

بناء معالجة أوامر متسامحة مع الأخطاء

إنشاء سير عمل لمعالجة الطلبات يعيد المحاولة تلقائيًا عند الفشل، وينجو من إعادة تشغيل الخادم، ويحافظ على اتساق المعاملات عبر خدمات متعددة.

تنفيذ خطوط بيانات موثوقة

بناء خطوط بيانات مع تنفيذ متين يحفظ التقدم في قاعدة البيانات، مما يضمن عدم فقدان البيانات أثناء الأعطال.

إنشاء أنظمة مهام خلفية

استبدال طوابير المهام المخصصة بطوابير DBOS التي توفر حدود التزامن المدمجة، والتعامل مع الأولويات، والاسترداد التلقائي.

試試這些提示

إضافة DBOS إلى تطبيق Go موجود
Add DBOS durable workflow execution to my existing Go application at [PATH]. I need to convert my current background job processing to use DBOS workflows with automatic retries.
إنشاء سير عمل مع خطوات
Create a DBOS workflow that processes user registrations. The workflow should send a welcome email (step 1), create a user account in the database (step 2), and schedule a follow-up task (step 3). Include proper error handling and retries.
تنفيذ طابور مع حدود
Implement a DBOS queue for processing API webhooks. The queue should handle up to 10 concurrent requests, prioritize critical webhooks, and implement rate limiting to prevent overwhelming downstream services.
إعداد اتصال سير العمل
Set up inter-workflow communication using DBOS events and messages. Workflow A should notify Workflow B when data processing completes, and Workflow C should stream progress updates to external monitors.

最佳實務

  • Always define side effects (API calls, database writes) as steps, not in the workflow body, to ensure determinism and automatic retries
  • Register all workflows and queues before calling dbos.Launch() - this is a hard requirement
  • Use queues with concurrency limits instead of goroutines for parallel workflow execution

避免

  • Starting or enqueueing workflows from within step functions - this breaks transactional guarantees
  • Using uncontrolled goroutines to start workflows instead of dbos.RunWorkflow or queues
  • Modifying global variables from workflows or steps - this violates durability guarantees

常見問題

What is DBOS?
DBOS (Database-Oriented Business Operating System) is a framework that provides durable workflow execution. Workflows automatically survive crashes and restarts because their state is stored in a PostgreSQL database.
Do I need a database to use DBOS?
Yes, DBOS requires a PostgreSQL database to store workflow state, checkpoints, and queue data. The database URL is configured via the DatabaseURL configuration option.
Can I call APIs from workflows?
Yes, but API calls must be made from steps (using dbos.RunAsStep), not directly in the workflow. This ensures proper retry handling and durability.
How do retries work in DBOS?
Steps automatically retry on failure. You can configure retry policies using step options. When a step fails, the workflow pauses and retries the step until it succeeds or reaches the retry limit.
Can workflows communicate with each other?
Yes, DBOS provides events for one-way notifications, messages for request-response patterns, and streams for streaming data between workflows.
Is DBOS suitable for production use?
Yes, DBOS is designed for production workloads. It provides transactional guarantees, automatic recovery from failures, and supports patterns like versioning and patching for zero-downtime deployments.