qarnot

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessConstant

type AccessConstant string

Enum for the access constant string

const (
	ReadOnly  AccessConstant = "readOnly"
	ReadWrite AccessConstant = "readWrite"
)

type ActiveForward added in v0.6.0

type ActiveForward struct {
	ApplicationPort int    `json:"applicationPort"`
	ForwarderPort   int    `json:"forwarderPort"`
	ForwarderHost   string `json:"forwarderHost"`
	BindAddress     string `json:"bindAddress"`
}

Struct representing an active formward settings

type Bucket added in v0.2.0

type Bucket struct {
	Name         string
	CreationDate time.Time
}

type BucketObject added in v0.2.0

type BucketObject struct {
	Name         string
	LastModified time.Time
	Size         int64
	ETag         string
}

type ByPrefix

type ByPrefix struct {
	Prefix string `json:"prefix"`
}

Struct representing the by prefix settings for secrets access rights

type BySecret

type BySecret struct {
	Key string `json:"key"`
}

Struct representing the by secret settings for secrets access rights

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(qarnotConfig *QarnotConfig) (*Client, error)

func (*Client) AbortTask

func (c *Client) AbortTask(uuid string) error

Will abort a task

func (*Client) CloneTask

func (c *Client) CloneTask(uuid string, payload *CloneTaskPayload) (UUIDResponse, error)

Will clone a task using the UUID as string, and a `CreateTaskPayload` struct as arguments Return a `UUIDResponse` containing the UUID of the newly cloned task

func (*Client) CreateBucket added in v0.2.0

func (c *Client) CreateBucket(bucketName string) error

Create a new bucket

func (*Client) CreateJob

func (c *Client) CreateJob(payload CreateJobPayload) (CreateJobResponse, error)

func (*Client) CreateTask

func (c *Client) CreateTask(payload *CreateTaskPayload) (UUIDResponse, error)

Will create a task, based on a `CreateTaskPayload` Returns a `UUIDResponse` struct, containing a UUID for the newly created task

func (*Client) CreateTaskPeriodicSnapshot

func (c *Client) CreateTaskPeriodicSnapshot(uuid string, payload *CreateTaskSnapshotPayload) error

Will create a periodic snapshot for a task using the UUID as string and a `CreateTaskSnapshotPayload` struct as arguments

func (*Client) CreateTaskUniqueSnapshot

func (c *Client) CreateTaskUniqueSnapshot(uuid string, payload *CreateTaskSnapshotPayload) error

Will create a unique snapshot for a task using the UUID as string and a `CreateTaskSnapshotPayload` struct as arguments

func (*Client) DeleteBucket added in v0.2.0

func (c *Client) DeleteBucket(bucketName string) error

Delete a bucket

func (*Client) DeleteJob

func (c *Client) DeleteJob(uuid string, force bool) error

func (*Client) DeleteObject added in v0.2.0

func (c *Client) DeleteObject(object ObjectToDelete) error

Delete object in bucket

func (*Client) DeleteTask

func (c *Client) DeleteTask(uuid string) error

Will delete a task

func (*Client) GetJobInfo

func (c *Client) GetJobInfo(uuid string) (Job, error)

func (*Client) GetLastTaskInstanceStderr added in v0.3.0

func (c *Client) GetLastTaskInstanceStderr(uuid string, instanceId int) (string, error)

Will get the previous stderr for a task on a specific instance

func (*Client) GetLastTaskInstanceStdout

func (c *Client) GetLastTaskInstanceStdout(uuid string, instanceId int) (string, error)

Will get the previous stdout for a task on a specific instance

func (*Client) GetLastTaskStderr

func (c *Client) GetLastTaskStderr(uuid string) (string, error)

Will get the previous stderr for a task

func (*Client) GetLastTaskStdout

func (c *Client) GetLastTaskStdout(uuid string) (string, error)

Will get the previous stdout for a task

func (*Client) GetObjectHead added in v0.2.0

func (c *Client) GetObjectHead(object ObjectToGetHead) (*ObjectHead, error)

Get object head from bucket

func (*Client) GetProfileDetails

func (c *Client) GetProfileDetails(name string) (ProfileDetails, error)

func (*Client) GetSettings

func (c *Client) GetSettings() (Settings, error)

func (*Client) GetTaskInfo

func (c *Client) GetTaskInfo(uuid string) (Task, error)

Will get the info for a task

func (*Client) GetTaskInstanceStderr added in v0.3.0

func (c *Client) GetTaskInstanceStderr(uuid string, instanceId int) (string, error)

Will get the stderr for a task on a specific instance

func (*Client) GetTaskInstanceStdout

func (c *Client) GetTaskInstanceStdout(uuid string, instanceId int) (string, error)

Will get the stdout for a task on a specific instance

func (*Client) GetTaskStderr

func (c *Client) GetTaskStderr(uuid string) (string, error)

Will get the stderr for a task

func (*Client) GetTaskStdout

func (c *Client) GetTaskStdout(uuid string) (string, error)

Will get the stdout for a task

func (*Client) GetUserInfo

func (c *Client) GetUserInfo() (UserInfo, error)

func (*Client) GetVersions

func (c *Client) GetVersions() ([]Version, error)

func (*Client) ListBuckets added in v0.2.0

func (c *Client) ListBuckets() (*[]Bucket, error)

List the buckets of the authenticated user

func (*Client) ListHardwareConstraints

func (c *Client) ListHardwareConstraints() (HardwareConstraintsResponse, error)

func (*Client) ListJobTasks

func (c *Client) ListJobTasks(uuid string) ([]Task, error)

func (*Client) ListJobs

func (c *Client) ListJobs() ([]Job, error)

func (*Client) ListObjects added in v0.2.0

