Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leverage "Component" to model service endpoints #538

Merged
merged 3 commits into from
Oct 14, 2023
Merged

Leverage "Component" to model service endpoints #538

merged 3 commits into from
Oct 14, 2023

Conversation

raphael
Copy link
Member

@raphael raphael commented Oct 14, 2023

Remove Endpoint/Calls in favor of Component

Components can be used to represent endpoints:

Container("Web Application", "Delivers content to users.", func() {
        Component("Dashboard Endpoint", "Serve dashboard content.", func() {
                Tag("endpoint")
        })
        Uses("Application Database", "Reads from and writes to", "MySQL", Synchronous)
})

Uses can target the endpoint alleviating the need for Calls:

Container("Load Balancer", "Distributes requests across the Web Application instances.", func() {
        Uses("Web Application/Dashboard Endpoint", "Routes requests to", "HTTPS", Synchronous)
})

Components can be used to represent endpoints:

```go
		Container("Web Application", "Delivers content to users.", func() {
			Component("Dashboard Endpoint", "Serve dashboard content.", func() {
				Tag("endpoint")
			})
			Uses("Application Database", "Reads from and writes to", "MySQL", Synchronous)
		})
```
`Uses` can target the endpoint alleviating the need for `Calls`:
```go
		Container("Load Balancer", "Distributes requests across the Web Application instances.", func() {
			Uses("Web Application/Dashboard Endpoint", "Routes requests to", "HTTPS", Synchronous)
		})
```
@raphael raphael changed the title Leverage Component to mode endpoints Leverage "Component" to model service endpoints Oct 14, 2023
@raphael raphael merged commit e9f3cc2 into main Oct 14, 2023
7 checks passed
@raphael raphael deleted the endpoint branch October 14, 2023 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant