Skip to content

Commit

Permalink
tweak manage-balanacer-connections-class for legibility (#420)
Browse files Browse the repository at this point in the history
> [!CAUTION]
> DO NOT merge yourself, this will be auto merged upon approval
  • Loading branch information
dyc3 authored Apr 17, 2024
1 parent 6d4afa6 commit d716f70
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
28 changes: 14 additions & 14 deletions figures/manage-balanacer-connections-class.mmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ classDiagram
class BalancerManager {
- balancerConnections: BalancerConnection[]
- bus: EventEmitter
+ addBalancerConnection(conn): void
+ addBalancerConnection(conn)
+ getConnection(id): BalancerConnection | undefined
- onBalancerConnect(conn): void
- onBalancerDisconnect(conn, code, reason): void
- onBalancerMessage(conn, message): void
- onBalancerError(conn, error): void
+ on(event, handler): void
- emit(event, ...args): void
- onBalancerConnect(conn)
- onBalancerDisconnect(conn, code, reason)
- onBalancerMessage(conn, message)
- onBalancerError(conn, error)
+ on(event, handler)
- emit(event, ...args)
}

class BalancerConnection {
Expand All @@ -22,26 +22,26 @@ classDiagram
- bus: EventEmitter
+ send(message): Result<void, Error>
+ disconnect(): Result<void, Error>
- emit(event, ...args): void
+ on(event, handler): void
- emit(event, ...args)
+ on(event, handler)
}

class BalancerConnectionReal {
- socket: WebSocket
+ readyState: number
+ send(message): Result<void, Error>
- onSocketConnect(event): void
- onSocketDisconnect(code, reason): void
- onSocketMessage(data): void
- onSocketError(event): void
- onSocketConnect(event)
- onSocketDisconnect(code, reason)
- onSocketMessage(data)
- onSocketError(event)
}

class EventEmitter {

}

class WebSocket {

}

Monolith "1" --o "*" BalancerManager : contains
Expand Down
Loading

0 comments on commit d716f70

Please sign in to comment.