func (c *Client) ListObjects(bucketName string) (*[]BucketObject, error)

List objects inside of a bucket

func (*Client) ListProfiles

func (c *Client) ListProfiles() ([]string, error)

func (*Client) ListTaskSummaries

func (c *Client) ListTaskSummaries() ([]TaskSummary, error)

Will list task summaries for the authenticated user

func (*Client) ListTasks

func (c *Client) ListTasks(tags ...string) ([]Task, error)

Will list the tasks for the authenticated user Optionally filter the results if any tags are provided

func (*Client) RecoverTask

func (c *Client) RecoverTask(uuid string, payload *RecoverTaskPayload) (UUIDResponse, error)

Will recover a task using the UUID as string, and a `CreateTaskPayload` struct as arguments Return a `UUIDResponse` containing the UUID of the newly recovered task

func (*Client) ResumeTask

func (c *Client) ResumeTask(uuid string, payload *ResumeTaskPayload) (UUIDResponse, error)

Will resume a task using the UUID as string, and a `CreateTaskPayload` struct as arguments Return a `UUIDResponse` containing the UUID of the newly resumed task

func (*Client) RetryTask

func (c *Client) RetryTask(uuid string, payload *RetryTaskPayload) (UUIDResponse, error)

Will retry a task using the UUID as string, and a `CreateTaskPayload` struct as arguments Return a `UUIDResponse` containing the UUID of the newly retried task

func (*Client) TerminateJob

func (c *Client) TerminateJob(uuid string) error

func (*Client) UpdateTask

func (c *Client) UpdateTask(uuid string, payload UpdateTaskPayload) error

Will update the fields of a task using the UUID as an argument, as well as a `UpdateTaskPayload` struct

func (*Client) UploadObject added in v0.2.0

func (c *Client) UploadObject(object *ObjectToUpload) error

Upload objects in bucket

type CloneTaskPayload added in v0.3.0

type CloneTaskPayload struct {
	Name                                string                       `json:"name,omitempty"`
	ResourceBuckets                     []string                     `json:"resourceBuckets,omitempty"`
	AdvancedResourceBuckets             []TaskAdvancedResourceBucket `json:"advancedResourceBuckets,omitempty"`
	Shortname                           string                       `json:"shortname,omitempty"`
	Profile                             string                       `json:"profile,omitempty"`
	JobUuid                             string                       `json:"jobUuid,omitempty"`
	ResultBucket                        string                       `json:"resultBucket,omitempty"`
	Constants                           []Constant                   `json:"constants,omitempty"`
	ForcedConstants                     []ForcedConstant             `json:"forcedConstants,omitempty"`
	Constraints                         []map[string]string          `json:"constraints,omitempty"`
	HardwareConstraints                 []HardwareConstraint         `json:"hardwareConstraints,omitempty"`
	SecretsAccessRights                 SecretsAccessRights          `json:"secretsAccessRights,omitempty"`
	Tags                                []string                     `json:"tags,omitempty"`
	SnapshotWhitelist                   string                       `json:"snapshotWhitelist,omitempty"`
	SnapshotBlacklist                   string                       `json:"snapshotBlacklist,omitempty"`
	SnapshotBucket                      string                       `json:"snapshotBucket,omitempty"`
	SnapshotBucketPrefix                string                       `json:"snapshotBucketPrefix,omitempty"`
	ResultsWhitelist                    string                       `json:"resultsWhitelist,omitempty"`
	ResultsBlacklist                    string                       `json:"resultsBlacklist,omitempty"`
	ResultsBucket                       string                       `json:"resultsBucket,omitempty"`
	ResultsBucketPrefix                 string                       `json:"resultsBucketPrefix,omitempty"`
	Priority                            int                          `json:"priority,omitempty"`
	Dependencies                        Dependencies                 `json:"dependencies,omitempty"`
	AutoDeleteOnCompletion              bool                         `json:"autoDeleteOnCompletion,omitempty"`
	CompletionTimeToLive                string                       `json:"completionTimeToLive,omitempty"`
	WaitForPoolResourcesSynchronization bool                         `json:"waitForPoolResourcesSynchronization,omitempty"`
	UploadResultsOnCancellation         bool                         `json:"uploadResultsOnCancellation,omitempty"`
	Labels                              []map[string]string          `json:"labels,omitempty"`
	SchedulingType                      SchedulingType               `json:"schedulingType,omitempty"`
	TargetedReservedMachineKey          string                       `json:"targetedReservedMachineKey,omitempty"`
	DefaultResourcesCacheTTLSec         int                          `json:"defaultResourcesCacheTTLSec,omitempty"`
	Privileges                          Privileges                   `json:"privileges,omitempty"`
	RetrySettings                       RetrySettings                `json:"retrySettings,omitempty"`
}

Struct representing the payload the `ResumeTask` method When using it, the field that been filled will be used to update parameters of the task you're cloning from A new task will be created with all the parameters from the old task you're cloning, and the updated settings you've set here

type CompletedInstance

type CompletedInstance struct {
	Results               []string     `json:"results"`
	InstanceId            int          `json:"instanceId"`
	WallTimeSec           float32      `json:"wallTimeSec"`
	ExecTimeSec           float32      `json:"execTimeSec"`
	ExecTimeSecGHz        float32      `json:"execTimeSecGHz"`
	PeakMemoryMB          int          `json:"peakMemoryMB"`
	State                 string       `json:"state"`
	Error                 QErrorPublic `json:"error"`
	SpecificationKey      string       `json:"specificationKey"`
	CpuModel              string       `json:"cpuModel"`
	CoreCount             int32        `json:"coreCount"`
	ClockRatio            float64      `json:"clockRatio"`
	AverageGHz            float64      `json:"averageGHz"`
	ExecutionAttemptCount int          `json:"executionAttemptCount"`
}

Struct represetning a completed instance field for a task

type Constant

type Constant struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

Struct representing a constant for a task

type CreateJobPayload

type CreateJobPayload struct {
	Name                   string   `json:"name"`
	ShortName              string   `json:"shortName,omitempty"`
	PoolUuid               string   `json:"poolUuid,omitempty"`
	UseDependencies        bool     `json:"useDependencies,omitempty"`
	Tags                   []string `json:"tags,omitempty"`
	MaxWallTime            string   `json:"maxWallTime,omitempty"`
	AutoDeleteOnCompletion bool     `json:"autoDeleteOnCompletion,omitempty"`
	CompletionTimeToLive   string   `json:"completionTimeToLive,omitempty"`
}

type CreateJobResponse

type CreateJobResponse struct {
	Uuid string `json:"uuid"`
}

type CreateTaskPayload

type CreateTaskPayload struct {
	Name                                string                        `json:"name"`
	Shortname                           string                        `json:"shortname,omitempty"`
	Profile                             string                        `json:"profile,omitempty"`
	PoolUUID                            string                        `json:"poolUuid,omitempty"`
	JobUUID                             string                        `json:"jobUuid,omitempty"`
	InstanceCount                       int                           `json:"instanceCount,omitempty"`
	AdvancedRanges                      string                        `json:"advancedRanges,omitempty"`
	ResourceBuckets                     string                        `json:"resourceBuckets,omitempty"`
	AdvancedResourceBuckets             *[]TaskAdvancedResourceBucket `json:"advancedResourceBuckets,omitempty"`
	ResultBucket                        string                        `json:"resultBucket,omitempty"`
	Constants                           *[]Constant                   `json:"constants,omitempty"`
	ForcedConstants                     *[]ForcedConstant             `json:"forcedConstants,omitempty"`
	Constraints                         *[]map[string]string          `json:"constraints,omitempty"`
	HardwareConstraints                 *[]HardwareConstraint         `json:"hardwareConstraints,omitempty"`
	SecretsAccessRights                 *SecretsAccessRights          `json:"secretsAccessRights,omitempty"`
	Tags                                []string                      `json:"tags,omitempty"`
	SnapshotWhitelist                   string                        `json:"snapshotWhitelist,omitempty"`
	SnapshotBucket                      string                        `json:"snapshotBucket,omitempty"`
	SnapshotBucketPrefix                string                        `json:"snapshotBucketPrefix,omitempty"`
	ResultsWhitelist                    string                        `json:"resultsWhitelist,omitempty"`
	ResultsBlacklist                    string                        `json:"resultsBlacklist,omitempty"`
	ResultsBucket                       string                        `json:"resultsBucket,omitempty"`
	ResultsBucketPrefix                 string                        `json:"resultsBucketPrefix,omitempty"`
	Priority                            int                           `json:"priority,omitempty"`
	Dependencies                        *Dependencies                 `json:"dependencies,omitempty"`
	AutoDeleteOnCompletion              bool                          `json:"autoDeleteOnCompletion,omitempty"`
	CompletionTimeToLive                int                           `json:"completionTimeToLive,omitempty"`
	WaitForPoolResourcesSynchronization bool                          `json:"waitForPoolResourcesSynchronization,omitempty"`
	UploadResultsOnCancellation         bool                          `json:"uploadResultsOnCancellation,omitempty"`
	Labels                              *map[string]string            `json:"labels,omitempty"`
	SchedulingType                      SchedulingType                `json:"schedulingType,omitempty"`
	TargetedReservedMachineKey          string                        `json:"targetedReservedMachineKey,omitempty"`
	DefaultResourcesCacheTTLSec         int                           `json:"defaultResourcesCacheTTLSec,omitempty"`
	Privileges                          *Privileges                   `json:"privileges,omitempty"`
	RetrySettings                       *RetrySettings                `json:"retrySettings,omitempty"`
}

Struct representing the payload for the CreateTask method

type CreateTaskSnapshotPayload

type CreateTaskSnapshotPayload struct {
	Interval     int    `json:"interval,omitempty"`
	Whitelist    string `json:"whitelist,omitempty"`
	Blacklist    string `json:"blacklist,omitempty"`
	Bucket       string `json:"bucket,omitempty"`
	BucketPrefix string `json:"bucketPrefix,omitempty"`
}

Struct representing the payload for creating unique and periodic snapshot Interval should only be filled for periodic snapshot, otherwise it will just get ignored

type Dependencies

type Dependencies struct {
	DependsOn []string `json:"dependsOn"`
}

Struct representing the dependencies for a task

type Discriminator

type Discriminator string
const (
	MinimumCoreHardware         Discriminator = "MinimumCoreHardwareConstraint"
	MaximumCoreHardawre         Discriminator = "MaximumCoreHardwareConstraint"
	MinimumRamHardware          Discriminator = "MinimumRamHardwareConstraint"
	MaximumRamHardware          Discriminator = "MaximumRamHardwareConstraint"
	SpecificHardware            Discriminator = "SpecificHardwareConstraint"
	MinimumRamCoreRatioHardware Discriminator = "MinimumRamCoreRatioHardwareConstraint"
	MaximumRamCoreRatioHardware Discriminator = "MaximumRamCoreRatioHardwareConstraint"
	SSDHardware                 Discriminator = "SSDHardwareConstraint"
	NoSSDHardware               Discriminator = "NoSSDHardwareConstraint"
	NoGpuHardware               Discriminator = "NoGpuHardwareConstraint"
	GpuHardware                 Discriminator = "GpuHardwareConstraint"
	CpuModelHardware            Discriminator = "CpuModelHardwareConstraint"
)

