Skip to content

Commit 079e948

Browse files
committed
Add design for client factory
1 parent 0b8c774 commit 079e948

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

docs/design/client_factory.puml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
@startuml ClientFactory
2+
enum NationalClouds {
3+
+GERMANY
4+
+PUBLIC
5+
+US_GOV
6+
+CHINA
7+
}
8+
9+
class HttpClientFactory {
10+
-TIMEOUT: string
11+
-SDK_VERSION: string
12+
-BASE_URL: string
13+
-pipeline: MiddlewarePipeline
14+
15+
+__init__(session: Session, cloud: NationalClouds)
16+
+with_default_middleware(auth_provider: TokenCredential): Session
17+
+with_user_middleware(middleware: [Middleware]): Session
18+
}
19+
20+
21+
class Session {}
22+
23+
class GraphClient {
24+
-session: Session
25+
26+
+get()
27+
+post()
28+
+put()
29+
+patch()
30+
+delete()
31+
}
32+
33+
package "middleware" {
34+
class MiddlewarePipeline {}
35+
}
36+
37+
HttpClientFactory --> NationalClouds
38+
HttpClientFactory -right-> middleware
39+
HttpClientFactory --> Session
40+
41+
GraphClient -right-> HttpClientFactory
42+
43+
note right of Session: HTTPClient imported from requests
44+
@enduml

0 commit comments

Comments
 (0)