teamgram-tool-services

Documents the tool services in Teamgram Server including idgen (Snowflake ID), status (online TTL), dfs (Minio file storage), and media (metadata/thumbnails).

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "teamgram-tool-services" with this command: npx skills add zhihang9978/teamgram-tool-services

工具服务:idgen / status / dfs / media

idgen(service.idgen)— ID 生成服务

配置

Name: service.idgen
ListenOn: 127.0.0.1:20660
Etcd:
  Key: service.idgen
NodeId: 1
SeqIDGen:
  - Host: 127.0.0.1:6379

用途

  • Snowflake/序列 ID 生成
  • 生成 message_id / photo_id / dialog_id 等
  • NodeId 配置用于分布式 Snowflake 避免 ID 冲突
  • 序列 ID 使用 Redis 原子递增

关键代码路径

  • app/service/idgen/

status(service.status)— 在线状态服务

配置

Name: service.status
ListenOn: 127.0.0.1:20670
Etcd:
  Key: service.status
Status:
  - Host: 127.0.0.1:6379
StatusExpire: 90

用途

  • 维护用户在线状态
  • 会话 TTL 管理(StatusExpire: 90秒)
  • 被 BFF 调用来判断用户是否在线
  • 被 session 调用来注册/注销在线会话

关键代码路径

  • app/service/status/

dfs(service.dfs)— 分布式文件存储

配置要点

  • gRPC 端口:20640
  • MiniHttp 端口:11701(HTTP 文件下载入口)
  • 后端存储:Minio

Minio Buckets

Bucket用途
documents文档文件
photos照片
videos视频
encryptedfiles加密文件

用途

  • 文件分片上传/下载
  • 通过 MiniHttp (0.0.0.0:11701) 提供 HTTP 下载入口
  • 被 BFF.files 模块调用

关键代码路径

  • app/service/dfs/

media(service.media)— 媒体处理服务

配置

Name: service.media
ListenOn: 127.0.0.1:20650
Etcd:
  Key: service.media
Mysql:
  DSN: root:@tcp(127.0.0.1:3306)/teamgram?charset=utf8mb4&parseTime=true
Cache:
  - Host: 127.0.0.1:6379
Dfs:
  Etcd:
    Key: service.dfs

用途

  • 媒体元数据管理
  • 缩略图生成与处理
  • 依赖 dfs 进行实际文件存取
  • 依赖 MySQL 存储元数据(documents/photos/photo_sizes/video_sizes 表)

关键代码路径

  • app/service/media/

文件上传下载完整链路

Client
  -> files.upload* / upload.getFile
  -> bff.files
       -> dfs 保存/获取 file parts
       -> media 生成缩略图/元数据
       -> db 写入 documents/photos/photo_sizes/...
  <- 返回 inputFile / fileLocation / document/photo

DFS
  - Minio buckets: documents/photos/videos/encryptedfiles
  - MiniHttp 0.0.0.0:11701 提供 HTTP 下载入口

服务依赖关系

bff.files → dfs (gRPC) → Minio (S3)
         → media (gRPC) → MySQL + dfs
idgen    → Redis (原子递增)
status   → Redis (TTL)

Source Code References

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Zoom

Zoom API integration with managed OAuth. Manage meetings, webinars, recordings, and user profiles. Use this skill when users want to schedule meetings, manag...

Registry SourceRecently Updated
General

Kleinanzeigen.de Helper

Erstelle und verwalte Verkaufsanzeigen speziell auf kleinanzeigen.de. Verwende diesen Skill wenn der Human sagt, er will etwas auf kleinanzeigen.de verkaufen...

Registry SourceRecently Updated
General

Poku

Sends and receives phone calls and messages (like SMS, WhatsApp, Slack), and reserves dedicated phone numbers using the Poku API. Example use cases: calling...

Registry SourceRecently Updated
General

IMAP/SMTP Email - Maddy Fix

Read and send email via IMAP/SMTP. Check for new/unread messages, fetch content, search mailboxes, mark as read/unread, and send emails with attachments. Sup...

Registry SourceRecently Updated