Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 63 additions & 2 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2414,6 +2414,36 @@ SOFTWARE.

```

## github.com/fatih/structs

* Name: github.com/fatih/structs
* Version: v1.1.0
* License: [MIT](https://github.com/fatih/structs/blob/v1.1.0/LICENSE)

```
The MIT License (MIT)

Copyright (c) 2014 Fatih Arslan

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```

## github.com/felixge/httpsnoop

* Name: github.com/felixge/httpsnoop
Expand Down Expand Up @@ -5412,8 +5442,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
## github.com/knadh/koanf/maps

* Name: github.com/knadh/koanf/maps
* Version: v0.1.1
* License: [MIT](https://github.com/knadh/koanf/blob/maps/v0.1.1/maps/LICENSE)
* Version: v0.1.2
* License: [MIT](https://github.com/knadh/koanf/blob/maps/v0.1.2/maps/LICENSE)

```
The MIT License
Expand Down Expand Up @@ -5595,6 +5625,37 @@ THE SOFTWARE.

```

## github.com/knadh/koanf/providers/structs

* Name: github.com/knadh/koanf/providers/structs
* Version: v1.0.0
* License: [MIT](https://github.com/knadh/koanf/blob/providers/structs/v1.0.0/providers/structs/LICENSE)

```
The MIT License

Copyright (c) 2019, Kailash Nadh. https://github.com/knadh

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

