diff --git a/.manifest.json b/.manifest.json index 92a8677..26d38ac 100644 --- a/.manifest.json +++ b/.manifest.json @@ -1,11 +1,11 @@ { - "liblabVersion": "2.5.0", - "date": "2024-10-01T05:13:59.417Z", + "liblabVersion": "2.5.1", + "date": "2024-10-04T04:24:19.790Z", "config": { "language": "go", - "apiId": 1228, + "apiId": 1252, "sdkName": "salad-cloud-sdk", - "sdkVersion": "0.9.0-alpha.4", + "sdkVersion": "0.9.0-alpha.5", "liblabVersion": "2", "deliveryMethods": ["zip"], "languages": ["go"], @@ -27,7 +27,7 @@ "homepage": "https://github.com/saladtechnologies/salad-cloud-sdk-dotnet", "ignoreFiles": [".gitignore", "./LICENSE"], "liblabVersion": "2", - "sdkVersion": "0.9.0-alpha.4", + "sdkVersion": "0.9.0-alpha.5", "targetBranch": "main" }, "go": { @@ -35,7 +35,7 @@ "githubRepoName": "salad-cloud-sdk-go", "ignoreFiles": [".gitignore", "./LICENSE"], "liblabVersion": "2", - "sdkVersion": "0.9.0-alpha.4", + "sdkVersion": "0.9.0-alpha.5", "targetBranch": "main" }, "java": { @@ -59,7 +59,7 @@ "homepage": "https://github.com/saladtechnologies/salad-cloud-sdk-java", "ignoreFiles": [".gitignore", "./LICENSE"], "liblabVersion": "2", - "sdkVersion": "0.9.0-alpha.5", + "sdkVersion": "0.9.0-alpha.6", "targetBranch": "main" }, "python": { @@ -102,7 +102,7 @@ "githubRepoName": "salad-cloud-sdk-python", "ignoreFiles": [".gitignore", "./LICENSE"], "liblabVersion": "2", - "sdkVersion": "0.9.0-alpha.4", + "sdkVersion": "0.9.0-alpha.5", "targetBranch": "main" }, "terraform": { @@ -139,7 +139,7 @@ "homepage": "https://github.com/saladtechnologies/salad-cloud-sdk-javascript", "ignoreFiles": [".gitignore", "./LICENSE"], "liblabVersion": "2", - "sdkVersion": "0.9.0-alpha.5", + "sdkVersion": "0.9.0-alpha.6", "targetBranch": "main", "generateEnumAs": "enum" } @@ -234,7 +234,7 @@ } ], "apiName": "SaladCloud API", - "apiVersion": "0.9.0-alpha.4", + "apiVersion": "0.9.0-alpha.5", "authentication": { "apiKey": { "header": "Salad-Api-Key" @@ -385,7 +385,6 @@ "documentation/models/container_restart_policy.md", "documentation/models/container_group_state.md", "documentation/models/country_code.md", - "documentation/models/container_group_networking.md", "documentation/models/container_group_liveness_probe.md", "documentation/models/container_group_readiness_probe.md", "documentation/models/container_group_startup_probe.md", @@ -402,7 +401,6 @@ "documentation/models/container_group_probe_exec.md", "documentation/models/container_probe_http_scheme.md", "documentation/models/container_group_probe_http_headers_2.md", - "documentation/models/create_container_group_networking.md", "documentation/models/update_container_group_networking.md", "documentation/models/workload_error.md", "documentation/models/container_groups_quotas.md", @@ -418,6 +416,8 @@ "documentation/models/container_group_instance.md", "documentation/models/queue_job.md", "documentation/models/inference_endpoint_job.md", + "documentation/models/container_group_networking.md", + "documentation/models/create_container_group_networking.md", "documentation/models/queue_job_event.md", "documentation/models/inference_endpoint_job_event.md", "pkg/containergroups/container_group_list.go", @@ -440,7 +440,6 @@ "pkg/organizationdata/gpu_classes_list.go", "pkg/webhooksecretkey/webhook_secret_key.go", "pkg/shared/container_group_state.go", - "pkg/shared/container_group_networking.go", "pkg/shared/container_group_liveness_probe.go", "pkg/shared/container_group_readiness_probe.go", "pkg/shared/container_group_startup_probe.go", @@ -453,7 +452,6 @@ "pkg/shared/container_group_probe_grpc.go", "pkg/shared/container_group_probe_exec.go", "pkg/shared/container_group_probe_http_headers_2.go", - "pkg/containergroups/create_container_group_networking.go", "pkg/containergroups/update_container_group_networking.go", "pkg/workloaderrors/workload_error.go", "pkg/quotas/container_groups_quotas.go", @@ -466,6 +464,8 @@ "pkg/containergroups/container_group_instance.go", "pkg/queues/queue_job.go", "pkg/inferenceendpoints/inference_endpoint_job.go", + "pkg/shared/container_group_networking.go", + "pkg/containergroups/create_container_group_networking.go", "pkg/queues/queue_job_event.go", "pkg/inferenceendpoints/inference_endpoint_job_event.go", "pkg/inferenceendpoints/inference_endpoints_service.go", diff --git a/README.md b/README.md index ac97295..29847a0 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -# SaladCloudSdk Go SDK 0.9.0-alpha.4 +# SaladCloudSdk Go SDK 0.9.0-alpha.5 Welcome to the SaladCloudSdk SDK documentation. This guide will help you get started with integrating and using the SaladCloudSdk SDK in your project. ## Versions -- API version: `0.9.0-alpha.4` -- SDK version: `0.9.0-alpha.4` +- API version: `0.9.0-alpha.5` +- SDK version: `0.9.0-alpha.5` ## About the API diff --git a/documentation/models/container_group_networking.md b/documentation/models/container_group_networking.md index 1326025..1ff166a 100644 --- a/documentation/models/container_group_networking.md +++ b/documentation/models/container_group_networking.md @@ -4,9 +4,22 @@ Represents container group networking parameters **Properties** -| Name | Type | Required | Description | -| :------- | :--------------------------------- | :------- | :---------- | -| Protocol | shared.ContainerNetworkingProtocol | ✅ | | -| Port | int64 | ✅ | | -| Auth | bool | ✅ | | -| Dns | string | ✅ | | +| Name | Type | Required | Description | +| :-------------------- | :------------------------------------------ | :------- | :---------- | +| Protocol | shared.ContainerNetworkingProtocol | ✅ | | +| Port | int64 | ✅ | | +| Auth | bool | ✅ | | +| Dns | string | ✅ | | +| LoadBalancer | shared.ContainerGroupNetworkingLoadBalancer | ❌ | | +| SingleConnectionLimit | bool | ❌ | | +| ClientRequestTimeout | int64 | ❌ | | +| ServerResponseTimeout | int64 | ❌ | | + +# ContainerGroupNetworkingLoadBalancer + +**Properties** + +| Name | Type | Required | Description | +| :-------------------------- | :----- | :------- | :---------------------------- | +| round_robin | string | ✅ | "round_robin" | +| least_number_of_connections | string | ✅ | "least_number_of_connections" | diff --git a/documentation/models/create_container_group_networking.md b/documentation/models/create_container_group_networking.md index 0b85a84..82dd74a 100644 --- a/documentation/models/create_container_group_networking.md +++ b/documentation/models/create_container_group_networking.md @@ -4,8 +4,21 @@ Represents container group networking parameters **Properties** -| Name | Type | Required | Description | -| :------- | :--------------------------------- | :------- | :---------- | -| Protocol | shared.ContainerNetworkingProtocol | ✅ | | -| Port | int64 | ✅ | | -| Auth | bool | ✅ | | +| Name | Type | Required | Description | +| :-------------------- | :--------------------------------------------------------- | :------- | :---------- | +| Protocol | shared.ContainerNetworkingProtocol | ✅ | | +| Port | int64 | ✅ | | +| Auth | bool | ✅ | | +| LoadBalancer | containergroups.CreateContainerGroupNetworkingLoadBalancer | ❌ | | +| SingleConnectionLimit | bool | ❌ | | +| ClientRequestTimeout | int64 | ❌ | | +| ServerResponseTimeout | int64 | ❌ | | + +# CreateContainerGroupNetworkingLoadBalancer + +**Properties** + +| Name | Type | Required | Description | +| :-------------------------- | :----- | :------- | :---------------------------- | +| round_robin | string | ✅ | "round_robin" | +| least_number_of_connections | string | ✅ | "least_number_of_connections" | diff --git a/documentation/models/update_container_group.md b/documentation/models/update_container_group.md index a7c0237..6920873 100644 --- a/documentation/models/update_container_group.md +++ b/documentation/models/update_container_group.md @@ -4,13 +4,14 @@ Represents a request to update a container group **Properties** -| Name | Type | Required | Description | -| :------------- | :--------------------------------------------- | :------- | :---------------------------------------------------------------------------------------------- | -| DisplayName | string | ❌ | | -| Container | containergroups.UpdateContainer | ❌ | Represents an update container object | -| Replicas | int64 | ❌ | | -| CountryCodes | []shared.CountryCode | ❌ | List of countries nodes must be located in. Remove this field to permit nodes from any country. | -| Networking | containergroups.UpdateContainerGroupNetworking | ❌ | Represents update container group networking parameters | -| LivenessProbe | shared.ContainerGroupLivenessProbe | ❌ | Represents the container group liveness probe | -| ReadinessProbe | shared.ContainerGroupReadinessProbe | ❌ | Represents the container group readiness probe | -| StartupProbe | shared.ContainerGroupStartupProbe | ❌ | Represents the container group startup probe | +| Name | Type | Required | Description | +| :-------------- | :--------------------------------------------- | :------- | :---------------------------------------------------------------------------------------------- | +| DisplayName | string | ❌ | | +| Container | containergroups.UpdateContainer | ❌ | Represents an update container object | +| Replicas | int64 | ❌ | | +| CountryCodes | []shared.CountryCode | ❌ | List of countries nodes must be located in. Remove this field to permit nodes from any country. | +| Networking | containergroups.UpdateContainerGroupNetworking | ❌ | Represents update container group networking parameters | +| LivenessProbe | shared.ContainerGroupLivenessProbe | ❌ | Represents the container group liveness probe | +| ReadinessProbe | shared.ContainerGroupReadinessProbe | ❌ | Represents the container group readiness probe | +| StartupProbe | shared.ContainerGroupStartupProbe | ❌ | Represents the container group startup probe | +| QueueAutoscaler | shared.QueueAutoscaler | ❌ | Represents the autoscaling rules for a queue | diff --git a/pkg/containergroups/create_container_group_networking.go b/pkg/containergroups/create_container_group_networking.go index 36cc2e8..c3e0e04 100644 --- a/pkg/containergroups/create_container_group_networking.go +++ b/pkg/containergroups/create_container_group_networking.go @@ -6,9 +6,13 @@ import ( // Represents container group networking parameters type CreateContainerGroupNetworking struct { - Protocol *shared.ContainerNetworkingProtocol `json:"protocol,omitempty" required:"true"` - Port *int64 `json:"port,omitempty" required:"true" min:"1" max:"65535"` - Auth *bool `json:"auth,omitempty" required:"true"` + Protocol *shared.ContainerNetworkingProtocol `json:"protocol,omitempty" required:"true"` + Port *int64 `json:"port,omitempty" required:"true" min:"1" max:"65535"` + Auth *bool `json:"auth,omitempty" required:"true"` + LoadBalancer *CreateContainerGroupNetworkingLoadBalancer `json:"load_balancer,omitempty"` + SingleConnectionLimit *bool `json:"single_connection_limit,omitempty"` + ClientRequestTimeout *int64 `json:"client_request_timeout,omitempty" min:"1" max:"100000"` + ServerResponseTimeout *int64 `json:"server_response_timeout,omitempty" min:"1" max:"100000"` } func (c *CreateContainerGroupNetworking) SetProtocol(protocol shared.ContainerNetworkingProtocol) { @@ -43,3 +47,54 @@ func (c *CreateContainerGroupNetworking) GetAuth() *bool { } return c.Auth } + +func (c *CreateContainerGroupNetworking) SetLoadBalancer(loadBalancer CreateContainerGroupNetworkingLoadBalancer) { + c.LoadBalancer = &loadBalancer +} + +func (c *CreateContainerGroupNetworking) GetLoadBalancer() *CreateContainerGroupNetworkingLoadBalancer { + if c == nil { + return nil + } + return c.LoadBalancer +} + +func (c *CreateContainerGroupNetworking) SetSingleConnectionLimit(singleConnectionLimit bool) { + c.SingleConnectionLimit = &singleConnectionLimit +} + +func (c *CreateContainerGroupNetworking) GetSingleConnectionLimit() *bool { + if c == nil { + return nil + } + return c.SingleConnectionLimit +} + +func (c *CreateContainerGroupNetworking) SetClientRequestTimeout(clientRequestTimeout int64) { + c.ClientRequestTimeout = &clientRequestTimeout +} + +func (c *CreateContainerGroupNetworking) GetClientRequestTimeout() *int64 { + if c == nil { + return nil + } + return c.ClientRequestTimeout +} + +func (c *CreateContainerGroupNetworking) SetServerResponseTimeout(serverResponseTimeout int64) { + c.ServerResponseTimeout = &serverResponseTimeout +} + +func (c *CreateContainerGroupNetworking) GetServerResponseTimeout() *int64 { + if c == nil { + return nil + } + return c.ServerResponseTimeout +} + +type CreateContainerGroupNetworkingLoadBalancer string + +const ( + CREATE_CONTAINER_GROUP_NETWORKING_LOAD_BALANCER_ROUND_ROBIN CreateContainerGroupNetworkingLoadBalancer = "round_robin" + CREATE_CONTAINER_GROUP_NETWORKING_LOAD_BALANCER_LEAST_NUMBER_OF_CONNECTIONS CreateContainerGroupNetworkingLoadBalancer = "least_number_of_connections" +) diff --git a/pkg/containergroups/update_container_group.go b/pkg/containergroups/update_container_group.go index bc81e5a..50cc031 100644 --- a/pkg/containergroups/update_container_group.go +++ b/pkg/containergroups/update_container_group.go @@ -20,6 +20,8 @@ type UpdateContainerGroup struct { ReadinessProbe *shared.ContainerGroupReadinessProbe `json:"readiness_probe,omitempty"` // Represents the container group startup probe StartupProbe *shared.ContainerGroupStartupProbe `json:"startup_probe,omitempty"` + // Represents the autoscaling rules for a queue + QueueAutoscaler *shared.QueueAutoscaler `json:"queue_autoscaler,omitempty"` } func (u *UpdateContainerGroup) SetDisplayName(displayName string) { @@ -109,3 +111,14 @@ func (u *UpdateContainerGroup) GetStartupProbe() *shared.ContainerGroupStartupPr } return u.StartupProbe } + +func (u *UpdateContainerGroup) SetQueueAutoscaler(queueAutoscaler shared.QueueAutoscaler) { + u.QueueAutoscaler = &queueAutoscaler +} + +func (u *UpdateContainerGroup) GetQueueAutoscaler() *shared.QueueAutoscaler { + if u == nil { + return nil + } + return u.QueueAutoscaler +} diff --git a/pkg/shared/container_group_networking.go b/pkg/shared/container_group_networking.go index 93349fb..c2cb955 100644 --- a/pkg/shared/container_group_networking.go +++ b/pkg/shared/container_group_networking.go @@ -2,10 +2,14 @@ package shared // Represents container group networking parameters type ContainerGroupNetworking struct { - Protocol *ContainerNetworkingProtocol `json:"protocol,omitempty" required:"true"` - Port *int64 `json:"port,omitempty" required:"true" min:"1" max:"65535"` - Auth *bool `json:"auth,omitempty" required:"true"` - Dns *string `json:"dns,omitempty" required:"true"` + Protocol *ContainerNetworkingProtocol `json:"protocol,omitempty" required:"true"` + Port *int64 `json:"port,omitempty" required:"true" min:"1" max:"65535"` + Auth *bool `json:"auth,omitempty" required:"true"` + Dns *string `json:"dns,omitempty" required:"true"` + LoadBalancer *ContainerGroupNetworkingLoadBalancer `json:"load_balancer,omitempty"` + SingleConnectionLimit *bool `json:"single_connection_limit,omitempty"` + ClientRequestTimeout *int64 `json:"client_request_timeout,omitempty" min:"1" max:"100000"` + ServerResponseTimeout *int64 `json:"server_response_timeout,omitempty" min:"1" max:"100000"` } func (c *ContainerGroupNetworking) SetProtocol(protocol ContainerNetworkingProtocol) { @@ -51,3 +55,54 @@ func (c *ContainerGroupNetworking) GetDns() *string { } return c.Dns } + +func (c *ContainerGroupNetworking) SetLoadBalancer(loadBalancer ContainerGroupNetworkingLoadBalancer) { + c.LoadBalancer = &loadBalancer +} + +func (c *ContainerGroupNetworking) GetLoadBalancer() *ContainerGroupNetworkingLoadBalancer { + if c == nil { + return nil + } + return c.LoadBalancer +} + +func (c *ContainerGroupNetworking) SetSingleConnectionLimit(singleConnectionLimit bool) { + c.SingleConnectionLimit = &singleConnectionLimit +} + +func (c *ContainerGroupNetworking) GetSingleConnectionLimit() *bool { + if c == nil { + return nil + } + return c.SingleConnectionLimit +} + +func (c *ContainerGroupNetworking) SetClientRequestTimeout(clientRequestTimeout int64) { + c.ClientRequestTimeout = &clientRequestTimeout +} + +func (c *ContainerGroupNetworking) GetClientRequestTimeout() *int64 { + if c == nil { + return nil + } + return c.ClientRequestTimeout +} + +func (c *ContainerGroupNetworking) SetServerResponseTimeout(serverResponseTimeout int64) { + c.ServerResponseTimeout = &serverResponseTimeout +} + +func (c *ContainerGroupNetworking) GetServerResponseTimeout() *int64 { + if c == nil { + return nil + } + return c.ServerResponseTimeout +} + +type ContainerGroupNetworkingLoadBalancer string + +const ( + CONTAINER_GROUP_NETWORKING_LOAD_BALANCER_ROUND_ROBIN ContainerGroupNetworkingLoadBalancer = "round_robin" + CONTAINER_GROUP_NETWORKING_LOAD_BALANCER_LEAST_NUMBER_OF_CONNECTIONS ContainerGroupNetworkingLoadBalancer = "least_number_of_connections" +)