type ExecutionTimeByCPUModel

type ExecutionTimeByCPUModel struct {
	Model string  `json:"model"`
	Time  float64 `json:"time"`
	Core  int     `json:"core"`
}

Struct representing the execution time by cpu model for a task status

type ExecutionTimeByInstanceID

type ExecutionTimeByInstanceID struct {
	InstanceId       int     `json:"instanceId"`
	SpecificationKey string  `json:"specificationKey"`
	SiteUuid         string  `json:"siteUuid"`
	Time             float64 `json:"time"`
	TimeGHz          float64 `json:"timeGHz"`
	ClockRatio       float64 `json:"clockRatio"`
}

Struct representing the execution time by instance id for a task status

type ExecutionTimeByMachineSpecification

type ExecutionTimeByMachineSpecification struct {
	SpecificationKey string  `json:"specificationKey"`
	Time             float64 `json:"time"`
}

Struct representing the execution time by machine specification for a task status

type ExecutionTimeGhzByCPUModel

type ExecutionTimeGhzByCPUModel struct {
	Model      string  `json:"model"`
	TimeGHz    float64 `json:"timeGHz"`
	ClockRatio float64 `json:"clockRatio"`
	Core       int     `json:"core"`
}

Struct representing the execution time by ghz and cpu model for a task status

type Filtering

type Filtering struct {
	PrefixFiltering PrefixFiltering `json:"prefixFiltering"`
}

Struct representing a prefix filtering field

type ForcedConstant

type ForcedConstant struct {
	ConstantName             string         `json:"constantName"`
	ForcedValue              string         `json:"forcedValue"`
	ForceExportInEnvironment bool           `json:"forceExportInEnvironment"`
	Access                   AccessConstant `json:"access"`
}

Struct representing a ForcedConstant for the CreateTask payload

type HardwareConstraint

type HardwareConstraint struct {
	Discriminator            Discriminator `json:"discriminator"`
	CoreCount                int           `json:"coreCount"`
	MinimumMemoryMB          float64       `json:"minimumMemoryMB"`
	MaximumMemoryMB          float64       `json:"maximumMemoryMB"`
	SpecificationKey         string        `json:"specificationKey"`
	MinimumMemoryGBCoreRatio float64       `json:"minimumMemoryGBCoreRatio"`
	MaximumMemoryGBCoreRatio float64       `json:"maximumMemoryGBCoreRatio"`
	CpuModel                 string        `json:"cpuModel"`
}

type HardwareConstraintsResponse

type HardwareConstraintsResponse struct {
	Data   []HardwareConstraint `json:"data"`
	Offset int                  `json:"offset"`
	Limit  int                  `json:"limit"`
	Total  int                  `json:"total"`
}

type Job

type Job struct {
	Uuid                        string   `json:"uuid"`
	Name                        string   `json:"name"`
	Shortname                   string   `json:"shortname"`
	PoolUuid                    string   `json:"poolUuid"`
	State                       string   `json:"state"`
	PreviousState               string   `json:"previousState"`
	UseDependencies             bool     `json:"useDependencies"`
	StateTransitionTime         string   `json:"stateTransitionTime"`
	PreviousStateTransitionTime string   `json:"previousStateTransitionTime"`
	CreationDate                string   `json:"creationDate"`
	LastModified                string   `json:"lastModified"`
	MaxWallTime                 string   `json:"maxWallTime"`
	Tags                        []string `json:"tags"`
	AutoDeleteOnCompletion      bool     `json:"autoDeleteOnCompletion"`
	CompletionTimeToLive        string   `json:"completionTimeToLive"`
}

type ObjectHead added in v0.2.0

type ObjectHead struct {
	PartsCount    int32
	ETag          string
	ContentLength int64
	ContentType   string
}

Represent object head

type ObjectToDelete added in v0.2.0

type ObjectToDelete struct {
	Bucket string
	Key    string
}

Input for deleting an object in bucket

type ObjectToGetHead added in v0.2.0

type ObjectToGetHead struct {
	Bucket string
	Key    string
}

Input for getting object head in bucket

type ObjectToUpload added in v0.2.0

type ObjectToUpload struct {
	Bucket    string
	LocalPath string
	Key       string
}

Input for uploading an object into a bucket

type PerRunningInstanceInfo added in v0.6.0

type PerRunningInstanceInfo struct {
	ActiveForwards        []ActiveForward `json:"activeForwards"`
	VpnConnections        []VpnConnection `json:"vpnConnections"`
	Phase                 string          `json:"phase"`
	InstanceID            int             `json:"instanceId"`
	MaxFrequencyGHz       float64         `json:"maxFrequencyGHz"`
	CurrentFrequencyGHz   float64         `json:"currentFrequencyGHz"`
	CpuUsage              float64         `json:"cpuUsage"`
	MaxMemoryMB           int             `json:"maxMemoryMB"`
	CurrentMemoryMB       int             `json:"currentMemoryMB"`
	MemoryUsage           float64         `json:"memoryUsage"`
	NetworkInKbps         float64         `json:"networkInKbps"`
	NetworkOutKbps        float64         `json:"networkOutKbps"`
	Progress              float64         `json:"progress"`
	ExecutionTimeSec      float64         `json:"executionTimeSec"`
	ExecutionTimeGHz      float64         `json:"executionTimeGHz"`
	SpecificationKey      string          `json:"specificationKey"`
	CpuModel              string          `json:"cpuModel"`
	CoreCount             int             `json:"coreCount"`
	ExecutionAttemptCount int             `json:"executionAttemptCount"`
	ClockRatio            float64         `json:"clockRatio"`
}

type PrefixFiltering

type PrefixFiltering struct {
	Prefix string `json:"prefix"`
}

Struct representing the content of a prefix filtering field

type Privileges

type Privileges struct {
	ExportApiAndStorageCredentialsInEnvironment bool `json:"exportApiAndStorageCredentialsInEnvironment"`
}

Struct representing the privileges for a task

type ProfileConstant

type ProfileConstant struct {
	Name        string `json:"name"`
	Value       string `json:"value"`
	Description string `json:"description"`
}

type ProfileDetails

type ProfileDetails struct {
	Name      string            `json:"name"`
	Constants []ProfileConstant `json:"constants"`
	Licences  []ProfileLicence  `json:"licences"`
}

type ProfileLicence

type ProfileLicence struct {
	Name         string
	MaxInstances int
	MaxCores     int
}

type QErrorPublic

type QErrorPublic struct {
	Code    string `json:"code"`
	Message string `json:"message"`
	Debug   string `json:"debug"`
}

Struct representing a Qarnot public error

type QarnotConfig added in v0.2.0

type QarnotConfig struct {
	ApiUrl     string
	ApiKey     string
	Email      string
	Version    string
	StorageUrl string
}

type RecoverTaskPayload added in v0.3.0

type RecoverTaskPayload struct {
	Name                                string                       `json:"name,omitempty"`
	ResourceBuckets                     []string                     `json:"resourceBuckets,omitempty"`
	AdvancedResourceBuckets             []TaskAdvancedResourceBucket `json:"advancedResourceBuckets,omitempty"`
	Shortname                           string                       `json:"shortname,omitempty"`
	Profile                             string                       `json:"profile,omitempty"`
	JobUuid                             string                       `json:"jobUuid,omitempty"`
	ResultBucket                        string                       `json:"resultBucket,omitempty"`
	Constants                           []Constant                   `json:"constants,omitempty"`
	ForcedConstants                     []ForcedConstant             `json:"forcedConstants,omitempty"`
	Constraints                         []map[string]string          `json:"constraints,omitempty"`
	HardwareConstraints                 []HardwareConstraint         `json:"hardwareConstraints,omitempty"`
	SecretsAccessRights                 SecretsAccessRights          `json:"secretsAccessRights,omitempty"`
	Tags                                []string                     `json:"tags,omitempty"`
	SnapshotWhitelist                   string                       `json:"snapshotWhitelist,omitempty"`
	SnapshotBlacklist                   string                       `json:"snapshotBlacklist,omitempty"`
	SnapshotBucket                      string                       `json:"snapshotBucket,omitempty"`
	SnapshotBucketPrefix                string                       `json:"snapshotBucketPrefix,omitempty"`
	ResultsWhitelist                    string                       `json:"resultsWhitelist,omitempty"`
	ResultsBlacklist                    string                       `json:"resultsBlacklist,omitempty"`
	ResultsBucket                       string                       `json:"resultsBucket,omitempty"`
	ResultsBucketPrefix                 string                       `json:"resultsBucketPrefix,omitempty"`
	Priority                            int                          `json:"priority,omitempty"`
	Dependencies                        Dependencies                 `json:"dependencies,omitempty"`
	AutoDeleteOnCompletion              bool                         `json:"autoDeleteOnCompletion,omitempty"`
	CompletionTimeToLive                string                       `json:"completionTimeToLive,omitempty"`
	WaitForPoolResourcesSynchronization bool                         `json:"waitForPoolResourcesSynchronization,omitempty"`
	UploadResultsOnCancellation         bool                         `json:"uploadResultsOnCancellation,omitempty"`
	Labels                              []map[string]string          `json:"labels,omitempty"`
	SchedulingType                      SchedulingType               `json:"schedulingType,omitempty"`
	TargetedReservedMachineKey          string                       `json:"targetedReservedMachineKey,omitempty"`
	DefaultResourcesCacheTTLSec         int                          `json:"defaultResourcesCacheTTLSec,omitempty"`
	Privileges                          Privileges                   `json:"privileges,omitempty"`
	RetrySettings                       RetrySettings                `json:"retrySettings,omitempty"`
}

Struct representing the payload the `RecoverTask` method When using it, the field that been filled will be used to update parameters of the task you're recovering from A new task will be created with all the parameters from the old task you're recovering, and the updated settings you've set here

type ReservedQuotas

type ReservedQuotas struct {
	MachineKey   string `json:"machineKey"`
	MaxInstances int    `json:"maxInstances"`
	MaxCores     int    `json:"maxCores"`
}

type ResourceTransformation

type ResourceTransformation struct {
	StripPrefix StripPrefix `json:"stripPrefix"`
}

Struct representing the resource transformation settings for a task advanced resource bucket

type ResumeTaskPayload added in v0.3.0