```

## github.com/knadh/koanf/v2

* Name: github.com/knadh/koanf/v2
Expand Down
31 changes: 13 additions & 18 deletions api/apiv1/design/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,13 @@ var ClusterJoinToken = g.Type("ClusterJoinToken", func() {
g.Example("PGEDGE-dd440afcf5de20ef8e8cf54f6cb9f125fd55f90e64faa94b906130b31235e730-41e975f41d7ea61058f2fe2572cb52dd")
g.Meta("struct:tag:json", "token")
})
g.Attribute("server_url", g.String, func() {
g.Format(g.FormatURI)
g.Attribute("server_urls", g.ArrayOf(g.String), func() {
g.Description("Existing server to join")
g.Example("http://192.168.1.1:3000")
g.Meta("struct:tag:json", "server_url")
g.Example([]string{"http://192.168.1.1:3000"})
g.Meta("struct:tag:json", "server_urls")
})

g.Required("token", "server_url")
g.Required("token", "server_urls")
Comment thread
jason-lynch marked this conversation as resolved.
})

var ClusterJoinRequest = g.Type("ClusterJoinRequest", func() {
Expand All @@ -69,26 +68,22 @@ var ClusterJoinRequest = g.Type("ClusterJoinRequest", func() {
g.Example("host-1")
g.Meta("struct:tag:json", "host_id")
})
g.Attribute("hostname", g.String, func() {
g.Description("The hostname of the host that's joining the cluster.")
g.MinLength(3)
g.MaxLength(128)
g.Example("ip-10-1-0-113.ec2.internal")
g.Meta("struct:tag:json", "hostname")
})
g.Attribute("ipv4_address", g.String, func() {
g.Format(g.FormatIPv4)
g.Description("The IPv4 address of the host that's joining the cluster.")
g.Example("10.1.0.113")
g.Meta("struct:tag:json", "ipv4_address")
g.Attribute("addresses", g.ArrayOf(g.String), func() {
g.Description("The peer addresses of the host that's joining the cluster.")
g.Elem(func() {
g.MinLength(3)
g.MaxLength(128)
})
g.Example([]string{"10.1.0.113", "ip-10-1-0-113.ec2.internal"})
g.Meta("struct:tag:json", "addresses")
})
g.Attribute("embedded_etcd_enabled", g.Boolean, func() {
g.Description("True if the joining member is configured to run an embedded an etcd server.")
g.Example(true)
g.Meta("struct:tag:json", "embedded_etcd_enabled")
})

g.Required("embedded_etcd_enabled", "token", "host_id", "hostname", "ipv4_address")
g.Required("embedded_etcd_enabled", "token", "host_id", "addresses")
Comment thread
jason-lynch marked this conversation as resolved.
})

var EtcdClusterMember = g.Type("EtcdClusterMember", func() {
Expand Down
72 changes: 45 additions & 27 deletions api/apiv1/design/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -1447,9 +1447,11 @@ var ListDatabasesResponse = g.Type("ListDatabasesResponse", func() {
"instances": []map[string]any{
{
"connection_info": map[string]any{
"hostname": "i-0123456789abcdef.ec2.internal",
"ipv4_address": "10.24.34.2",
"port": 5432,
"addresses": []string{
"10.24.34.2",
"i-0123456789abcdef.ec2.internal",
},
"port": 5432,
},
"created_at": "2025-06-17T20:05:10Z",
"host_id": "us-east-1",
Expand Down Expand Up @@ -1482,9 +1484,11 @@ var ListDatabasesResponse = g.Type("ListDatabasesResponse", func() {
},
{
"connection_info": map[string]any{
"hostname": "i-058731542fee493f.ec2.internal",
"ipv4_address": "10.24.35.2",
"port": 5432,
"addresses": []string{
"10.24.35.2",
"i-058731542fee493f.ec2.internal",
},
"port": 5432,
},
"created_at": "2025-06-17T20:05:10Z",
"host_id": "ap-south-1",
Expand Down Expand Up @@ -1517,9 +1521,11 @@ var ListDatabasesResponse = g.Type("ListDatabasesResponse", func() {
},
{
"connection_info": map[string]any{
"hostname": "i-494027b7b53f6a23.ec2.internal",
"ipv4_address": "10.24.36.2",
"port": 5432,
"addresses": []string{
"10.24.36.2",
"i-494027b7b53f6a23.ec2.internal",
},
"port": 5432,
},
"created_at": "2025-06-17T20:05:10Z",
"host_id": "eu-central-1",
Expand Down Expand Up @@ -1560,9 +1566,11 @@ var ListDatabasesResponse = g.Type("ListDatabasesResponse", func() {
"instances": []map[string]any{
{
"connection_info": map[string]any{
"hostname": "i-0123456789abcdef.ec2.internal",
"ipv4_address": "10.24.34.2",
"port": 6432,
"addresses": []string{
"10.24.34.2",
"i-0123456789abcdef.ec2.internal",
},
"port": 6432,
},
"created_at": "2025-06-12T15:10:05Z",
"host_id": "us-east-1",
Expand Down Expand Up @@ -1595,9 +1603,11 @@ var ListDatabasesResponse = g.Type("ListDatabasesResponse", func() {
},
{
"connection_info": map[string]any{
"hostname": "i-058731542fee493f.ec2.internal",
"ipv4_address": "10.24.35.2",
"port": 6432,
"addresses": []string{
"10.24.35.2",
"i-058731542fee493f.ec2.internal",
},
"port": 6432,
},
"created_at": "2025-06-12T15:10:05Z",
"host_id": "ap-south-1",
Expand Down Expand Up @@ -1630,9 +1640,11 @@ var ListDatabasesResponse = g.Type("ListDatabasesResponse", func() {
},
{
"connection_info": map[string]any{
"hostname": "i-494027b7b53f6a23.ec2.internal",
"ipv4_address": "10.24.36.2",
"port": 6432,
"addresses": []string{
"10.24.36.2",
"i-494027b7b53f6a23.ec2.internal",
},
"port": 6432,
},
"created_at": "2025-06-12T15:10:05Z",
"host_id": "eu-central-1",
Expand Down Expand Up @@ -1678,9 +1690,11 @@ var exampleDatabase = map[string]any{
"instances": []map[string]any{
{
"connection_info": map[string]any{
"hostname": "i-0123456789abcdef.ec2.internal",
"ipv4_address": "10.24.34.2",
"port": 5432,
"addresses": []string{
"10.24.34.2",
"i-0123456789abcdef.ec2.internal",
},
"port": 5432,
},
"created_at": "2025-06-18T16:52:22Z",
"host_id": "us-east-1",
Expand Down Expand Up @@ -1713,9 +1727,11 @@ var exampleDatabase = map[string]any{
},
{
"connection_info": map[string]any{
"hostname": "i-058731542fee493f.ec2.internal",
"ipv4_address": "10.24.35.2",
"port": 5432,
"addresses": []string{
"10.24.35.2",
"i-058731542fee493f.ec2.internal",
},
"port": 5432,
},
"created_at": "2025-06-18T16:52:22Z",
"host_id": "ap-south-1",
Expand Down Expand Up @@ -1748,9 +1764,11 @@ var exampleDatabase = map[string]any{
},
{
"connection_info": map[string]any{
"hostname": "i-494027b7b53f6a23.ec2.internal",
"ipv4_address": "10.24.36.2",
"port": 5432,
"addresses": []string{
"10.24.36.2",
"i-494027b7b53f6a23.ec2.internal",
},
"port": 5432,
},
"created_at": "2025-06-18T16:52:22Z",
"host_id": "eu-central-1",
Expand Down
57 changes: 37 additions & 20 deletions api/apiv1/design/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,15 @@ var Host = g.Type("Host", func() {
g.Description("The cohort that this host belongs to.")
g.Meta("struct:tag:json", "cohort,omitempty")
})
g.Attribute("hostname", g.String, func() {
g.Description("The hostname of this host.")
g.Example("i-0123456789abcdef.ec2.internal")
g.Meta("struct:tag:json", "hostname")
g.Attribute("peer_addresses", g.ArrayOf(g.String), func() {
g.Description("The addresses that this host advertises to other hosts.")
g.Example([]string{"10.24.34.2", "i-0123456789abcdef.ec2.internal"})
g.Meta("struct:tag:json", "peer_addresses")
})
g.Attribute("ipv4_address", func() {
g.Description("The IPv4 address of this host.")
g.Format(g.FormatIPv4)
g.Example("10.24.34.2")
g.Meta("struct:tag:json", "ipv4_address")
g.Attribute("client_addresses", g.ArrayOf(g.String), func() {
g.Description("The addresses that this host advertises to client applications.")
g.Example([]string{"10.24.34.2", "i-0123456789abcdef.ec2.internal"})
g.Meta("struct:tag:json", "client_addresses")
})
Comment thread
jason-lynch marked this conversation as resolved.
g.Attribute("cpus", g.Int, func() {
g.Description("The number of CPUs on this host.")
Expand Down Expand Up @@ -156,8 +155,8 @@ var Host = g.Type("Host", func() {
"id",
"orchestrator",
"data_dir",
"hostname",
"ipv4_address",
"peer_addresses",
"client_addresses",
"status",
)
})
Expand All @@ -175,9 +174,15 @@ var HostsArrayExample = []map[string]any{
"postgres_version": "17.6",
"spock_version": "5",
},
"hostname": "i-0123456789abcdef.ec2.internal",
"id": "us-east-1",
"ipv4_address": "10.24.34.2",
"id": "us-east-1",
"peer_addresses": []string{
"10.24.34.2",
"i-0123456789abcdef.ec2.internal",
},
"client_addresses": []string{
"10.24.34.2",
"i-0123456789abcdef.ec2.internal",
},
"memory": "16GB",
"orchestrator": "swarm",
"data_dir": "/data",
Expand Down Expand Up @@ -214,9 +219,15 @@ var HostsArrayExample = []map[string]any{
"postgres_version": "17.6",
"spock_version": "5",
},
"hostname": "i-058731542fee493f.ec2.internal",
"id": "ap-south-1",
"ipv4_address": "10.24.35.2",
"id": "ap-south-1",
"peer_addresses": []string{
"10.24.35.2",
"i-058731542fee493f.ec2.internal",
},
"client_addresses": []string{
"10.24.35.2",
"i-058731542fee493f.ec2.internal",
},
"memory": "16GB",
"orchestrator": "swarm",
"data_dir": "/data",
Expand Down Expand Up @@ -253,9 +264,15 @@ var HostsArrayExample = []map[string]any{
"postgres_version": "17.6",
"spock_version": "5",
},
"hostname": "i-494027b7b53f6a23.ec2.internal",
"id": "eu-central-1",
"ipv4_address": "10.24.36.2",
"id": "eu-central-1",
"peer_addresses": []string{
"10.24.36.2",
"i-494027b7b53f6a23.ec2.internal",
},
"client_addresses": []string{
"10.24.36.2",
"i-494027b7b53f6a23.ec2.internal",
},
"memory": "16GB",
"orchestrator": "swarm",
"data_dir": "/data",
Expand Down
Loading