-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Raphaël Pinson <[email protected]>
- Loading branch information
Showing
3 changed files
with
84 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// Copyright 2024 Cisco Systems, Inc. and its affiliates | ||
|
||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package instruqt | ||
|
||
import "time" | ||
|
||
// HotStartPoolType defines a custom type for HotStartPool types. | ||
type HotStartPoolType string | ||
|
||
// Constants representing different types of HotStartPool. | ||
const ( | ||
HotStartPoolTypeDedicated HotStartPoolType = "dedicated" | ||
HotStartPoolTypeShared HotStartPoolType = "shared" | ||
) | ||
|
||
// HotStartStatus defines a custom type for HotStartPool status. | ||
type HotStartStatus string | ||
|
||
// Constats representing the different types of status of HotStartPool. | ||
const ( | ||
HostStartStatusRunning HotStartStatus = "Running" | ||
HostStartStatusProvisioning HotStartStatus = "Provisioning" | ||
HostStartStatusInactive HotStartStatus = "Inactive" | ||
HostStartStatusExpired HotStartStatus = "Expired" | ||
HostStartStatusDeleted HotStartStatus = "Deleted" | ||
HostStartStatusAutoRefill HotStartStatus = "AutoRefill" | ||
) | ||
|
||
// HotStartPoolConfigTrackEdge | ||
type HotStartPoolConfigTrackEdge struct { | ||
Claimed int | ||
Available int | ||
Created int | ||
Failed int | ||
Creating int | ||
Total int | ||
Node SandboxConfig | ||
} | ||
|
||
// HotStartPool represents a hot start pool in Instruqt. | ||
type HotStartPool struct { | ||
Id string // ID of the hot start pool. | ||
Type HotStartPoolType // The type of hot start pool. | ||
Size int // Number of sandboxes available per track. | ||
Created *time.Time // Creation time of the hot start pool. | ||
Deleted *time.Time // Deletion time of the hot start pool. | ||
Name string // Name given to the hot start pool. | ||
Auto_refill bool // Flag that signals if the sandboxes should be auto refillable. | ||
Starts_at *time.Time // Schedule time for the hot start pool to start creating sandboxes. | ||
Ends_at *time.Time // Schedule time for the hot start pool to stop creating sandboxes. | ||
Status HotStartStatus // Status of the hot start pool. | ||
Region string // Region of a hotstart pool. | ||
Configs []HotStartPoolConfigTrackEdge // Configs status for the hotstart pool. | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package instruqt | ||
|
||
import "time" | ||
|
||
type SandboxConfig struct { | ||
Id string | ||
Name string | ||
Slug string | ||
Version int | ||
Deleted *time.Time | ||
} |