type ResumeTaskPayload struct {
	Name                                string                       `json:"name,omitempty"`
	ResourceBuckets                     []string                     `json:"resourceBuckets,omitempty"`
	AdvancedResourceBuckets             []TaskAdvancedResourceBucket `json:"advancedResourceBuckets,omitempty"`
	Shortname                           string                       `json:"shortname,omitempty"`
	Profile                             string                       `json:"profile,omitempty"`
	JobUuid                             string                       `json:"jobUuid,omitempty"`
	ResultBucket                        string                       `json:"resultBucket,omitempty"`
	Constants                           []Constant                   `json:"constants,omitempty"`
	ForcedConstants                     []ForcedConstant             `json:"forcedConstants,omitempty"`
	Constraints                         []map[string]string          `json:"constraints,omitempty"`
	HardwareConstraints                 []HardwareConstraint         `json:"hardwareConstraints,omitempty"`
	SecretsAccessRights                 SecretsAccessRights          `json:"secretsAccessRights,omitempty"`
	Tags                                []string                     `json:"tags,omitempty"`
	SnapshotWhitelist                   string                       `json:"snapshotWhitelist,omitempty"`
	SnapshotBlacklist                   string                       `json:"snapshotBlacklist,omitempty"`
	SnapshotBucket                      string                       `json:"snapshotBucket,omitempty"`
	SnapshotBucketPrefix                string                       `json:"snapshotBucketPrefix,omitempty"`
	ResultsWhitelist                    string                       `json:"resultsWhitelist,omitempty"`
	ResultsBlacklist                    string                       `json:"resultsBlacklist,omitempty"`
	ResultsBucket                       string                       `json:"resultsBucket,omitempty"`
	ResultsBucketPrefix                 string                       `json:"resultsBucketPrefix,omitempty"`
	Priority                            int                          `json:"priority,omitempty"`
	Dependencies                        Dependencies                 `json:"dependencies,omitempty"`
	AutoDeleteOnCompletion              bool                         `json:"autoDeleteOnCompletion,omitempty"`
	CompletionTimeToLive                string                       `json:"completionTimeToLive,omitempty"`
	WaitForPoolResourcesSynchronization bool                         `json:"waitForPoolResourcesSynchronization,omitempty"`
	UploadResultsOnCancellation         bool                         `json:"uploadResultsOnCancellation,omitempty"`
	Labels                              []map[string]string          `json:"labels,omitempty"`
	SchedulingType                      SchedulingType               `json:"schedulingType,omitempty"`
	TargetedReservedMachineKey          string                       `json:"targetedReservedMachineKey,omitempty"`
	DefaultResourcesCacheTTLSec         int                          `json:"defaultResourcesCacheTTLSec,omitempty"`
	Privileges                          Privileges                   `json:"privileges,omitempty"`
	RetrySettings                       RetrySettings                `json:"retrySettings,omitempty"`
}

Struct representing the payload the `ResumeTask` method When using it, the field that been filled will be used to update parameters of the task you're resuming from A new task will be created with all the parameters from the old task you're resuming, and the updated settings you've set here

type RetrySettings

type RetrySettings struct {
	MaxTotalRetries       int `json:"maxTotalRetries"`
	MaxPerInstanceRetries int `json:"maxPerInstanceRetries"`
}

Struct representing the retry settings for a task

type RetryTaskPayload added in v0.3.0

type RetryTaskPayload struct {
	Name                                string                       `json:"name,omitempty"`
	ResourceBuckets                     []string                     `json:"resourceBuckets,omitempty"`
	AdvancedResourceBuckets             []TaskAdvancedResourceBucket `json:"advancedResourceBuckets,omitempty"`
	Shortname                           string                       `json:"shortname,omitempty"`
	Profile                             string                       `json:"profile,omitempty"`
	JobUuid                             string                       `json:"jobUuid,omitempty"`
	ResultBucket                        string                       `json:"resultBucket,omitempty"`
	Constants                           []Constant                   `json:"constants,omitempty"`
	ForcedConstants                     []ForcedConstant             `json:"forcedConstants,omitempty"`
	Constraints                         []map[string]string          `json:"constraints,omitempty"`
	HardwareConstraints                 []HardwareConstraint         `json:"hardwareConstraints,omitempty"`
	SecretsAccessRights                 SecretsAccessRights          `json:"secretsAccessRights,omitempty"`
	Tags                                []string                     `json:"tags,omitempty"`
	SnapshotWhitelist                   string                       `json:"snapshotWhitelist,omitempty"`
	SnapshotBlacklist                   string                       `json:"snapshotBlacklist,omitempty"`
	SnapshotBucket                      string                       `json:"snapshotBucket,omitempty"`
	SnapshotBucketPrefix                string                       `json:"snapshotBucketPrefix,omitempty"`
	ResultsWhitelist                    string                       `json:"resultsWhitelist,omitempty"`
	ResultsBlacklist                    string                       `json:"resultsBlacklist,omitempty"`
	ResultsBucket                       string                       `json:"resultsBucket,omitempty"`
	ResultsBucketPrefix                 string                       `json:"resultsBucketPrefix,omitempty"`
	Priority                            int                          `json:"priority,omitempty"`
	Dependencies                        Dependencies                 `json:"dependencies,omitempty"`
	AutoDeleteOnCompletion              bool                         `json:"autoDeleteOnCompletion,omitempty"`
	CompletionTimeToLive                string                       `json:"completionTimeToLive,omitempty"`
	WaitForPoolResourcesSynchronization bool                         `json:"waitForPoolResourcesSynchronization,omitempty"`
	UploadResultsOnCancellation         bool                         `json:"uploadResultsOnCancellation,omitempty"`
	Labels                              []map[string]string          `json:"labels,omitempty"`
	SchedulingType                      SchedulingType               `json:"schedulingType,omitempty"`
	TargetedReservedMachineKey          string                       `json:"targetedReservedMachineKey,omitempty"`
	DefaultResourcesCacheTTLSec         int                          `json:"defaultResourcesCacheTTLSec,omitempty"`
	Privileges                          Privileges                   `json:"privileges,omitempty"`
	RetrySettings                       RetrySettings                `json:"retrySettings,omitempty"`
}

Struct representing the payload the `RetryTask` method When using it, the field that been filled will be used to update parameters of the task you're retrying from A new task will be created with all the parameters from the old task you're retrying, and the updated settings you've set here

type RunningCoreCountByCpuModel added in v0.6.0

type RunningCoreCountByCpuModel struct {
	Model            string `json:"model"`
	Core             int    `json:"core"`
	RunningCoreCount int    `json:"runningCoreCount"`
}

type RunningInstancesInfo added in v0.6.0

