dbos-golang
بناء تطبيقات Go موثوقة مع DBOS
يوفر DBOS Go SDK تنفيذًا متينًا لسير العمل يقاوم ��لأعطال وإعادة التشغيل. ابنِ تطبيقات متسامحة مع الأخطاء مع إعادة المحاولة التلقائية، والتزامن القائم على الطوابير، وضمانات المعاملات.
下載技能 ZIP
在 Claude 中上傳
前往 設定 → 功能 → 技能 → 上傳技能
開啟並開始使用
測試它
正在使用「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
安全審計
安全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.
品質評分
你能建構什麼
بناء معالجة أوامر متسامحة مع الأخطاء
إنشاء سير عمل لمعالجة الطلبات يعيد المحاولة تلقائيًا عند الفشل، وينجو من إعادة تشغيل الخادم، ويحافظ على اتساق المعاملات عبر خدمات متعددة.
تنفيذ خطوط بيانات موثوقة
بناء خطوط بيانات مع تنفيذ متين يحفظ التقدم في قاعدة البيانات، مما يضمن عدم فقدان البيانات أثناء الأعطال.
إنشاء أنظمة مهام خلفية
استبدال طوابير المهام المخصصة بطوابير DBOS التي توفر حدود التزامن المدمجة، والتعامل مع الأولويات، والاسترداد التلقائي.
試試這些提示
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