Skip to content

Instantly share code, notes, and snippets.

@ankona
Last active January 14, 2024 07:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ankona/810aa406100aff8e265a29fbab56ea46 to your computer and use it in GitHub Desktop.
Save ankona/810aa406100aff8e265a29fbab56ea46 to your computer and use it in GitHub Desktop.
sample mermaid diagram
%% https://mermaid.live/edit#pako:eNqlVd9r2zAQ_leEIJD-cGGvJuShzQobzQZLn4bBXORLKmKfjKQMQpf87ZMs25GXbE2pXyzdffru00l3euVCFchTLkowZiZhraHKaDRihdQorFTE7p8zelBl6aZKsyT5PWU_sJCmt2U0nLO7O4eZLedYKb17E_agiEKoCPoXag4EayyewWwi0ELSJvgfZYl-ltFJlIx_yji7TpJ21LjjAMGsesBXtfxMVtpdBArxh2TXbnRWcQBNesIgbDQiZZGtHCCG3oNBJsmiXoEIbihLJjqIyfhg7cnuGoLm-I5-9l2LFzRWg8cMuTIK4AB8zYi570bVSOMr9k0RtpY12rzCyliwxnlmUtjDwmpJ60OEEKVEsqU09gSz7yL1Ce2CBQgjqHBose58c1kMjcZi3RgdoV9iap-oOTqvMHnDLLHfSQjZ3IzW4r_JpE_xdHo03xj4hWPQa8NS9uQ2cXA5O8Rp2Mes3S2Lmd9JcXKjIqqkyV-POOTRwfWgKHIFdQQZoxPQp_oqaDmSRetqjTVoHBx342jJxm-rvyC3SY6NklhV7DU-kSnrqva_Iv4pe6BuWBoDhbD0xSDs4PBDBbgUdv3nbJZFqQxepuayJJ40xvgK5BcsP9Mw30dxrptGDK77J23t5SVsybUSndtdHe0yeWrtR0SswHeGpmy3dQHWJ2nhZl9opT5w0Ht_Tfgtr1BXIAv3aDWaM25f0DUSnrphAXrjm9ze4WBr1WJHgqdWb_GWBy3tG8fTFZTGWWugn0od5-5O-OpsX0X_2_8BWRxPSw
classDiagram
%% direction BT
Collector --|> RedisCollector
RedisCollector ..|> DbMemoryCollector
RedisCollector ..|> DbConnectionCollector
Collector ..|> ManagedTaskCollector
Sink ..|> FileSink
RedisCollector "1" *-- "1" Redis
Collector "1" o-- "1" JobEntity
CollectorManager "1" *-- "*" Collector
Collector "1" *-- "1" Sink
%%note for Collector "Base interface for all collectors"
%%note for RedisCollector "Base class for Redis Orchestrator collectors"
class Redis {
+open() None
+get_memstats() Dict~String~
+get_clientlist() Dict~String~
}
class JobEntity{
+String name
+String task_id
+String step_id
}
namespace Metrics_Entities {
class Sink {
<<interface>>
+save(args : List~str~) None
}
class FileSink {
+save(args : List~str~) None
}
class CollectorManager {
-Dict~Collector~_collectors
+map_collectors(e : JobEntity) List~Collector~
+prepare() None
+collect() None
}
class Collector {
<<interface>>
-_entity : JobEntity
-_sink : Sink
+collect() None
+prepare() None
}
class RedisCollector{
<<abstract>>
+Redis _connection
+close() None
+prepare() None
+collect() None
}
class DbMemoryCollector{
-_collect() None
}
class DbConnectionCollector{
-_collect() None
}
class ManagedTaskCollector{
%% -String _launcher_type
-Launcher _launcher
-_get_step_update() StepInfo
+collect() None
+prepare() None
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment