Commit Graph

12 Commits

Author SHA1 Message Date
douxu 82622d0d85 refactor: add generic helpers and type-safe TypedMap wrapper
- add util.TypedMap, a generic wrapper over sync.Map to drop call-site type assertions
  - add generic util.MapSlice and reuse it in ConvertZSetMembersToFloat64
  - make GetKeysFromSet/SliceToSet/RemoveTargetsFromSliceSimple/DeduplicateAndReportDuplicates generic
  - migrate graphOverview to util.TypedMap[int64, *Graph]
  - build redis suggestions via util.MapSlice in measurement group recommend
2026-06-16 16:15:28 +08:00
douxu 57d1111a83 refactor: modernize Go idioms and add MongoDB K8s manifests
- replace interface{} with any across ~30 files for Go 1.18+ style
  - adopt for-range-over-int loops in place of explicit index loops
  - use maps.Copy from stdlib to replace manual map copy loops
  - use min() builtin for exponential backoff delay cap in retry_manager
  - add MongoDB 7.0 K8s manifests (StatefulSet, Service, PVC, Secret)
  - document PostgreSQL and MongoDB deploy steps in deploy.md with SSH tunnel port mappings
2026-05-29 14:28:58 +08:00
douxu 1b1f43db7f feat: implement topology analysis async task with BFS connectivity check
- add TopologyAnalysisHandler.Execute() with 5-phase BFS reachability
    check between start/end component UUIDs; support CheckInService flag
    to skip out-of-service nodes during traversal
  - carry task params through RabbitMQ message (TaskQueueMessage.Params)
    instead of re-querying DB in handler; update TaskHandler.Execute
    interface and all handler signatures accordingly
  - fix BuildMultiBranchTree UUIDFrom condition bug; return nodeMap for
    O(1) lookup; add QueryTopologicByStartUUID for directed traversal
  - add QueryBayByUUID/QueryBaysByUUIDs and
    QueryComponentsInServiceByUUIDs (two-column select) to database layer
  - add diagram.FindPath via LCA algorithm for tree path reconstruction
  - move initTracerProvider to middleware.InitTracerProvider; add
    OtelConfig struct to ModelRTConfig for endpoint configuration
  - update topology analysis params to start/end_component_uuid +
    check_in_service; remove dead topology init code
2026-04-24 17:14:46 +08:00
douxu 655acf8e1e fix bug of circuit diagram load handler 2025-01-08 16:37:18 +08:00
douxu f48b527708 fix bug of circuit diagram load handler 2025-01-07 16:45:52 +08:00
douxu efc15c3b2d wirte demo code 2024-12-18 16:25:49 +08:00
douxu ebe86539d4 optimize circuit diagram update handler and preliminary completion of circuit diagram delete handler code writing 2024-12-04 15:57:11 +08:00
douxu 3899cda8ef preliminary completion of circuit diagram update handler code writing 2024-12-02 16:13:16 +08:00
douxu eba41890c6 complete model load api 2024-11-27 15:41:22 +08:00
douxu 42e7d02625 complete the function of loading topology information and circuit diagram information 2024-11-27 09:11:48 +08:00
douxu 945669c85e optimize topologic graph and add delete node func 2024-11-25 16:19:58 +08:00
douxu dd67dd5462 use new pg table struct implement circuit diagram loading function 2024-11-22 16:41:04 +08:00