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
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,15 @@
- **Feature:** Add new field `AltPort` to `ActiveHealthCheck`
- **Feature:** Add new field `Tls` to `HttpHealthCheck`
- **Breaking change:** Renamed `TargetPoolTlsConfig` to `TlsConfig`
- `loadbalancer`: [v1.8.0](services/loadbalancer/CHANGELOG.md#v180)
- **Feature:** Add new fields `AltPort` and `HttpHealthCheck` to `ActiveHealthCheck`
- `loadbalancer`:
- [v1.8.0](services/loadbalancer/CHANGELOG.md#v180)
- **Feature:** Add new fields `AltPort` and `HttpHealthCheck` to `ActiveHealthCheck`
- [v1.9.0](services/loadbalancer/CHANGELOG.md#v190)
- **Feature:** Introduction of multi API version support for the loadbalancer SDK module. For more details please see the announcement on GitHub: https://github.com/stackitcloud/stackit-sdk-go/discussions/5062
- `v1api`: New package which can be used for communication with the loadbalancer v1 API
- `v2api`: New package which can be used for communication with the loadbalancer v2 API
- **Deprecation:** The contents in the root of this SDK module including the `wait` package are marked as deprecated and will be removed after 2026-09-30. Switch to the new packages for the available API versions instead.
- **Dependencies:** Bump STACKIT SDK core module from `v0.21.1` to `v0.22.0`
- `resourcemanager`: [v0.19.0](services/resourcemanager/CHANGELOG.md#v0190)
- **Feature:** Introduction of multi API version support for the resourcemanager SDK module. For more details please see the announcement on GitHub: https://github.com/stackitcloud/stackit-sdk-go/discussions/5062
- `v0api`: New package which should be used for communication with the STACKIT Resourcemanager API in the future
Expand Down
5 changes: 4 additions & 1 deletion examples/loadbalancer/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ module github.com/stackitcloud/stackit-sdk-go/examples/loadbalancer

go 1.21

// This is not needed in production. This is only here to point the golangci linter to the local version instead of the last release on GitHub.
replace github.com/stackitcloud/stackit-sdk-go/services/loadbalancer => ../../services/loadbalancer

require (
github.com/stackitcloud/stackit-sdk-go/core v0.21.1
github.com/stackitcloud/stackit-sdk-go/core v0.22.0
github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.7.3
)

Expand Down
6 changes: 2 additions & 4 deletions examples/loadbalancer/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@ github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/stackitcloud/stackit-sdk-go/core v0.21.1 h1:Y/PcAgM7DPYMNqum0MLv4n1mF9ieuevzcCIZYQfm3Ts=
github.com/stackitcloud/stackit-sdk-go/core v0.21.1/go.mod h1:osMglDby4csGZ5sIfhNyYq1bS1TxIdPY88+skE/kkmI=
github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.7.3 h1:d/qIj+XNaqByVbLvwpWoA0Ekv0yrONWyNswg4/jGX7Y=
github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.7.3/go.mod h1:ClPE4TOM1FeaJiwTXvApq4gWaSgTLq6nU3PPHAIQDN4=
github.com/stackitcloud/stackit-sdk-go/core v0.22.0 h1:6rViz7GnNwXSh51Lur5xuDzO8EWSZfN9J0HvEkBKq6c=
github.com/stackitcloud/stackit-sdk-go/core v0.22.0/go.mod h1:osMglDby4csGZ5sIfhNyYq1bS1TxIdPY88+skE/kkmI=
24 changes: 12 additions & 12 deletions examples/loadbalancer/loadbalancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"

"github.com/stackitcloud/stackit-sdk-go/core/utils"
"github.com/stackitcloud/stackit-sdk-go/services/loadbalancer"
loadbalancer "github.com/stackitcloud/stackit-sdk-go/services/loadbalancer/v2api"
)

func main() {
Expand All @@ -23,15 +23,15 @@ func main() {
}

// List the load balancer instances for your project
listInstancesResp, err := loadbalancerClient.ListLoadBalancers(context.Background(), projectId, region).Execute()
listInstancesResp, err := loadbalancerClient.DefaultAPI.ListLoadBalancers(context.Background(), projectId, region).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ListLoadBalancers`: %v\n", err)
os.Exit(1)
}
if listInstancesResp.LoadBalancers == nil {
fmt.Printf("Current project does not have any load balancer instances.\n")
} else {
lbs := *listInstancesResp.LoadBalancers
lbs := listInstancesResp.LoadBalancers
fmt.Printf("Number of instances: %v\n", len(lbs))
}

Expand All @@ -41,25 +41,25 @@ func main() {
Options: &loadbalancer.LoadBalancerOptions{
PrivateNetworkOnly: utils.Ptr(true),
},
Networks: &[]loadbalancer.Network{
Networks: []loadbalancer.Network{
{
NetworkId: utils.Ptr("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),
Role: utils.Ptr(loadbalancer.NETWORKROLE_LISTENERS_AND_TARGETS),
Role: utils.Ptr("ROLE_LISTENERS_AND_TARGETS"),
},
},
Listeners: &[]loadbalancer.Listener{
Listeners: []loadbalancer.Listener{
{
DisplayName: utils.Ptr("example-listener"),
Port: utils.Ptr(int64(1)),
Protocol: utils.Ptr(loadbalancer.LISTENERPROTOCOL_TCP),
Port: utils.Ptr(int32(1)),
Protocol: utils.Ptr("PROTOCOL_TCP"),
TargetPool: utils.Ptr("example-target-pool"),
},
},
TargetPools: &[]loadbalancer.TargetPool{
TargetPools: []loadbalancer.TargetPool{
{
Name: utils.Ptr("example-target-pool"),
TargetPort: utils.Ptr(int64(1)),
Targets: &[]loadbalancer.Target{
TargetPort: utils.Ptr(int32(1)),
Targets: []loadbalancer.Target{
{
DisplayName: utils.Ptr("example-target"),
Ip: utils.Ptr("x.x.x.x"),
Expand All @@ -68,7 +68,7 @@ func main() {
},
},
}
createLoadBalancerRes, err := loadbalancerClient.CreateLoadBalancer(context.Background(), projectId, region).CreateLoadBalancerPayload(createLoadBalancerPayload).XRequestID("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx").Execute()
createLoadBalancerRes, err := loadbalancerClient.DefaultAPI.CreateLoadBalancer(context.Background(), projectId, region).CreateLoadBalancerPayload(createLoadBalancerPayload).XRequestID("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx").Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CreateLoadBalancer`: %v\n", err)
os.Exit(1)
Expand Down
7 changes: 7 additions & 0 deletions services/loadbalancer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## v1.9.0
- **Feature:** Introduction of multi API version support for the loadbalancer SDK module. For more details please see the announcement on GitHub: https://github.com/stackitcloud/stackit-sdk-go/discussions/5062
- `v1api`: New package which can be used for communication with the loadbalancer v1 API
- `v2api`: New package which can be used for communication with the loadbalancer v2 API
- **Deprecation:** The contents in the root of this SDK module including the `wait` package are marked as deprecated and will be removed after 2026-09-30. Switch to the new packages for the available API versions instead.
- **Dependencies:** Bump STACKIT SDK core module from `v0.21.1` to `v0.22.0`

## v1.8.0
- **Feature:** Add new fields `AltPort` and `HttpHealthCheck` to `ActiveHealthCheck`

Expand Down
2 changes: 1 addition & 1 deletion services/loadbalancer/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.8.0
v1.9.0
Loading
Loading