type RunningInstancesInfo struct {
	PerRunningInstanceInfo     []PerRunningInstanceInfo     `json:"perRunningInstanceInfo"`
	Timestamp                  string                       `json:"timestamp"`
	AverageFrequencyGHz        float64                      `json:"averageFrequencyGHz"`
	MaxFrequencyGHz            float64                      `json:"maxFrequencyGHz"`
	MinFrequencyGHz            float64                      `json:"minFrequencyGHz"`
	AverageMaxFrequencyGHz     float64                      `json:"averageMaxFrequencyGHz"`
	AverageCpuUsage            float64                      `json:"averageCpuUsage"`
	ClusterPowerIndicator      float64                      `json:"clusterPowerIndicator"`
	AverageMemoryUsage         float64                      `json:"averageMemoryUsage"`
	AverageNetworkInKbps       float64                      `json:"averageNetworkInKbps"`
	AverageNetworkOutKbps      float64                      `json:"averageNetworkOutKbps"`
	TotalNetworkInKbps         float64                      `json:"totalNetworkInKbps"`
	TotalNetworkOutKbps        float64                      `json:"totalNetworkOutKbps"`
	RunningCoreCountByCpuModel []RunningCoreCountByCpuModel `json:"runningCoreCountByCpuModel"`
}

type SchedulingType

type SchedulingType string

Enum for the scheduling type

const (
	Flex     SchedulingType = "flex"
	OnDemand SchedulingType = "onDemand"
	Reserved SchedulingType = "reserved"
)

type SecretsAccessRights

type SecretsAccessRights struct {
	BySecret []BySecret `json:"bySecret"`
	ByPrefix []ByPrefix `json:"byPrefix"`
}

Struct representing the secrets and access rights for a task

type Settings

type Settings struct {
	Storage string `json:"storage"`
}

type StripPrefix

type StripPrefix struct {
	Prefix string `json:"prefix"`
}

Struct representing a prefix field for the resource transformation struct

type Task

type Task struct {
	Errors                              []QErrorPublic               `json:"errors,omitempty"`
	ResourceBuckets                     []string                     `json:"resourceBuckets,omitempty"`
	AdvancedResourceBuckets             []TaskAdvancedResourceBucket `json:"advancedResourceBuckets,omitempty"`
	ResultBucket                        string                       `json:"resultBucket,omitempty"`
	CompletedInstances                  []CompletedInstance          `json:"completedInstances,omitempty"`
	Status                              TaskStatus                   `json:"status,omitempty"`
	SnapshotInterval                    int                          `json:"snapshotInterval,omitempty"`
	ResultsCount                        int                          `json:"resultsCount,omitempty"`
	Constants                           []Constant                   `json:"constants,omitempty"`
	SecretsAccessRights                 SecretsAccessRights          `json:"secretsAccessRights,omitempty"`
	Tags                                []string                     `json:"tags,omitempty"`
	SnapshotWhitelist                   string                       `json:"snapshotWhitelist,omitempty"`
	SnapshotBlacklist                   string                       `json:"snapshotBlacklist,omitempty"`
	UploadResultsOnCancellation         bool                         `json:"uploadResultsOnCancellation,omitempty"`
	Dependencies                        Dependencies                 `json:"dependencies,omitempty"`
	AutoDeleteOnCompletion              bool                         `json:"autoDeleteOnCompletion,omitempty"`
	CompletionTimeToLive                string                       `json:"completionTimeToLive,omitempty"`
	HardwareConstraints                 []HardwareConstraint         `json:"hardwareConstraints,omitempty"`
	Labels                              map[string]string            `json:"labels,omitempty"`
	SchedulingType                      SchedulingType               `json:"schedulingType,omitempty"`
	Privileges                          Privileges                   `json:"privileges,omitempty"`
	RetrySettings                       RetrySettings                `json:"retrySettings,omitempty"`
	UUID                                string                       `json:"uuid,omitempty"`
	Name                                string                       `json:"name,omitempty"`
	Shortname                           string                       `json:"shortname,omitempty"`
	Profile                             string                       `json:"profile,omitempty"`
	PoolUUID                            string                       `json:"poolUuid,omitempty"`
	JobUUID                             string                       `json:"jobUuid,omitempty"`
	Progress                            float64                      `json:"progress,omitempty"`
	RunningInstanceCount                int                          `json:"runningInstanceCount,omitempty"`
	RunningCoreCount                    int                          `json:"runningCoreCount,omitempty"`
	ExecutionTime                       string                       `json:"executionTime,omitempty"`
	WallTime                            string                       `json:"wallTime,omitempty"`
	State                               string                       `json:"state,omitempty"`
	PreviousState                       string                       `json:"previousState,omitempty"`
	InstanceCount                       int                          `json:"instanceCount,omitempty"`
	MaxRetriesPerInstance               int                          `json:"maxRetriesPerInstance,omitempty"`
	StateTransitionTime                 time.Time                    `json:"stateTransitionTime,omitempty"`
	PreviousStateTransitionTime         time.Time                    `json:"previousStateTransitionTime,omitempty"`
	LastModified                        time.Time                    `json:"lastModified,omitempty"`
	CreationDate                        time.Time                    `json:"creationDate,omitempty"`
	EndDate                             time.Time                    `json:"endDate,omitempty"`
	WaitForPoolResourcesSynchronization bool                         `json:"waitForPoolResourcesSynchronization,omitempty"`
}

Struct representing a task with full details

type TaskAdvancedResourceBucket

type TaskAdvancedResourceBucket struct {
	BucketName             string                 `json:"bucketName"`
	Filtering              Filtering              `json:"filtering"`
	ResourceTransformation ResourceTransformation `json:"resourceTransformation"`
	CacheTTLSec            int                    `jons:"cacheTTLSec"`
}

Struct representing a task advanced resource bucket setting for a task

type TaskStatus

type TaskStatus struct {
	Timestamp                           time.Time                             `json:"timestamp,omitempty"`
	LastUpdateTimestamp                 time.Time                             `json:"lastUpdateTimestamp,omitempty"`
	DownloadProgress                    float64                               `json:"downloadProgress,omitempty"`
	ExecutionProgress                   float64                               `json:"executionProgress,omitempty"`
	UploadProgress                      float64                               `json:"uploadProgress,omitempty"`
	InstanceCount                       float64                               `json:"instanceCount,omitempty"`
	DownloadTime                        string                                `json:"downloadTime,omitempty"`
	DownloadTimeSec                     float64                               `json:"downloadTimeSec,omitempty"`
	EnvironmentTime                     string                                `json:"environmentTime,omitempty"`
	EnvironmentTimeSec                  float64                               `json:"environmentTimeSec,omitempty"`
	ExecutionTime                       string                                `json:"executionTime,omitempty"`
	ExecutionTimeSec                    float64                               `json:"executionTimeSec,omitempty"`
	ExecutionTimeByCPUModel             []ExecutionTimeByCPUModel             `json:"executionTimeByCpuModel,omitempty"`
	ExecutionTimeByMachineSpecification []ExecutionTimeByMachineSpecification `json:"executionTimeByMachineSpecification,omitempty"`
	ExecutionTimeByInstanceID           []ExecutionTimeByInstanceID           `json:"executionTimeByInstanceId,omitempty"`
	ExecutionTimeGhzByCPUModel          []ExecutionTimeGhzByCPUModel          `json:"executionTimeGhzByCpuModel,omitempty"`
	UploadTime                          string                                `json:"uploadTime,omitempty"`
	UploadTimeSec                       float64                               `json:"uploadTimeSec,omitempty"`
	WallTime                            string                                `json:"wallTime,omitempty"`
	WallTimeSec                         float64                               `json:"wallTimeSec,omitempty"`
	SucceededRange                      string                                `json:"succeededRange,omitempty"`
	ExecutedRange                       string                                `json:"executedRange,omitempty"`
	FailedRange                         string                                `json:"failedRange,omitempty"`
	CancelledRange                      string                                `json:"cancelledRange,omitempty"`
	FailedOnlyRange                     string                                `json:"failedOnlyRange,omitempty"`
	StartedOnceRange                    string                                `json:"startedOnceRange,omitempty"`
	RunningInstancesInfo                RunningInstancesInfo                  `json:"runningInstancesInfo,omitempty"`
}

Struct representing a task status for a task

type TaskSummary

type TaskSummary struct {
	Uuid                                string
	Name                                string
	Shortname                           string
	Profile                             string
	PoolUuid                            string
	JobUuid                             string
	Progress                            float64
	RunningInstanceCount                int
	RunningCoreCount                    int
	ExecutionTime                       string
	WallTime                            string
	State                               string
	PreviousState                       string
	InstanceCount                       int
	MaxRetriesPerInstance               int
	AdvancedRanges                      string
	StateTransitionTime                 time.Time
	PreviousStateTransitionTime         time.Time
	LastModified                        time.Time
	CreationDate                        time.Time
	EndDate                             time.Time
	WaitForPoolResourcesSynchronization bool
}

Struct representing a task summary

type UUIDResponse

type UUIDResponse struct {
	Uuid string `json:"uuid"`
}

Struct representing a UUID response

type UpdateTaskPayload

type UpdateTaskPayload struct {
	Constants []Constant `json:"constants,omitempty"`
	Tags      []string   `json:"tags,omitempty"`
}

A struct representing the payload for the `UpdateTask` method

type UserInfo

type UserInfo struct {
	Email                           string           `json:"email"`
	MaxBucket                       int              `json:"maxBucket"`
	MaxTask                         int              `json:"maxTask"`
	TaskCount                       int              `json:"taskCount"`
	MaxJob                          int              `json:"maxJob"`
	JobCount                        int              `json:"jobCount"`
	MaxPool                         int              `json:"maxPool"`
	PoolCount                       int              `json:"poolCount"`
	MaxRunningTask                  int              `json:"maxRunningTask"`
	MaxRunningPool                  int              `json:"maxRunningPool"`
	RunningTaskCount                int              `json:"runningTaskCount"`
	RunningPoolCount                int              `json:"runningPoolCount"`
	RunningInstanceCount            int              `json:"runningInstanceCount"`
	RunningCoreCount                int              `json:"runningCoreCount"`
	MaxInstances                    int              `json:"maxInstances"`
	MaxCores                        int              `json:"maxCores"`
	MaxFlexInstances                int              `json:"maxFlexInstances"`
	MaxFlexCores                    int              `json:"maxFlexCores"`
	MaxOnDemandInstances            int              `json:"maxOnDemandInstances"`
	MaxOnDemandCores                int              `json:"maxOnDemandCores"`
	ReservedQuotas                  []ReservedQuotas `json:"reservedQuotas"`
	QuotaBytes                      int              `json:"quotaBytes"`
	UsedQuotaBytes                  int              `json:"usedQuotasBytes"`
	QuotaBytesBucket                int              `json:"quotaBytesBucket"`
	UsedQuotaBytesBucket            int              `json:"usedQuotaBytesBucket"`
	DefaultScheduling               string           `json:"defaultScheduling"`
	DefaultReservedSpecificationKey string           `json:"defaultReservedSpecificationKey"`
}

type Version

type Version struct {
	Version   string
	EndOfLife string
}

type VpnConnection added in v0.6.0

type VpnConnection struct {
	VpnName           string `json:"vpnName"`
	NodeIPAddressCidr string `json:"nodeIPAddressCidr"`
}

Struct representing a VPN Connection

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL