api

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package types provides common type definitions for SLURM entities. Core entity types (Job, Node, User, etc.) are generated in *.gen.go files. This file contains operation types (Create, Update, List, etc.).

Package analytics provides performance analytics types for HPC job analysis. These types are SDK-specific and provide value-added analytics not in the SLURM REST API.

Package types provides common type definitions for SLURM entities. Core entity types (Job, Node, User, etc.) are generated in *.gen.go files. This file contains operation types (Create, Update, List, etc.).

Package types provides common type definitions for SLURM entities. Core entity types (Job, Node, User, etc.) are generated in *.gen.go files. This file contains operation types (Create, Update, List, etc.).

Extended types for the SDK - these are SDK-specific types not in the SLURM REST API. Analytics types are in pkg/analytics.

Package api contains all type definitions and interfaces for the slurm-client SDK. This is the single source of truth for the SDK contract. The root package re-exports these as type aliases for user convenience.

Package types provides common type definitions for SLURM entities. Core entity types (Job, Node, User, etc.) are generated in *.gen.go files. This file contains operation types (Create, Update, List, etc.).

Package types provides common type definitions for SLURM entities. Core entity types (Job, Node, User, etc.) are generated in *.gen.go files. This file contains operation types (Create, Update, List, etc.).

Package types provides common type definitions for SLURM entities. Core entity types (Job, Node, User, etc.) are generated in *.gen.go files. This file contains operation types (Create, Update, List, etc.).

Package types provides common type definitions for SLURM entities. Core entity types (Job, Node, User, etc.) are generated in *.gen.go files. This file contains operation types (Create, Update, List, etc.).

Package types provides common type definitions for SLURM entities. Core entity types (Job, Node, User, etc.) are generated in *.gen.go files. This file contains operation types (Create, Update, List, etc.).

Package types provides common type definitions for SLURM entities. Core entity types (Job, Node, User, etc.) are generated in *.gen.go files. This file contains operation types (Create, Update, List, etc.).

Package types provides common type definitions for SLURM entities. Core entity types (WCKey, etc.) are generated in *.gen.go files. This file contains operation types (Create, Update, List, etc.).

Index

Constants

View Source
const (
	ReservationFlagMaintenance = ReservationFlagsMaint
	ReservationFlagOverlap     = ReservationFlagsOverlap
	ReservationFlagIgnoreJobs  = ReservationFlagsIgnoreJobs
	ReservationFlagDaily       = ReservationFlagsDaily
	ReservationFlagWeekly      = ReservationFlagsWeekly
	ReservationFlagAnyNodes    = ReservationFlagsAnyNodes
	ReservationFlagStatic      = ReservationFlagsStatic
	ReservationFlagPartNodes   = ReservationFlagsPartNodes
)

Backward compatibility constants mapping to generated values

Variables

This section is empty.

Functions

This section is empty.

Types

type APIVersion

type APIVersion struct {
	Version     string `json:"version"`
	Release     string `json:"release"`
	Description string `json:"description"`
	Deprecated  bool   `json:"deprecated"`
}

APIVersion represents API version information (mirrors interfaces.APIVersion)

type Account

type Account struct {
	Associations []AssocShort        `json:"associations,omitempty"` // Associations involving this account (only populated if requested)
	Coordinators []Coord             `json:"coordinators,omitempty"` // List of users that are a coordinator of this account (only populated if...
	Description  string              `json:"description"`            // Arbitrary string describing the account
	Flags        []AccountFlagsValue `json:"flags,omitempty"`        // Flags associated with this account
	Name         string              `json:"name"`                   // Account name
	Organization string              `json:"organization"`           // Organization to which the account belongs
}

Account represents a SLURM Account.

type AccountAssociationRequest

type AccountAssociationRequest struct {
	Accounts     []string          `json:"accounts"`
	Cluster      string            `json:"cluster"`
	Partition    string            `json:"partition,omitempty"`
	Parent       string            `json:"parent,omitempty"`
	QoS          []string          `json:"qos,omitempty"`
	DefaultQoS   string            `json:"default_qos,omitempty"`
	Fairshare    int32             `json:"fairshare,omitempty"`
	GrpTRES      map[string]string `json:"grp_tres,omitempty"`
	MaxTRES      map[string]string `json:"max_tres,omitempty"`
	Description  string            `json:"description,omitempty"`
	Organization string            `json:"organization,omitempty"`
}

AccountAssociationRequest represents a request to create account associations

type AccountCreate

type AccountCreate struct {
	Name                 string           `json:"name"`
	Description          string           `json:"description,omitempty"`
	Organization         string           `json:"organization,omitempty"`
	Coordinators         []string         `json:"coordinators,omitempty"`
	DefaultQoS           string           `json:"default_qos,omitempty"`
	QoSList              []string         `json:"qos_list,omitempty"`
	ParentName           string           `json:"parent_name,omitempty"`
	AllowedPartitions    []string         `json:"allowed_partitions,omitempty"`
	DefaultPartition     string           `json:"default_partition,omitempty"`
	FairShare            int32            `json:"fair_share,omitempty"`
	SharesRaw            int32            `json:"shares_raw,omitempty"`
	Priority             int32            `json:"priority,omitempty"`
	MaxJobs              int32            `json:"max_jobs,omitempty"`
	MaxJobsPerUser       int32            `json:"max_jobs_per_user,omitempty"`
	MaxSubmitJobs        int32            `json:"max_submit_jobs,omitempty"`
	MaxWallTime          int32            `json:"max_wall_time,omitempty"`
	MaxCPUTime           int32            `json:"max_cpu_time,omitempty"`
	MaxNodes             int32            `json:"max_nodes,omitempty"`
	MaxCPUs              int32            `json:"max_cpus,omitempty"`
	MaxMemory            int64            `json:"max_memory,omitempty"`
	MinPriorityThreshold int32            `json:"min_priority_threshold,omitempty"`
	GrpJobs              int32            `json:"grp_jobs,omitempty"`
	GrpJobsAccrue        int32            `json:"grp_jobs_accrue,omitempty"`
	GrpNodes             int32            `json:"grp_nodes,omitempty"`
	GrpCPUs              int32            `json:"grp_cpus,omitempty"`
	GrpMemory            int64            `json:"grp_memory,omitempty"`
	GrpSubmitJobs        int32            `json:"grp_submit_jobs,omitempty"`
	GrpWallTime          int32            `json:"grp_wall_time,omitempty"`
	GrpCPUTime           int32            `json:"grp_cpu_time,omitempty"`
	GrpTRES              map[string]int64 `json:"grp_tres,omitempty"`
	GrpTRESMins          map[string]int64 `json:"grp_tres_mins,omitempty"`
	GrpTRESRunMins       map[string]int64 `json:"grp_tres_run_mins,omitempty"`
	MaxTRES              map[string]int64 `json:"max_tres,omitempty"`
	MaxTRESPerNode       map[string]int64 `json:"max_tres_per_node,omitempty"`
	MinTRES              map[string]int64 `json:"min_tres,omitempty"`
}

AccountCreate represents the data needed to create a new account

type AccountCreateRequest

type AccountCreateRequest = AccountCreate

AccountCreateRequest is an alias for AccountCreate

type AccountCreateResponse

type AccountCreateResponse struct {
	AccountName string `json:"account_name"`
}

AccountCreateResponse represents the response from account creation

type AccountFairShare

type AccountFairShare struct {
	AccountName      string              `json:"account_name"`
	Cluster          string              `json:"cluster"`
	Parent           string              `json:"parent,omitempty"`
	Shares           int                 `json:"shares"`
	RawShares        int                 `json:"raw_shares"`
	NormalizedShares float64             `json:"normalized_shares"`
	Usage            float64             `json:"usage"`
	EffectiveUsage   float64             `json:"effective_usage"`
	FairShareFactor  float64             `json:"fair_share_factor"`
	Level            int                 `json:"level"`
	LevelShares      int                 `json:"level_shares"`
	UserCount        int                 `json:"user_count"`
	ActiveUsers      int                 `json:"active_users"`
	JobCount         int                 `json:"job_count"`
	Children         []*AccountFairShare `json:"children,omitempty"`
	Users            []*UserFairShare    `json:"users,omitempty"`
	LastDecay        time.Time           `json:"last_decay"`
	Created          time.Time           `json:"created"`
	Modified         time.Time           `json:"modified"`
}

AccountFairShare represents account fairshare information.

type AccountFlagsValue

type AccountFlagsValue string

AccountFlagsValue represents possible values for AccountFlags field.

const (
	AccountFlagsDeleted          AccountFlagsValue = "DELETED"
	AccountFlagsWithassociations AccountFlagsValue = "WithAssociations"
	AccountFlagsWithcoordinators AccountFlagsValue = "WithCoordinators"
	AccountFlagsNousersarecoords AccountFlagsValue = "NoUsersAreCoords"
	AccountFlagsUsersarecoords   AccountFlagsValue = "UsersAreCoords"
)

AccountFlagsValue constants.

type AccountHierarchy

type AccountHierarchy struct {
	Account          *Account            `json:"account"`
	ParentAccount    *AccountHierarchy   `json:"parent_account,omitempty"`
	ChildAccounts    []*AccountHierarchy `json:"child_accounts,omitempty"`
	Level            int                 `json:"level"`
	Path             []string            `json:"path"`
	TotalUsers       int                 `json:"total_users"`
	TotalSubAccounts int                 `json:"total_sub_accounts"`
	AggregateQuota   *AccountQuota       `json:"aggregate_quota,omitempty"`
	AggregateUsage   *AccountUsage       `json:"aggregate_usage,omitempty"`
}

AccountHierarchy represents account hierarchy.

type AccountLimits

type AccountLimits struct {
	AccountName     string           `json:"account_name"`
	MaxJobs         int32            `json:"max_jobs"`
	MaxCPUs         int32            `json:"max_cpus"`
	MaxNodes        int32            `json:"max_nodes"`
	MaxMemory       int64            `json:"max_memory"`
	MaxWallTime     int32            `json:"max_wall_time"`
	CurrentJobs     int32            `json:"current_jobs"`
	CurrentCPUs     int32            `json:"current_cpus"`
	CurrentNodes    int32            `json:"current_nodes"`
	CurrentMemory   int64            `json:"current_memory"`
	AvailableJobs   int32            `json:"available_jobs"`
	AvailableCPUs   int32            `json:"available_cpus"`
	AvailableNodes  int32            `json:"available_nodes"`
	AvailableMemory int64            `json:"available_memory"`
	TRES            map[string]int64 `json:"tres,omitempty"`
}

AccountLimits represents resource limits for an account

type AccountList

type AccountList struct {
	Accounts []Account `json:"accounts"`
	Total    int       `json:"total"`
}

AccountList represents a list of accounts

type AccountListOptions

type AccountListOptions struct {
	Names         []string   `json:"names,omitempty"`
	Descriptions  []string   `json:"descriptions,omitempty"`
	Organizations []string   `json:"organizations,omitempty"`
	WithDeleted   bool       `json:"with_deleted,omitempty"`
	WithAssocs    bool       `json:"with_assocs,omitempty"`
	WithCoords    bool       `json:"with_coords,omitempty"`
	WithWCKeys    bool       `json:"with_wckeys,omitempty"`
	UpdateTime    *time.Time `json:"update_time,omitempty"`

	// Limit specifies the maximum number of accounts to return.
	// WARNING: Due to SLURM REST API limitations, this is CLIENT-SIDE pagination.
	// The full account list is fetched from the server, then sliced. For large databases
	// with many accounts, consider using filtering options (Names, Organizations, etc.)
	// to reduce the dataset before pagination.
	Limit int `json:"limit,omitempty"`

	// Offset specifies the number of accounts to skip before returning results.
	// WARNING: This is CLIENT-SIDE pagination - see Limit field documentation.
	Offset int `json:"offset,omitempty"`
}

AccountListOptions represents options for listing accounts

type AccountManager

type AccountManager interface {
	List(ctx context.Context, opts *ListAccountsOptions) (*AccountList, error)
	Get(ctx context.Context, accountName string) (*Account, error)
	Create(ctx context.Context, account *AccountCreate) (*AccountCreateResponse, error)
	Update(ctx context.Context, accountName string, update *AccountUpdate) error
	Delete(ctx context.Context, accountName string) error
}

type AccountQuota

type AccountQuota struct {
	CPULimit           int            `json:"cpu_limit,omitempty"`
	CPUUsed            int            `json:"cpu_used,omitempty"`
	MaxJobs            int            `json:"max_jobs,omitempty"`
	JobsUsed           int            `json:"jobs_used,omitempty"`
	MaxJobsPerUser     int            `json:"max_jobs_per_user,omitempty"`
	MaxNodes           int            `json:"max_nodes,omitempty"`
	NodesUsed          int            `json:"nodes_used,omitempty"`
	MaxWallTime        int            `json:"max_wall_time,omitempty"`
	GrpTRES            map[string]int `json:"grp_tres,omitempty"`
	GrpTRESUsed        map[string]int `json:"grp_tres_used,omitempty"`
	GrpTRESMinutes     map[string]int `json:"grp_tres_minutes,omitempty"`
	GrpTRESMinutesUsed map[string]int `json:"grp_tres_minutes_used,omitempty"`
	MaxTRES            map[string]int `json:"max_tres,omitempty"`
	MaxTRESUsed        map[string]int `json:"max_tres_used,omitempty"`
	MaxTRESPerUser     map[string]int `json:"max_tres_per_user,omitempty"`
	QuotaPeriod        string         `json:"quota_period,omitempty"`
	LastUpdated        time.Time      `json:"last_updated,omitempty"`
}

AccountQuota represents account resource quotas.

type AccountUpdate

type AccountUpdate struct {
	Description          *string          `json:"description,omitempty"`
	Organization         *string          `json:"organization,omitempty"`
	Coordinators         []string         `json:"coordinators,omitempty"`
	DefaultQoS           *string          `json:"default_qos,omitempty"`
	QoSList              []string         `json:"qos_list,omitempty"`
	AllowedPartitions    []string         `json:"allowed_partitions,omitempty"`
	DefaultPartition     *string          `json:"default_partition,omitempty"`
	FairShare            *int32           `json:"fair_share,omitempty"`
	SharesRaw            *int32           `json:"shares_raw,omitempty"`
	Priority             *int32           `json:"priority,omitempty"`
	MaxJobs              *int32           `json:"max_jobs,omitempty"`
	MaxJobsPerUser       *int32           `json:"max_jobs_per_user,omitempty"`
	MaxSubmitJobs        *int32           `json:"max_submit_jobs,omitempty"`
	MaxWallTime          *int32           `json:"max_wall_time,omitempty"`
	MaxCPUTime           *int32           `json:"max_cpu_time,omitempty"`
	MaxNodes             *int32           `json:"max_nodes,omitempty"`
	MaxCPUs              *int32           `json:"max_cpus,omitempty"`
	MaxMemory            *int64           `json:"max_memory,omitempty"`
	MinPriorityThreshold *int32           `json:"min_priority_threshold,omitempty"`
	GrpJobs              *int32           `json:"grp_jobs,omitempty"`
	GrpJobsAccrue        *int32           `json:"grp_jobs_accrue,omitempty"`
	GrpNodes             *int32           `json:"grp_nodes,omitempty"`
	GrpCPUs              *int32           `json:"grp_cpus,omitempty"`
	GrpMemory            *int64           `json:"grp_memory,omitempty"`
	GrpSubmitJobs        *int32           `json:"grp_submit_jobs,omitempty"`
	GrpWallTime          *int32           `json:"grp_wall_time,omitempty"`
	GrpCPUTime           *int32           `json:"grp_cpu_time,omitempty"`
	GrpTRES              map[string]int64 `json:"grp_tres,omitempty"`
	GrpTRESMins          map[string]int64 `json:"grp_tres_mins,omitempty"`
	GrpTRESRunMins       map[string]int64 `json:"grp_tres_run_mins,omitempty"`
	MaxTRES              map[string]int64 `json:"max_tres,omitempty"`
	MaxTRESPerNode       map[string]int64 `json:"max_tres_per_node,omitempty"`
	MinTRES              map[string]int64 `json:"min_tres,omitempty"`
}

AccountUpdate represents the data needed to update an account

type AccountUpdateRequest

type AccountUpdateRequest = AccountUpdate

AccountUpdateRequest is an alias for AccountUpdate

type AccountUsage

type AccountUsage struct {
	AccountName     string             `json:"account_name"`
	StartTime       time.Time          `json:"start_time"`
	EndTime         time.Time          `json:"end_time"`
	CPUSeconds      int64              `json:"cpu_seconds"`
	NodeHours       float64            `json:"node_hours"`
	JobCount        int32              `json:"job_count"`
	UserCount       int32              `json:"user_count"`
	TRESUsage       map[string]float64 `json:"tres_usage,omitempty"`
	AverageJobSize  float64            `json:"average_job_size,omitempty"`
	AverageWaitTime int32              `json:"average_wait_time,omitempty"`
	SuccessRate     float64            `json:"success_rate,omitempty"`
}

AccountUsage represents usage statistics for an account

type AccountUsageStats

type AccountUsageStats struct {
	AccountName      string             `json:"account_name"`
	JobCount         int                `json:"job_count"`
	CPUHours         float64            `json:"cpu_hours"`
	WallHours        float64            `json:"wall_hours"`
	TRESUsage        map[string]float64 `json:"tres_usage,omitempty"`
	AverageQueueTime float64            `json:"average_queue_time"`
	AverageRunTime   float64            `json:"average_run_time"`
	Efficiency       float64            `json:"efficiency"`
}

AccountUsageStats is defined in pkg/analytics. This is a forward reference for types that depend on it.

type AccountUserOptions

type AccountUserOptions struct {
	// AccountName to filter by
	AccountName string `json:"account_name,omitempty"`
	// UserNames to include
	UserNames []string `json:"user_names,omitempty"`
	// WithAssociations includes user associations
	WithAssociations bool `json:"with_associations,omitempty"`
	// WithCoordinators includes coordinator information
	WithCoordinators bool `json:"with_coordinators,omitempty"`
	// OnlyCoordinators returns only users who are coordinators
	OnlyCoordinators bool `json:"only_coordinators,omitempty"`
}

AccountUserOptions represents options for account-user operations

type Accounting

type Accounting struct {
	TRES      *TRES                `json:"TRES,omitempty"` // Trackable resources
	Allocated *AccountingAllocated `json:"allocated,omitempty"`
	ID        *int32               `json:"id,omitempty"`     // Association ID or Workload characterization key ID
	IDAlt     *int32               `json:"id_alt,omitempty"` // Alternate ID (not currently used)
	Start     *int64               `json:"start,omitempty"`  // When the record was started (UNIX timestamp) (UNIX timestamp or time string...
}

Accounting represents a SLURM Accounting.

type AccountingAllocated

type AccountingAllocated struct {
	Seconds *int64 `json:"seconds,omitempty"` // Number of seconds allocated
}

AccountingAllocated is a nested type within its parent.

type AccountingJobSteps

type AccountingJobSteps struct {
	JobID    string                 `json:"job_id"`
	JobName  string                 `json:"job_name"`
	User     string                 `json:"user"`
	Account  string                 `json:"account"`
	Steps    []StepAccountingRecord `json:"steps"`
	Summary  *JobAccountingSummary  `json:"summary,omitempty"`
	Metadata map[string]interface{} `json:"metadata,omitempty"`
}

AccountingJobSteps represents job steps from accounting.

type AccountingQueryOptions

type AccountingQueryOptions struct {
	StartTime  *time.Time `json:"start_time,omitempty"`
	EndTime    *time.Time `json:"end_time,omitempty"`
	User       string     `json:"user,omitempty"`
	Account    string     `json:"account,omitempty"`
	Partition  string     `json:"partition,omitempty"`
	State      string     `json:"state,omitempty"`
	Format     string     `json:"format,omitempty"`
	MaxRecords int        `json:"max_records,omitempty"`
}

AccountingQueryOptions configures accounting queries.

type AdminLevel

type AdminLevel = AdministratorLevelValue

AdminLevel is an alias for AdministratorLevelValue from generated types

const (
	AdminLevelNone          AdminLevel = AdministratorLevelNone
	AdminLevelOperator      AdminLevel = AdministratorLevelOperator
	AdminLevelAdministrator AdminLevel = AdministratorLevelAdministrator
)

AdminLevel constants for backward compatibility

type AdministratorLevelValue

type AdministratorLevelValue string

AdministratorLevelValue represents possible values for AdministratorLevel field.

const (
	AdministratorLevelNotSet        AdministratorLevelValue = "Not Set"
	AdministratorLevelNone          AdministratorLevelValue = "None"
	AdministratorLevelOperator      AdministratorLevelValue = "Operator"
	AdministratorLevelAdministrator AdministratorLevelValue = "Administrator"
)

AdministratorLevelValue constants.

type AnalyticsManager

type AnalyticsManager interface {
	GetJobUtilization(ctx context.Context, jobID string) (*JobUtilization, error)
	GetJobEfficiency(ctx context.Context, jobID string) (*ResourceUtilization, error)
	GetJobPerformance(ctx context.Context, jobID string) (*JobPerformance, error)
	GetJobLiveMetrics(ctx context.Context, jobID string) (*JobLiveMetrics, error)
	WatchJobMetrics(ctx context.Context, jobID string, opts *WatchMetricsOptions) (<-chan JobMetricsEvent, error)
	GetJobResourceTrends(ctx context.Context, jobID string, opts *ResourceTrendsOptions) (*JobResourceTrends, error)
	GetJobStepDetails(ctx context.Context, jobID string, stepID string) (*JobStepDetails, error)
	GetJobStepUtilization(ctx context.Context, jobID string, stepID string) (*JobStepUtilization, error)
	ListJobStepsWithMetrics(ctx context.Context, jobID string, opts *ListJobStepsOptions) (*JobStepMetricsList, error)
	GetJobStepsFromAccounting(ctx context.Context, jobID string, opts *AccountingQueryOptions) (*AccountingJobSteps, error)
	GetStepAccountingData(ctx context.Context, jobID string, stepID string) (*StepAccountingRecord, error)
	GetJobStepAPIData(ctx context.Context, jobID string, stepID string) (*JobStepAPIData, error)
	ListJobStepsFromSacct(ctx context.Context, jobID string, opts *SacctQueryOptions) (*SacctJobStepData, error)
	GetJobCPUAnalytics(ctx context.Context, jobID string) (*CPUAnalytics, error)
	GetJobMemoryAnalytics(ctx context.Context, jobID string) (*MemoryAnalytics, error)
	GetJobIOAnalytics(ctx context.Context, jobID string) (*IOAnalytics, error)
	GetJobComprehensiveAnalytics(ctx context.Context, jobID string) (*JobComprehensiveAnalytics, error)
	GetJobPerformanceHistory(ctx context.Context, jobID string, opts *PerformanceHistoryOptions) (*JobPerformanceHistory, error)
	GetPerformanceTrends(ctx context.Context, opts *TrendAnalysisOptions) (*PerformanceTrends, error)
	GetUserEfficiencyTrends(ctx context.Context, userID string, opts *EfficiencyTrendOptions) (*UserEfficiencyTrends, error)
	AnalyzeBatchJobs(ctx context.Context, jobIDs []string, opts *BatchAnalysisOptions) (*BatchJobAnalysis, error)
	GetWorkflowPerformance(ctx context.Context, workflowID string, opts *WorkflowAnalysisOptions) (*WorkflowPerformance, error)
	GenerateEfficiencyReport(ctx context.Context, opts *ReportOptions) (*EfficiencyReport, error)
}

AnalyticsManager provides advanced performance analytics. NOTE: This is NOT part of the Slurm REST API - it provides computed insights. Returns nil from SlurmClient.Analytics() if not implemented.

type AssocShort

type AssocShort struct {
	Account   *string `json:"account,omitempty"`   // Account name
	Cluster   *string `json:"cluster,omitempty"`   // Cluster name
	ID        *int32  `json:"id,omitempty"`        // Numeric association ID
	Partition *string `json:"partition,omitempty"` // Partition name
	User      string  `json:"user"`                // User name
}

AssocShort represents a SLURM AssocShort.

type Association

type Association struct {
	Account       *string                        `json:"account,omitempty"`    // Account name
	Accounting    []Accounting                   `json:"accounting,omitempty"` // Accounting records containing related resource usage
	Cluster       *string                        `json:"cluster,omitempty"`    // Cluster name
	Comment       *string                        `json:"comment,omitempty"`    // Arbitrary comment
	Default       *AssociationDefault            `json:"default,omitempty"`
	Flags         []AssociationDefaultFlagsValue `json:"flags,omitempty"`      // Flags on the association
	ID            *int32                         `json:"id,omitempty"`         // Unique ID (Association ID)
	IsDefault     *bool                          `json:"is_default,omitempty"` // Is default association for user
	Lineage       *string                        `json:"lineage,omitempty"`    // Complete path up the hierarchy to the root association
	Max           *AssociationMax                `json:"max,omitempty"`
	Min           *AssociationMin                `json:"min,omitempty"`
	ParentAccount *string                        `json:"parent_account,omitempty"` // Name of parent account
	Partition     *string                        `json:"partition,omitempty"`      // Partition name
	Priority      *uint32                        `json:"priority,omitempty"`       // Association priority factor (32 bit integer number with flags)
	QoS           []string                       `json:"qos,omitempty"`            // List of available QOS names (List of QOS names)
	SharesRaw     *int32                         `json:"shares_raw,omitempty"`     // Allocated shares used for fairshare calculation
	User          string                         `json:"user"`                     // User name
}

Association represents a SLURM Association.

type AssociationCreate

type AssociationCreate struct {
	Account              string           `json:"account_name"`
	Cluster              string           `json:"cluster"`
	User                 string           `json:"user_name,omitempty"`
	Partition            string           `json:"partition,omitempty"`
	ParentAccount        string           `json:"parent_account,omitempty"`
	IsDefault            bool             `json:"is_default,omitempty"`
	Comment              string           `json:"comment,omitempty"`
	DefaultQoS           string           `json:"default_qos,omitempty"`
	QoSList              []string         `json:"qos_list,omitempty"`
	SharesRaw            int32            `json:"shares_raw,omitempty"`
	Priority             int32            `json:"priority,omitempty"`
	MaxJobs              int32            `json:"max_jobs,omitempty"`
	MaxJobsAccrue        int32            `json:"max_jobs_accrue,omitempty"`
	MaxSubmitJobs        int32            `json:"max_submit_jobs,omitempty"`
	MaxWallTime          int32            `json:"max_wall_time,omitempty"`
	MaxCPUTime           int32            `json:"max_cpu_time,omitempty"`
	MaxNodes             int32            `json:"max_nodes,omitempty"`
	MaxCPUs              int32            `json:"max_cpus,omitempty"`
	MaxMemory            int64            `json:"max_memory,omitempty"`
	MinPriorityThreshold int32            `json:"min_priority_threshold,omitempty"`
	GrpJobs              int32            `json:"grp_jobs,omitempty"`
	GrpJobsAccrue        int32            `json:"grp_jobs_accrue,omitempty"`
	GrpNodes             int32            `json:"grp_nodes,omitempty"`
	GrpCPUs              int32            `json:"grp_cpus,omitempty"`
	GrpMemory            int64            `json:"grp_memory,omitempty"`
	GrpSubmitJobs        int32            `json:"grp_submit_jobs,omitempty"`
	GrpWallTime          int32            `json:"grp_wall_time,omitempty"`
	GrpCPUTime           int32            `json:"grp_cpu_time,omitempty"`
	GrpCPURunMins        int64            `json:"grp_cpu_run_mins,omitempty"`
	GrpTRES              map[string]int64 `json:"grp_tres,omitempty"`
	GrpTRESMins          map[string]int64 `json:"grp_tres_mins,omitempty"`
	GrpTRESRunMins       map[string]int64 `json:"grp_tres_run_mins,omitempty"`
	MaxTRES              map[string]int64 `json:"max_tres,omitempty"`
	MaxTRESPerNode       map[string]int64 `json:"max_tres_per_node,omitempty"`
	MaxTRESMins          map[string]int64 `json:"max_tres_mins,omitempty"`
	MinTRES              map[string]int64 `json:"min_tres,omitempty"`
}

AssociationCreate represents the data needed to create a new association

type AssociationCreateRequest

type AssociationCreateRequest = AssociationCreate

AssociationCreateRequest is an alias for AssociationCreate

type AssociationCreateResponse

type AssociationCreateResponse struct {
	Status  string                 `json:"status"`
	Message string                 `json:"message,omitempty"`
	Meta    map[string]interface{} `json:"meta,omitempty"`
}

AssociationCreateResponse represents the response from creating an association

type AssociationDefault

type AssociationDefault struct {
	QoS *string `json:"qos,omitempty"` // Default QOS
}

AssociationDefault is a nested type within its parent.

type AssociationDefaultFlagsValue

type AssociationDefaultFlagsValue string

AssociationDefaultFlagsValue represents possible values for AssociationDefaultFlags field.

const (
	AssociationDefaultFlagsDeleted          AssociationDefaultFlagsValue = "DELETED"
	AssociationDefaultFlagsNoupdate         AssociationDefaultFlagsValue = "NoUpdate"
	AssociationDefaultFlagsExact            AssociationDefaultFlagsValue = "Exact"
	AssociationDefaultFlagsNousersarecoords AssociationDefaultFlagsValue = "NoUsersAreCoords"
	AssociationDefaultFlagsUsersarecoords   AssociationDefaultFlagsValue = "UsersAreCoords"
)

AssociationDefaultFlagsValue constants.

type AssociationHierarchy

type AssociationHierarchy struct {
	Account       string                 `json:"account_name"`
	Cluster       string                 `json:"cluster"`
	Association   *Association           `json:"association,omitempty"`
	Users         []AssociationUser      `json:"users,omitempty"`
	ChildAccounts []AssociationHierarchy `json:"child_accounts,omitempty"`
}

AssociationHierarchy represents the hierarchical structure of associations

type AssociationLimits

type AssociationLimits struct {
	// MaxJobs maximum number of jobs
	MaxJobs int32 `json:"max_jobs,omitempty"`
	// MaxJobsAccrue maximum number of jobs that can accrue priority
	MaxJobsAccrue int32 `json:"max_jobs_accrue,omitempty"`
	// MaxSubmitJobs maximum number of submitted jobs
	MaxSubmitJobs int32 `json:"max_submit_jobs,omitempty"`
	// MaxWallTime maximum wall time per job (in minutes)
	MaxWallTime int32 `json:"max_wall_time,omitempty"`
	// MaxCPUTime maximum CPU time (in minutes)
	MaxCPUTime int32 `json:"max_cpu_time,omitempty"`
	// MaxNodes maximum number of nodes per job
	MaxNodes int32 `json:"max_nodes,omitempty"`
	// MaxCPUs maximum number of CPUs per job
	MaxCPUs int32 `json:"max_cpus,omitempty"`
	// MaxMemory maximum memory per job (in MB)
	MaxMemory int64 `json:"max_memory,omitempty"`
	// MinPriorityThreshold minimum priority threshold
	MinPriorityThreshold int32 `json:"min_priority_threshold,omitempty"`
	// GrpJobs maximum number of running jobs in aggregate
	GrpJobs int32 `json:"grp_jobs,omitempty"`
	// GrpJobsAccrue maximum number of jobs that can accrue priority in aggregate
	GrpJobsAccrue int32 `json:"grp_jobs_accrue,omitempty"`
	// GrpNodes maximum number of nodes in aggregate
	GrpNodes int32 `json:"grp_nodes,omitempty"`
	// GrpCPUs maximum number of CPUs in aggregate
	GrpCPUs int32 `json:"grp_cpus,omitempty"`
	// GrpMemory maximum memory in aggregate (in MB)
	GrpMemory int64 `json:"grp_memory,omitempty"`
	// GrpSubmitJobs maximum number of submitted jobs in aggregate
	GrpSubmitJobs int32 `json:"grp_submit_jobs,omitempty"`
	// GrpWallTime maximum wall time in aggregate (in minutes)
	GrpWallTime int32 `json:"grp_wall_time,omitempty"`
	// GrpCPUTime maximum CPU time in aggregate (in minutes)
	GrpCPUTime int32 `json:"grp_cpu_time,omitempty"`
	// GrpCPURunMins maximum CPU running minutes
	GrpCPURunMins int64 `json:"grp_cpu_run_mins,omitempty"`
	// GrpTRES group TRES limits
	GrpTRES map[string]int64 `json:"grp_tres,omitempty"`
	// GrpTRESMins group TRES minutes limits
	GrpTRESMins map[string]int64 `json:"grp_tres_mins,omitempty"`
	// GrpTRESRunMins group TRES running minutes limits
	GrpTRESRunMins map[string]int64 `json:"grp_tres_run_mins,omitempty"`
	// MaxTRES maximum TRES limits
	MaxTRES map[string]int64 `json:"max_tres,omitempty"`
	// MaxTRESPerNode maximum TRES per node limits
	MaxTRESPerNode map[string]int64 `json:"max_tres_per_node,omitempty"`
	// MaxTRESMins maximum TRES minutes
	MaxTRESMins map[string]int64 `json:"max_tres_mins,omitempty"`
	// MinTRES minimum TRES requirements
	MinTRES map[string]int64 `json:"min_tres,omitempty"`
}

AssociationLimits represents resource limits for an association

type AssociationList

type AssociationList struct {
	Associations []Association `json:"associations"`
	Total        int           `json:"total"`
}

AssociationList represents a list of associations

type AssociationListOptions

type AssociationListOptions struct {
	Accounts     []string   `json:"accounts,omitempty"`
	Clusters     []string   `json:"clusters,omitempty"`
	Users        []string   `json:"users,omitempty"`
	Partitions   []string   `json:"partitions,omitempty"`
	OnlyDefaults bool       `json:"only_defaults,omitempty"`
	WithDeleted  bool       `json:"with_deleted,omitempty"`
	UpdateTime   *time.Time `json:"update_time,omitempty"`

	// Limit specifies the maximum number of associations to return.
	// WARNING: Due to SLURM REST API limitations, this is CLIENT-SIDE pagination.
	// The full association list is fetched from the server, then sliced. For large databases,
	// consider using filtering options (Accounts, Clusters, Users, Partitions) to reduce the dataset.
	Limit int `json:"limit,omitempty"`

	// Offset specifies the number of associations to skip before returning results.
	// WARNING: This is CLIENT-SIDE pagination - see Limit field documentation.
	Offset int `json:"offset,omitempty"`
}

AssociationListOptions represents options for listing associations

type AssociationManager

type AssociationManager interface {
	List(ctx context.Context, opts *ListAssociationsOptions) (*AssociationList, error)
	Get(ctx context.Context, associationID string) (*Association, error)
	Create(ctx context.Context, associations []*AssociationCreate) (*AssociationCreateResponse, error)
	Update(ctx context.Context, associations []*AssociationUpdate) error
	Delete(ctx context.Context, associationID string) error
}

type AssociationMax

type AssociationMax struct {
	Jobs *AssociationMaxJobs `json:"jobs,omitempty"`
	Per  *AssociationMaxPer  `json:"per,omitempty"`
	TRES *AssociationMaxTRES `json:"tres,omitempty"`
}

AssociationMax is a nested type within its parent.

type AssociationMaxJobs

type AssociationMaxJobs struct {
	Accruing *uint32                `json:"accruing,omitempty"` // MaxJobsAccrue - Maximum number of pending jobs able to accrue age priority at...
	Active   *uint32                `json:"active,omitempty"`   // MaxJobs - Maximum number of running jobs per user in this association (32 bit...
	Per      *AssociationMaxJobsPer `json:"per,omitempty"`
	Total    *uint32                `json:"total,omitempty"` // MaxSubmitJobs - Maximum number of jobs in a pending or running state at any...
}

AssociationMaxJobs is a nested type within its parent.

type AssociationMaxJobsPer

type AssociationMaxJobsPer struct {
	Accruing  *uint32 `json:"accruing,omitempty"`   // GrpJobsAccrue - Maximum number of pending jobs able to accrue age priority in...
	Count     *uint32 `json:"count,omitempty"`      // GrpJobs - Maximum number of running jobs in this association and its children...
	Submitted *uint32 `json:"submitted,omitempty"`  // GrpSubmitJobs - Maximum number of jobs in a pending or running state at any...
	WallClock *uint32 `json:"wall_clock,omitempty"` // MaxWallDurationPerJob - Maximum wall clock time in minutes each job can use in...
}

AssociationMaxJobsPer is a nested type within its parent.

type AssociationMaxPer

type AssociationMaxPer struct {
	Account *AssociationMaxPerAccount `json:"account,omitempty"`
}

AssociationMaxPer is a nested type within its parent.

type AssociationMaxPerAccount

type AssociationMaxPerAccount struct {
	WallClock *uint32 `json:"wall_clock,omitempty"` // GrpWall - Maximum wall clock time in minutes able to be allocated by running...
}

AssociationMaxPerAccount is a nested type within its parent.

type AssociationMaxTRES

type AssociationMaxTRES struct {
	Group   *AssociationMaxTRESGroup   `json:"group,omitempty"`
	Minutes *AssociationMaxTRESMinutes `json:"minutes,omitempty"`
	Per     *AssociationMaxTRESPer     `json:"per,omitempty"`
	Total   []TRES                     `json:"total,omitempty"` // GrpTRES - Maximum number of TRES able to be allocated by running jobs in this...
}

AssociationMaxTRES is a nested type within its parent.

type AssociationMaxTRESGroup

type AssociationMaxTRESGroup struct {
	Active  []TRES `json:"active,omitempty"`  // GrpTRESRunMins - Maximum number of TRES minutes able to be allocated by running...
	Minutes []TRES `json:"minutes,omitempty"` // GrpTRESMins - Maximum number of TRES minutes that can possibly be used by past,...
}

AssociationMaxTRESGroup is a nested type within its parent.

type AssociationMaxTRESMinutes

type AssociationMaxTRESMinutes struct {
	Per   *AssociationMaxTRESMinutesPer `json:"per,omitempty"`
	Total []TRES                        `json:"total,omitempty"` // Not implemented
}

AssociationMaxTRESMinutes is a nested type within its parent.

type AssociationMaxTRESMinutesPer

type AssociationMaxTRESMinutesPer struct {
	Job []TRES `json:"job,omitempty"` // MaxTRESMinsPerJob - Maximum number of TRES minutes each job can use in this...
}

AssociationMaxTRESMinutesPer is a nested type within its parent.

type AssociationMaxTRESPer

type AssociationMaxTRESPer struct {
	Job  []TRES `json:"job,omitempty"`  // MaxTRESPerJob - Maximum number of TRES each job can use in this association
	Node []TRES `json:"node,omitempty"` // MaxTRESPerNode - Maximum number of TRES each node in a job allocation can use...
}

AssociationMaxTRESPer is a nested type within its parent.

type AssociationMin

type AssociationMin struct {
	PriorityThreshold *uint32 `json:"priority_threshold,omitempty"` // MinPrioThreshold - Minimum priority required to reserve resources when...
}

AssociationMin is a nested type within its parent.

type AssociationOptions

type AssociationOptions struct {
	Cluster   string `json:"cluster,omitempty"`
	Partition string `json:"partition,omitempty"`
	QoS       string `json:"qos,omitempty"`
	MaxJobs   *int   `json:"max_jobs,omitempty"`
	Priority  *int   `json:"priority,omitempty"`
}

AssociationOptions configures association creation.

type AssociationUpdate

type AssociationUpdate struct {
	// Identifier field - the association ID is required for updates
	ID *int32 `json:"id,omitempty"` // Association ID (required for updates)

	// Optional identifier fields for filtering/lookup (not used in adapter Update)
	Account   *string `json:"account,omitempty"`   // Account name
	User      *string `json:"user,omitempty"`      // User name
	Cluster   *string `json:"cluster,omitempty"`   // Cluster name
	Partition *string `json:"partition,omitempty"` // Partition name (optional)

	// Update fields
	IsDefault            *bool            `json:"is_default,omitempty"`
	Comment              *string          `json:"comment,omitempty"`
	DefaultQoS           *string          `json:"default_qos,omitempty"`
	QoSList              []string         `json:"qos_list,omitempty"`
	SharesRaw            *int32           `json:"shares_raw,omitempty"`
	Priority             *int32           `json:"priority,omitempty"`
	MaxJobs              *int32           `json:"max_jobs,omitempty"`
	MaxJobsAccrue        *int32           `json:"max_jobs_accrue,omitempty"`
	MaxSubmitJobs        *int32           `json:"max_submit_jobs,omitempty"`
	MaxWallTime          *int32           `json:"max_wall_time,omitempty"`
	MaxCPUTime           *int32           `json:"max_cpu_time,omitempty"`
	MaxNodes             *int32           `json:"max_nodes,omitempty"`
	MaxCPUs              *int32           `json:"max_cpus,omitempty"`
	MaxMemory            *int64           `json:"max_memory,omitempty"`
	MinPriorityThreshold *int32           `json:"min_priority_threshold,omitempty"`
	GrpJobs              *int32           `json:"grp_jobs,omitempty"`
	GrpJobsAccrue        *int32           `json:"grp_jobs_accrue,omitempty"`
	GrpNodes             *int32           `json:"grp_nodes,omitempty"`
	GrpCPUs              *int32           `json:"grp_cpus,omitempty"`
	GrpMemory            *int64           `json:"grp_memory,omitempty"`
	GrpSubmitJobs        *int32           `json:"grp_submit_jobs,omitempty"`
	GrpWallTime          *int32           `json:"grp_wall_time,omitempty"`
	GrpCPUTime           *int32           `json:"grp_cpu_time,omitempty"`
	GrpCPURunMins        *int64           `json:"grp_cpu_run_mins,omitempty"`
	GrpTRES              map[string]int64 `json:"grp_tres,omitempty"`
	GrpTRESMins          map[string]int64 `json:"grp_tres_mins,omitempty"`
	GrpTRESRunMins       map[string]int64 `json:"grp_tres_run_mins,omitempty"`
	MaxTRES              map[string]int64 `json:"max_tres,omitempty"`
	MaxTRESPerNode       map[string]int64 `json:"max_tres_per_node,omitempty"`
	MaxTRESMins          map[string]int64 `json:"max_tres_mins,omitempty"`
	MinTRES              map[string]int64 `json:"min_tres,omitempty"`
}

AssociationUpdate represents the data needed to update an association

type AssociationUpdateRequest

type AssociationUpdateRequest = AssociationUpdate

AssociationUpdateRequest is an alias for AssociationUpdate

type AssociationUsage

type AssociationUsage struct {
	AssociationId    string             `json:"association_id"`
	Account          string             `json:"account_name"`
	User             string             `json:"user_name,omitempty"`
	Cluster          string             `json:"cluster"`
	StartTime        time.Time          `json:"start_time"`
	EndTime          time.Time          `json:"end_time"`
	AllocatedCPUTime int64              `json:"allocated_cpu_time"`
	CPUTime          int64              `json:"cpu_time"`
	WallTime         int64              `json:"wall_time"`
	Energy           int64              `json:"energy,omitempty"`
	JobCount         int32              `json:"job_count"`
	TRESUsage        map[string]float64 `json:"tres_usage,omitempty"`
}

AssociationUsage represents usage statistics for an association

type AssociationUser

type AssociationUser struct {
	User        string       `json:"user_name"`
	Association *Association `json:"association,omitempty"`
}

AssociationUser represents a user within an association hierarchy

type BatchAnalysisOptions

type BatchAnalysisOptions struct {
	IncludeDetails     bool     `json:"include_details"`
	IncludeComparison  bool     `json:"include_comparison"`
	ComparisonBaseline string   `json:"comparison_baseline"`
	MetricTypes        []string `json:"metric_types"`
}

BatchAnalysisOptions configures batch analysis.

type BatchComparison

type BatchComparison struct {
	Baseline        string  `json:"baseline"`
	EfficiencyDelta float64 `json:"efficiency_delta"`
	RuntimeDelta    float64 `json:"runtime_delta"`
	WasteDelta      float64 `json:"waste_delta"`
	CostDelta       float64 `json:"cost_delta"`
}

BatchComparison compares batch to baseline.

type BatchJobAnalysis

type BatchJobAnalysis struct {
	JobCount      int       `json:"job_count"`
	AnalyzedCount int       `json:"analyzed_count"`
	FailedCount   int       `json:"failed_count"`
	TimeRange     TimeRange `json:"time_range"`

	AggregateStats BatchStatistics `json:"aggregate_stats"`

	JobAnalyses []JobAnalysisSummary `json:"job_analyses,omitempty"`

	Comparison *BatchComparison `json:"comparison,omitempty"`

	Patterns []BatchPattern `json:"patterns"`
	Outliers []string       `json:"outlier_job_ids"`

	BatchRecommendations []BatchRecommendation `json:"recommendations"`
}

BatchJobAnalysis represents batch job analysis results.

type BatchPattern

type BatchPattern struct {
	Type        string   `json:"type"`
	Description string   `json:"description"`
	JobCount    int      `json:"job_count"`
	JobIDs      []string `json:"job_ids"`
	Impact      string   `json:"impact"`
	Confidence  float64  `json:"confidence"`
}

BatchPattern represents a detected pattern.

type BatchRecommendation

type BatchRecommendation struct {
	Category     string   `json:"category"`
	Priority     string   `json:"priority"`
	Title        string   `json:"title"`
	Description  string   `json:"description"`
	Impact       string   `json:"impact"`
	JobsAffected []string `json:"jobs_affected"`
}

BatchRecommendation provides batch-level recommendations.

type BatchStatistics

type BatchStatistics struct {
	TotalCPUHours     float64       `json:"total_cpu_hours"`
	TotalMemoryGBH    float64       `json:"total_memory_gb_hours"`
	TotalGPUHours     float64       `json:"total_gpu_hours"`
	AverageEfficiency float64       `json:"average_efficiency"`
	MedianEfficiency  float64       `json:"median_efficiency"`
	StdDevEfficiency  float64       `json:"std_dev_efficiency"`
	TotalWaste        ResourceWaste `json:"total_waste"`
	AverageRuntime    time.Duration `json:"average_runtime"`
	SuccessRate       float64       `json:"success_rate"`
}

BatchStatistics represents aggregate statistics.

type BulkDeleteOptions

type BulkDeleteOptions struct {
	Users      []string `json:"users,omitempty"`
	Accounts   []string `json:"accounts,omitempty"`
	Clusters   []string `json:"clusters,omitempty"`
	Partitions []string `json:"partitions,omitempty"`
	OnlyIfIdle bool     `json:"only_if_idle,omitempty"`
	Force      bool     `json:"force,omitempty"`
}

BulkDeleteOptions configures bulk association deletion.

type BulkDeleteResponse

type BulkDeleteResponse struct {
	Deleted             int            `json:"deleted"`
	Failed              int            `json:"failed"`
	Errors              []string       `json:"errors,omitempty"`
	DeletedAssociations []*Association `json:"deleted_associations,omitempty"`
}

BulkDeleteResponse represents bulk deletion results.

type CPUAnalytics

type CPUAnalytics struct {
	AllocatedCores     int     `json:"allocated_cores"`
	RequestedCores     int     `json:"requested_cores"`
	UsedCores          float64 `json:"used_cores"`
	UtilizationPercent float64 `json:"utilization_percent"`
	EfficiencyPercent  float64 `json:"efficiency_percent"`
	IdleCores          float64 `json:"idle_cores"`
	Oversubscribed     bool    `json:"oversubscribed"`

	CoreMetrics []CPUCoreMetric `json:"core_metrics,omitempty"`

	AverageTemperature     float64 `json:"average_temperature"`
	MaxTemperature         float64 `json:"max_temperature"`
	ThermalThrottleEvents  int64   `json:"thermal_throttle_events"`
	AverageFrequency       float64 `json:"average_frequency_ghz"`
	MaxFrequency           float64 `json:"max_frequency_ghz"`
	FrequencyScalingEvents int64   `json:"frequency_scaling_events"`

	ContextSwitches  int64   `json:"context_switches"`
	Interrupts       int64   `json:"interrupts"`
	SoftInterrupts   int64   `json:"soft_interrupts"`
	LoadAverage1Min  float64 `json:"load_average_1min"`
	LoadAverage5Min  float64 `json:"load_average_5min"`
	LoadAverage15Min float64 `json:"load_average_15min"`

	L1CacheHitRate float64 `json:"l1_cache_hit_rate"`
	L2CacheHitRate float64 `json:"l2_cache_hit_rate"`
	L3CacheHitRate float64 `json:"l3_cache_hit_rate"`
	L1CacheMisses  int64   `json:"l1_cache_misses"`
	L2CacheMisses  int64   `json:"l2_cache_misses"`
	L3CacheMisses  int64   `json:"l3_cache_misses"`

	InstructionsPerCycle int64 `json:"instructions_per_cycle"`
	BranchMispredictions int64 `json:"branch_mispredictions"`
	TotalInstructions    int64 `json:"total_instructions"`

	Recommendations []OptimizationRecommendation `json:"recommendations,omitempty"`
	Bottlenecks     []PerformanceBottleneck      `json:"bottlenecks,omitempty"`

	Metadata map[string]interface{} `json:"metadata,omitempty"`
}

CPUAnalytics provides detailed CPU analytics.

type CPUBindingFlagsValue

type CPUBindingFlagsValue string

CPUBindingFlagsValue represents possible values for CPUBindingFlags field.

const (
	CPUBindingFlagsCPUBindToThreads        CPUBindingFlagsValue = "CPU_BIND_TO_THREADS"
	CPUBindingFlagsCPUBindToCores          CPUBindingFlagsValue = "CPU_BIND_TO_CORES"
	CPUBindingFlagsCPUBindToSockets        CPUBindingFlagsValue = "CPU_BIND_TO_SOCKETS"
	CPUBindingFlagsCPUBindToLdoms          CPUBindingFlagsValue = "CPU_BIND_TO_LDOMS"
	CPUBindingFlagsCPUBindNone             CPUBindingFlagsValue = "CPU_BIND_NONE"
	CPUBindingFlagsCPUBindRank             CPUBindingFlagsValue = "CPU_BIND_RANK"
	CPUBindingFlagsCPUBindMap              CPUBindingFlagsValue = "CPU_BIND_MAP"
	CPUBindingFlagsCPUBindMask             CPUBindingFlagsValue = "CPU_BIND_MASK"
	CPUBindingFlagsCPUBindLdrank           CPUBindingFlagsValue = "CPU_BIND_LDRANK"
	CPUBindingFlagsCPUBindLdmap            CPUBindingFlagsValue = "CPU_BIND_LDMAP"
	CPUBindingFlagsCPUBindLdmask           CPUBindingFlagsValue = "CPU_BIND_LDMASK"
	CPUBindingFlagsVerbose                 CPUBindingFlagsValue = "VERBOSE"
	CPUBindingFlagsCPUBindOneThreadPerCore CPUBindingFlagsValue = "CPU_BIND_ONE_THREAD_PER_CORE"
)

CPUBindingFlagsValue constants.

type CPUCoreMetric

type CPUCoreMetric struct {
	CoreID          int     `json:"core_id"`
	Utilization     float64 `json:"utilization_percent"`
	Frequency       float64 `json:"frequency_ghz"`
	Temperature     float64 `json:"temperature_celsius"`
	LoadAverage     float64 `json:"load_average"`
	ContextSwitches int64   `json:"context_switches"`
	Interrupts      int64   `json:"interrupts"`
}

CPUCoreMetric represents per-core CPU metrics.

type CertFlagsValue

type CertFlagsValue string

CertFlagsValue represents possible values for CertFlags field.

const (
	CertFlagsTokenSet CertFlagsValue = "TOKEN_SET"
)

CertFlagsValue constants.

type ChartData

type ChartData struct {
	ChartID     string                 `json:"chart_id"`
	ChartType   string                 `json:"chart_type"`
	Title       string                 `json:"title"`
	Description string                 `json:"description"`
	Data        map[string]interface{} `json:"data"`
	Options     map[string]interface{} `json:"options"`
}

ChartData represents chart data for visualization.

type ClientCapabilities

type ClientCapabilities struct {
	// Version is the API version string (e.g., "v0.0.41")
	Version string

	// Resource Manager Support
	SupportsJobs         bool
	SupportsNodes        bool
	SupportsPartitions   bool
	SupportsReservations bool

	// Database Manager Support
	SupportsAccounts     bool
	SupportsUsers        bool
	SupportsQoS          bool
	SupportsClusters     bool
	SupportsAssociations bool
	SupportsWCKeys       bool

	// Write Operations Support
	SupportsJobSubmit        bool
	SupportsJobUpdate        bool
	SupportsJobCancel        bool
	SupportsNodeUpdate       bool
	SupportsPartitionWrite   bool
	SupportsReservationWrite bool

	// Database Write Operations
	SupportsAccountWrite     bool
	SupportsUserWrite        bool
	SupportsQoSWrite         bool
	SupportsClusterWrite     bool
	SupportsAssociationWrite bool
	SupportsWCKeyWrite       bool

	// Advanced Features
	SupportsTRES        bool
	SupportsInstances   bool
	SupportsReconfigure bool
	SupportsDiagnostics bool
	SupportsShares      bool
	SupportsLicenses    bool

	// Extended Features (not implemented in all versions)
	// IMPORTANT: Check these capabilities before calling the corresponding methods.
	// Methods return "not implemented" error when capability is false.
	SupportsJobSteps       bool // Jobs().Steps() method - returns job step info
	SupportsJobWatch       bool // Jobs().Watch() method - real-time job events
	SupportsNodeWatch      bool // Nodes().Watch() method - real-time node events
	SupportsPartitionWatch bool // Partitions().Watch() method - real-time partition events
	SupportsAnalytics      bool // Analytics() returns non-nil manager (computed insights, NOT part of SLURM REST API)

	// Extended Account/User Operations (PLANNED - NOT YET IMPLEMENTED)
	// These helper methods require database queries beyond the base adapter.
	// All currently return "not implemented" error regardless of version.
	// See examples/user-account-management for usage patterns when implemented.
	SupportsAccountHierarchy bool // GetAccountHierarchy, GetParentAccounts, GetChildAccounts
	SupportsAccountQuotas    bool // GetAccountQuotas, GetAccountQuotaUsage
	SupportsUserHelpers      bool // GetUserAccounts, GetUserQuotas, GetUserDefaultAccount
	SupportsFairShare        bool // GetAccountFairShare, GetUserFairShare, GetFairShareHierarchy

	// Cluster Operations (limited in adapter pattern)
	SupportsClusterCreate bool // Cluster().Create()
	SupportsClusterUpdate bool // Cluster().Update()
	SupportsClusterDelete bool // Cluster().Delete()

	// Bulk Operations
	SupportsAssociationBulkDelete bool // Associations().BulkDelete()
}

ClientCapabilities describes the features supported by a specific API version. Callers should check these capabilities before invoking optional features to avoid runtime errors.

type ClientConfig

type ClientConfig struct {
	BaseURL    string
	HTTPClient HTTPDoer
	Debug      bool
}

type Cluster

type Cluster struct {
	Associations *ClusterAssociations          `json:"associations,omitempty"`
	Controller   *ClusterController            `json:"controller,omitempty"`
	Flags        []ClusterControllerFlagsValue `json:"flags,omitempty"`       // Flags
	Name         *string                       `json:"name,omitempty"`        // ClusterName
	Nodes        *string                       `json:"nodes,omitempty"`       // Node names
	RpcVersion   *int32                        `json:"rpc_version,omitempty"` // RPC version used in the cluster
	SelectPlugin *string                       `json:"select_plugin,omitempty"`
	TRES         []TRES                        `json:"tres,omitempty"` // Trackable resources
}

Cluster represents a SLURM Cluster.

type ClusterAssociations

type ClusterAssociations struct {
	Root *AssocShort `json:"root,omitempty"` // Root association information
}

ClusterAssociations is a nested type within its parent.

type ClusterController

type ClusterController struct {
	Host *string `json:"host,omitempty"` // ControlHost
	Port *int32  `json:"port,omitempty"` // ControlPort
}

ClusterController is a nested type within its parent.

type ClusterControllerFlagsValue

type ClusterControllerFlagsValue string

ClusterControllerFlagsValue represents possible values for ClusterControllerFlags field.

const (
	ClusterControllerFlagsDeleted        ClusterControllerFlagsValue = "DELETED"
	ClusterControllerFlagsRegistering    ClusterControllerFlagsValue = "REGISTERING"
	ClusterControllerFlagsMultipleSlurmd ClusterControllerFlagsValue = "MULTIPLE_SLURMD"
	ClusterControllerFlagsFederation     ClusterControllerFlagsValue = "FEDERATION"
	ClusterControllerFlagsExternal       ClusterControllerFlagsValue = "EXTERNAL"
)

ClusterControllerFlagsValue constants.

type ClusterCreate

type ClusterCreate struct {
	Name           string   `json:"name"`
	ControllerHost string   `json:"controller_host,omitempty"`
	ControllerPort int32    `json:"controller_port,omitempty"`
	Nodes          string   `json:"nodes,omitempty"`
	RpcVersion     int32    `json:"rpc_version,omitempty"`
	SelectPlugin   string   `json:"select_plugin,omitempty"`
	Flags          []string `json:"flags,omitempty"`
}

ClusterCreate represents a request to create a new cluster

type ClusterCreateResponse

type ClusterCreateResponse struct {
	Name    string                 `json:"name"`
	Status  string                 `json:"status"`
	Message string                 `json:"message,omitempty"`
	Meta    map[string]interface{} `json:"meta,omitempty"`
}

ClusterCreateResponse represents the response from creating a cluster

type ClusterDeleteOptions

type ClusterDeleteOptions struct {
	Classification string `json:"classification,omitempty"`
	Flags          string `json:"flags,omitempty"`
}

ClusterDeleteOptions provides options for deleting clusters

type ClusterInfo

type ClusterInfo struct {
	Version     string `json:"version"`
	Release     string `json:"release"`
	ClusterName string `json:"cluster_name"`
	APIVersion  string `json:"api_version"`
	Uptime      int    `json:"uptime"`
}

ClusterInfo represents cluster information (mirrors interfaces.ClusterInfo)

type ClusterList

type ClusterList struct {
	Clusters []Cluster              `json:"clusters"`
	Total    int                    `json:"total"`
	Meta     map[string]interface{} `json:"meta,omitempty"`
}

ClusterList represents a list of clusters

type ClusterListOptions

type ClusterListOptions struct {
	UpdateTime     *time.Time `json:"update_time,omitempty"`
	Classification string     `json:"classification,omitempty"`
	Flags          string     `json:"flags,omitempty"`

	// Limit specifies the maximum number of clusters to return.
	// WARNING: Due to SLURM REST API limitations, this is CLIENT-SIDE pagination.
	// The full cluster list is fetched from the server, then sliced. Consider using
	// filtering options (Classification, Flags) to reduce the dataset before pagination.
	Limit int `json:"limit,omitempty"`

	// Offset specifies the number of clusters to skip before returning results.
	// WARNING: This is CLIENT-SIDE pagination - see Limit field documentation.
	Offset int `json:"offset,omitempty"`
}

ClusterListOptions provides filtering options for cluster listing

type ClusterManager

type ClusterManager interface {
	List(ctx context.Context, opts *ListClustersOptions) (*ClusterList, error)
	Get(ctx context.Context, clusterName string) (*Cluster, error)
	Create(ctx context.Context, cluster *ClusterCreate) (*ClusterCreateResponse, error)
	// Note: SLURM REST API does not support cluster updates - clusters can only be created or deleted
	Delete(ctx context.Context, clusterName string) error
}

type ClusterOverview

type ClusterOverview struct {
	ClusterUtilization float64 `json:"cluster_utilization"`
	ClusterEfficiency  float64 `json:"cluster_efficiency"`
	TotalNodes         int     `json:"total_nodes"`
	ActiveNodes        int     `json:"active_nodes"`
	TotalCPUCores      int     `json:"total_cpu_cores"`
	TotalMemoryGB      float64 `json:"total_memory_gb"`
	TotalGPUs          int     `json:"total_gpus"`
}

ClusterOverview provides cluster-level overview.

type ClusterStats

type ClusterStats struct {
	TotalNodes     int `json:"total_nodes"`
	IdleNodes      int `json:"idle_nodes"`
	AllocatedNodes int `json:"allocated_nodes"`
	TotalCPUs      int `json:"total_cpus"`
	IdleCPUs       int `json:"idle_cpus"`
	AllocatedCPUs  int `json:"allocated_cpus"`
	TotalJobs      int `json:"total_jobs"`
	RunningJobs    int `json:"running_jobs"`
	PendingJobs    int `json:"pending_jobs"`
	CompletedJobs  int `json:"completed_jobs"`
}

ClusterStats represents cluster statistics (mirrors interfaces.ClusterStats)

type ClusterUpdate

type ClusterUpdate struct {
	ControlHost        *string  `json:"control_host,omitempty"`
	ControlPort        *int32   `json:"control_port,omitempty"`
	RPCVersion         *int32   `json:"rpc_version,omitempty"`
	PluginIDSelect     *int32   `json:"plugin_id_select,omitempty"`
	PluginIDAuth       *int32   `json:"plugin_id_auth,omitempty"`
	PluginIDAcct       *int32   `json:"plugin_id_acct,omitempty"`
	TRESList           []string `json:"tres_list,omitempty"`
	Features           []string `json:"features,omitempty"`
	FederationFeatures []string `json:"federation_features,omitempty"`
	FederationState    *string  `json:"federation_state,omitempty"`
}

ClusterUpdate represents a request to update an existing cluster

type Config

type Config struct {
	AccountingStorageType      string                 `json:"accounting_storage_type,omitempty"`
	AccountingStorageHost      string                 `json:"accounting_storage_host,omitempty"`
	AccountingStoragePort      int                    `json:"accounting_storage_port,omitempty"`
	AccountingStorageUser      string                 `json:"accounting_storage_user,omitempty"`
	AccountingStorageEnforce   []string               `json:"accounting_storage_enforce,omitempty"`
	ClusterName                string                 `json:"cluster_name"`
	ControlMachine             []string               `json:"control_machine,omitempty"`
	ControlAddr                string                 `json:"control_addr,omitempty"`
	BackupController           string                 `json:"backup_controller,omitempty"`
	BackupAddr                 string                 `json:"backup_addr,omitempty"`
	SlurmUser                  string                 `json:"slurm_user"`
	SlurmUID                   int                    `json:"slurm_uid"`
	SlurmGID                   int                    `json:"slurm_gid"`
	SlurmctldPort              int                    `json:"slurmctld_port"`
	SlurmdPort                 int                    `json:"slurmd_port"`
	FirstJobID                 int                    `json:"first_job_id"`
	MaxJobCount                int                    `json:"max_job_count"`
	MaxJobTime                 int                    `json:"max_job_time,omitempty"`
	MinJobAge                  int                    `json:"min_job_age"`
	StateLocation              string                 `json:"state_location"`
	StateSaveLocation          string                 `json:"state_save_location,omitempty"`
	SlurmctldPidFile           string                 `json:"slurmctld_pid_file"`
	SlurmdPidFile              string                 `json:"slurmd_pid_file"`
	SlurmdSpoolDir             string                 `json:"slurmd_spool_dir"`
	SlurmctldLogFile           string                 `json:"slurmctld_log_file,omitempty"`
	SlurmdLogFile              string                 `json:"slurmd_log_file,omitempty"`
	SlurmctldDebug             string                 `json:"slurmctld_debug,omitempty"`
	SlurmdDebug                string                 `json:"slurmd_debug,omitempty"`
	SchedulerType              string                 `json:"scheduler_type"`
	SchedulerParameters        map[string]interface{} `json:"scheduler_parameters,omitempty"`
	SelectType                 string                 `json:"select_type"`
	PreemptType                string                 `json:"preempt_type,omitempty"`
	PreemptMode                string                 `json:"preempt_mode,omitempty"`
	PriorityType               string                 `json:"priority_type"`
	PriorityDecayHalfLife      int                    `json:"priority_decay_half_life,omitempty"`
	PriorityMaxAge             int                    `json:"priority_max_age,omitempty"`
	PriorityWeightAge          int                    `json:"priority_weight_age,omitempty"`
	PriorityWeightFairshare    int                    `json:"priority_weight_fairshare,omitempty"`
	PriorityWeightJobSize      int                    `json:"priority_weight_job_size,omitempty"`
	PriorityWeightPartition    int                    `json:"priority_weight_partition,omitempty"`
	PriorityWeightQOS          int                    `json:"priority_weight_qos,omitempty"`
	ProctrackType              string                 `json:"proctrack_type"`
	SwitchType                 string                 `json:"switch_type,omitempty"`
	TaskPlugin                 string                 `json:"task_plugin"`
	TopologyPlugin             string                 `json:"topology_plugin,omitempty"`
	TreeWidth                  int                    `json:"tree_width,omitempty"`
	CPUFreqDef                 string                 `json:"cpu_freq_def,omitempty"`
	CPUFreqGovernors           string                 `json:"cpu_freq_governors,omitempty"`
	CompleteWait               int                    `json:"complete_wait,omitempty"`
	DefMemPerCPU               int                    `json:"def_mem_per_cpu,omitempty"`
	EnforcePartLimits          string                 `json:"enforce_part_limits,omitempty"`
	KillOnBadExit              bool                   `json:"kill_on_bad_exit,omitempty"`
	KillWait                   int                    `json:"kill_wait,omitempty"`
	MaxMemPerCPU               int                    `json:"max_mem_per_cpu,omitempty"`
	MailProg                   string                 `json:"mail_prog,omitempty"`
	PluginDir                  string                 `json:"plugin_dir,omitempty"`
	PlugStackConfig            string                 `json:"plug_stack_config,omitempty"`
	PrivateData                []string               `json:"private_data,omitempty"`
	PropagateResourceLimits    string                 `json:"propagate_resource_limits,omitempty"`
	PropagateResourceLimitsAll string                 `json:"propagate_resource_limits_all,omitempty"`
	ResumeProgram              string                 `json:"resume_program,omitempty"`
	SuspendProgram             string                 `json:"suspend_program,omitempty"`
	SuspendTime                int                    `json:"suspend_time,omitempty"`
	ResumeTimeout              int                    `json:"resume_timeout,omitempty"`
	SuspendTimeout             int                    `json:"suspend_timeout,omitempty"`
	TCPTimeout                 int                    `json:"tcp_timeout,omitempty"`
	UnkillableStepTimeout      int                    `json:"unkillable_step_timeout,omitempty"`
	Version                    string                 `json:"version"`
	Meta                       map[string]interface{} `json:"meta,omitempty"`
}

Config represents SLURM configuration

type Coord

type Coord struct {
	Direct *bool  `json:"direct,omitempty"` // Indicates whether the coordinator was directly assigned to this account
	Name   string `json:"name"`             // User name
}

Coord represents a SLURM Coord.

type CreateTRESRequest

type CreateTRESRequest struct {
	Type        string `json:"type"`
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
	Count       int64  `json:"count,omitempty"`
}

CreateTRESRequest represents a request to create TRES

type CronEntry

type CronEntry struct {
	Command       *string        `json:"command,omitempty"`      // Command to run
	DayOfMonth    *string        `json:"day_of_month,omitempty"` // Ranged string specifying eligible day of month values (e.g. 0-10,29)
	DayOfWeek     *string        `json:"day_of_week,omitempty"`  // Ranged string specifying eligible day of week values (e.g.0-3,7)
	Flags         []FlagsValue   `json:"flags,omitempty"`        // Flags
	Hour          *string        `json:"hour,omitempty"`         // Ranged string specifying eligible hour values (e.g. 0-5,23)
	Line          *CronEntryLine `json:"line,omitempty"`
	Minute        *string        `json:"minute,omitempty"`        // Ranged string specifying eligible minute values (e.g. 0-10,50)
	Month         *string        `json:"month,omitempty"`         // Ranged string specifying eligible month values (e.g. 0-5,12)
	Specification *string        `json:"specification,omitempty"` // Complete time specification (* means valid for all allowed values) - minute...
}

CronEntry represents a SLURM CronEntry.

type CronEntryLine

type CronEntryLine struct {
	End   *int32 `json:"end,omitempty"`   // End of this entry in file
	Start *int32 `json:"start,omitempty"` // Start of this entry in file
}

CronEntryLine is a nested type within its parent.

type CrossResourceAnalysis

type CrossResourceAnalysis struct {
	PrimaryBottleneck     string  `json:"primary_bottleneck"`
	SecondaryBottleneck   string  `json:"secondary_bottleneck"`
	BottleneckSeverity    string  `json:"bottleneck_severity"`
	ResourceBalance       string  `json:"resource_balance"`
	OptimizationPotential float64 `json:"optimization_potential_percent"`
	ScalabilityScore      float64 `json:"scalability_score"`
	ResourceWaste         float64 `json:"resource_waste_percent"`
	LoadBalanceScore      float64 `json:"load_balance_score"`
}

CrossResourceAnalysis analyzes cross-resource interactions.

type DeleteAssociationOptions

type DeleteAssociationOptions struct {
	User      string `json:"user"`
	Account   string `json:"account"`
	Cluster   string `json:"cluster,omitempty"`
	Partition string `json:"partition,omitempty"`
	Force     bool   `json:"force,omitempty"`
}

DeleteAssociationOptions configures association deletion.

type Diagnostics

type Diagnostics struct {
	DataCollected        time.Time              `json:"data_collected"`
	ReqTime              int64                  `json:"req_time"`
	ReqTimeStart         int64                  `json:"req_time_start"`
	ServerThreadCount    int                    `json:"server_thread_count"`
	AgentQueueSize       int                    `json:"agent_queue_size"`
	AgentCount           int                    `json:"agent_count"`
	AgentThreadCount     int                    `json:"agent_thread_count"`
	DBDAgentCount        int                    `json:"dbd_agent_count"`
	GittosCount          int                    `json:"gittos_count"`
	GittosTime           int64                  `json:"gittos_time"`
	ScheduleCycleLast    int64                  `json:"schedule_cycle_last"`
	ScheduleCycleMax     int64                  `json:"schedule_cycle_max"`
	ScheduleCycleMean    int64                  `json:"schedule_cycle_mean"`
	ScheduleCycleSum     int64                  `json:"schedule_cycle_sum"`
	ScheduleCycleCounter int                    `json:"schedule_cycle_counter"`
	ScheduleCycleDepth   int                    `json:"schedule_cycle_depth"`
	ScheduleQueueLen     int                    `json:"schedule_queue_len"`
	JobsSubmitted        int                    `json:"jobs_submitted"`
	JobsStarted          int                    `json:"jobs_started"`
	JobsCompleted        int                    `json:"jobs_completed"`
	JobsCanceled         int                    `json:"jobs_canceled"`
	JobsFailed           int                    `json:"jobs_failed"`
	JobsPending          int                    `json:"jobs_pending"`
	JobsRunning          int                    `json:"jobs_running"`
	JobStatesTs          time.Time              `json:"job_states_ts"`
	BFActive             bool                   `json:"bf_active"`
	BFBackfilledJobs     int                    `json:"bf_backfilled_jobs"`
	BFCycle              int                    `json:"bf_cycle"`
	BFCycleMean          int64                  `json:"bf_cycle_mean"`
	BFCycleMax           int64                  `json:"bf_cycle_max"`
	BFDepth              int                    `json:"bf_depth"`
	BFDepthMean          int                    `json:"bf_depth_mean"`
	BFDepthSum           int                    `json:"bf_depth_sum"`
	BFQueueLen           int                    `json:"bf_queue_len"`
	BFQueueLenMean       int                    `json:"bf_queue_len_mean"`
	BFQueueLenSum        int                    `json:"bf_queue_len_sum"`
	BFTableSize          int                    `json:"bf_table_size"`
	BFTableSizeMean      int                    `json:"bf_table_size_mean"`
	BFTableSizeSum       int                    `json:"bf_table_size_sum"`
	BFWhenLastCycle      time.Time              `json:"bf_when_last_cycle"`
	BFActive2            bool                   `json:"bf_active2"`
	RPCsQueued           int                    `json:"rpcs_queued"`
	RPCsDropped          int                    `json:"rpcs_dropped"`
	RPCsCompleted        int                    `json:"rpcs_completed"`
	RPCsQueued2          int                    `json:"rpcs_queued2"`
	Meta                 map[string]interface{} `json:"meta,omitempty"`
}

Diagnostics represents SLURM diagnostics information

type EfficiencyDataPoint

type EfficiencyDataPoint struct {
	Timestamp   time.Time `json:"timestamp"`
	Efficiency  float64   `json:"efficiency"`
	JobCount    int       `json:"job_count"`
	CPUHours    float64   `json:"cpu_hours"`
	MemoryGBH   float64   `json:"memory_gb_hours"`
	WastedHours float64   `json:"wasted_cpu_hours"`
}

EfficiencyDataPoint represents an efficiency data point.

type EfficiencyPoint

type EfficiencyPoint struct {
	Timestamp  time.Time `json:"timestamp"`
	Efficiency float64   `json:"efficiency"`
	JobCount   int       `json:"job_count"`
}

EfficiencyPoint represents an efficiency data point.

type EfficiencyReport

type EfficiencyReport struct {
	ReportID    string    `json:"report_id"`
	GeneratedAt time.Time `json:"generated_at"`
	TimeRange   TimeRange `json:"time_range"`
	ReportType  string    `json:"report_type"`

	Summary ExecutiveSummary `json:"summary"`

	ClusterOverview   *ClusterOverview    `json:"cluster_overview,omitempty"`
	PartitionAnalysis []PartitionAnalysis `json:"partition_analysis,omitempty"`
	UserAnalysis      []UserAnalysis      `json:"user_analysis,omitempty"`
	ResourceAnalysis  *ResourceAnalysis   `json:"resource_analysis,omitempty"`

	TrendAnalysis *ReportTrendAnalysis `json:"trend_analysis,omitempty"`

	Recommendations []ReportRecommendation `json:"recommendations"`

	Charts []ChartData `json:"charts,omitempty"`
}

EfficiencyReport represents a complete efficiency report.

type EfficiencyTrendOptions

type EfficiencyTrendOptions struct {
	StartTime        *time.Time `json:"start_time,omitempty"`
	EndTime          *time.Time `json:"end_time,omitempty"`
	Granularity      string     `json:"granularity"`
	JobTypes         []string   `json:"job_types,omitempty"`
	Partitions       []string   `json:"partitions,omitempty"`
	CompareToAverage bool       `json:"compare_to_average"`
}

EfficiencyTrendOptions configures efficiency trend analysis.

type EnergyTimeSeries

type EnergyTimeSeries struct {
	PowerUsage        *ResourceTimeSeries `json:"power_usage,omitempty"`
	EnergyConsumption *ResourceTimeSeries `json:"energy_consumption,omitempty"`
	CarbonEmissions   *ResourceTimeSeries `json:"carbon_emissions,omitempty"`
}

EnergyTimeSeries represents energy time series data.

type EnergyUsage

type EnergyUsage struct {
	TotalEnergyJoules  float64                `json:"total_energy_joules"`
	AveragePowerWatts  float64                `json:"average_power_watts"`
	PeakPowerWatts     float64                `json:"peak_power_watts"`
	MinPowerWatts      float64                `json:"min_power_watts"`
	CPUEnergyJoules    float64                `json:"cpu_energy_joules"`
	GPUEnergyJoules    float64                `json:"gpu_energy_joules"`
	MemoryEnergyJoules float64                `json:"memory_energy_joules"`
	CarbonFootprint    float64                `json:"carbon_footprint_kg_co2"`
	PowerSources       map[string]float64     `json:"power_sources,omitempty"`
	Metadata           map[string]interface{} `json:"metadata,omitempty"`
}

EnergyUsage represents energy consumption metrics.

type ExecutiveSummary

type ExecutiveSummary struct {
	TotalJobs            int      `json:"total_jobs"`
	AverageEfficiency    float64  `json:"average_efficiency"`
	TotalCPUHours        float64  `json:"total_cpu_hours"`
	WastedCPUHours       float64  `json:"wasted_cpu_hours"`
	EstimatedCostSavings float64  `json:"estimated_cost_savings"`
	KeyFindings          []string `json:"key_findings"`
	ImprovementAreas     []string `json:"improvement_areas"`
}

ExecutiveSummary provides a high-level summary.

type ExitCode

type ExitCode struct {
	ReturnCode *uint32         `json:"return_code,omitempty"` // Process return code (numeric) (32 bit integer number with flags)
	Signal     *ExitCodeSignal `json:"signal,omitempty"`
	Status     []StatusValue   `json:"status,omitempty"` // Status given by return code
}

ExitCode represents a SLURM ExitCode.

type ExitCodeSignal

type ExitCodeSignal struct {
	ID   *uint16 `json:"id,omitempty"`   // Signal sent to process (numeric) (16 bit integer number with flags)
	Name *string `json:"name,omitempty"` // Signal sent to process (name)
}

ExitCodeSignal is a nested type within its parent.

type ExtendedDiagnostics

type ExtendedDiagnostics struct {
	// Basic cluster stats
	JobsSubmitted int `json:"jobs_submitted"`
	JobsStarted   int `json:"jobs_started"`
	JobsCompleted int `json:"jobs_completed"`
	JobsPending   int `json:"jobs_pending"`
	JobsRunning   int `json:"jobs_running"`

	// Extended job statistics
	JobsFailed   int `json:"jobs_failed"`
	JobsCanceled int `json:"jobs_canceled"`
	JobsTimeout  int `json:"jobs_timeout"`

	// Backfill statistics
	BackfillActive        bool  `json:"backfill_active"`
	BackfillJobsTotal     int   `json:"backfill_jobs_total"`
	BackfillJobsRecent    int   `json:"backfill_jobs_recent"`
	BackfillCycleCount    int   `json:"backfill_cycle_count"`
	BackfillCycleMeanTime int64 `json:"backfill_cycle_mean_time"`

	// Server performance
	ServerThreadCount int   `json:"server_thread_count"`
	AgentQueueSize    int   `json:"agent_queue_size"`
	ScheduleCycleMax  int   `json:"schedule_cycle_max"`
	ScheduleCycleLast int   `json:"schedule_cycle_last"`
	ScheduleCycleMean int64 `json:"schedule_cycle_mean"`

	// RPC statistics
	RPCsTotal     int `json:"rpcs_total"`
	RPCsPending   int `json:"rpcs_pending"`
	RPCsCompleted int `json:"rpcs_completed"`

	// Metadata
	DiagTime time.Time              `json:"diag_time"`
	RawData  map[string]interface{} `json:"raw_data,omitempty"`
}

ExtendedDiagnostics provides extended cluster diagnostics.

type FairShareHierarchy

type FairShareHierarchy struct {
	Cluster       string              `json:"cluster"`
	RootAccount   string              `json:"root_account"`
	Tree          *FairShareNode      `json:"tree"`
	TotalShares   int                 `json:"total_shares"`
	TotalUsage    float64             `json:"total_usage"`
	LastUpdate    time.Time           `json:"last_update"`
	DecayHalfLife int                 `json:"decay_half_life"`
	UsageWindow   int                 `json:"usage_window"`
	Algorithm     string              `json:"algorithm"`
	Accounts      []*AccountFairShare `json:"accounts,omitempty"`
	Users         []*UserFairShare    `json:"users,omitempty"`
}

FairShareHierarchy represents complete fairshare hierarchy.

type FairShareNode

type FairShareNode struct {
	Name             string           `json:"name"`
	Account          string           `json:"account,omitempty"`
	User             string           `json:"user,omitempty"`
	Parent           string           `json:"parent,omitempty"`
	Shares           int              `json:"shares"`
	NormalizedShares float64          `json:"normalized_shares"`
	Usage            float64          `json:"usage"`
	FairShareFactor  float64          `json:"fair_share_factor"`
	Level            int              `json:"level"`
	Children         []*FairShareNode `json:"children,omitempty"`
}

FairShareNode represents a node in the fairshare tree.

type FlagsValue

type FlagsValue string

FlagsValue represents possible values for Flags field.

const (
	FlagsKillInvalidDependency    FlagsValue = "KILL_INVALID_DEPENDENCY"
	FlagsNoKillInvalidDependency  FlagsValue = "NO_KILL_INVALID_DEPENDENCY"
	FlagsHasStateDirectory        FlagsValue = "HAS_STATE_DIRECTORY"
	FlagsTestingBackfill          FlagsValue = "TESTING_BACKFILL"
	FlagsGRESBindingEnforced      FlagsValue = "GRES_BINDING_ENFORCED"
	FlagsTestNowOnly              FlagsValue = "TEST_NOW_ONLY"
	FlagsSendJobEnvironment       FlagsValue = "SEND_JOB_ENVIRONMENT"
	FlagsSpreadJob                FlagsValue = "SPREAD_JOB"
	FlagsPreferMinimumNodeCount   FlagsValue = "PREFER_MINIMUM_NODE_COUNT"
	FlagsJobKillHurry             FlagsValue = "JOB_KILL_HURRY"
	FlagsSkipTRESStringAccounting FlagsValue = "SKIP_TRES_STRING_ACCOUNTING"
	FlagsSiblingClusterUpdateOnly FlagsValue = "SIBLING_CLUSTER_UPDATE_ONLY"
	FlagsHeterogeneousJob         FlagsValue = "HETEROGENEOUS_JOB"
	FlagsExactTaskCountRequested  FlagsValue = "EXACT_TASK_COUNT_REQUESTED"
	FlagsExactCPUCountRequested   FlagsValue = "EXACT_CPU_COUNT_REQUESTED"
	FlagsTestingWholeNodeBackfill FlagsValue = "TESTING_WHOLE_NODE_BACKFILL"
	FlagsTopPriorityJob           FlagsValue = "TOP_PRIORITY_JOB"
	FlagsAccrueCountCleared       FlagsValue = "ACCRUE_COUNT_CLEARED"
	FlagsGRESBindingDisabled      FlagsValue = "GRES_BINDING_DISABLED"
	FlagsJobWasRunning            FlagsValue = "JOB_WAS_RUNNING"
	FlagsJobAccrueTimeReset       FlagsValue = "JOB_ACCRUE_TIME_RESET"
	FlagsCronJob                  FlagsValue = "CRON_JOB"
	FlagsExactMemoryRequested     FlagsValue = "EXACT_MEMORY_REQUESTED"
	FlagsExternalJob              FlagsValue = "EXTERNAL_JOB"
	FlagsUsingDefaultAccount      FlagsValue = "USING_DEFAULT_ACCOUNT"
	FlagsUsingDefaultPartition    FlagsValue = "USING_DEFAULT_PARTITION"
	FlagsUsingDefaultQoS          FlagsValue = "USING_DEFAULT_QOS"
	FlagsUsingDefaultWckey        FlagsValue = "USING_DEFAULT_WCKEY"
	FlagsDependent                FlagsValue = "DEPENDENT"
	FlagsMagnetic                 FlagsValue = "MAGNETIC"
	FlagsPartitionAssigned        FlagsValue = "PARTITION_ASSIGNED"
	FlagsBackfillAttempted        FlagsValue = "BACKFILL_ATTEMPTED"
	FlagsSchedulingAttempted      FlagsValue = "SCHEDULING_ATTEMPTED"
	FlagsStepmgrEnabled           FlagsValue = "STEPMGR_ENABLED"
	FlagsSpreadSegments           FlagsValue = "SPREAD_SEGMENTS"
	FlagsConsolidateSegments      FlagsValue = "CONSOLIDATE_SEGMENTS"
	FlagsExpeditedRequeue         FlagsValue = "EXPEDITED_REQUEUE"
)

FlagsValue constants.

type GPUDeviceUtilization

type GPUDeviceUtilization struct {
	DeviceID          string               `json:"device_id"`
	DeviceName        string               `json:"device_name"`
	DeviceUUID        string               `json:"device_uuid"`
	Utilization       *ResourceUtilization `json:"utilization"`
	MemoryUtilization *ResourceUtilization `json:"memory_utilization"`
	PowerUsage        float64              `json:"power_usage_watts"`
	Temperature       float64              `json:"temperature_celsius"`
	PCIeBandwidth     *ResourceUtilization `json:"pcie_bandwidth,omitempty"`
	Processes         []GPUProcess         `json:"processes,omitempty"`
}

GPUDeviceUtilization represents per-GPU device metrics.

type GPUProcess

type GPUProcess struct {
	PID         int    `json:"pid"`
	ProcessName string `json:"process_name"`
	MemoryUsed  int64  `json:"memory_used_mb"`
}

GPUProcess represents a process using GPU resources.

type GPUUtilization

type GPUUtilization struct {
	DeviceCount        int                    `json:"device_count"`
	Devices            []GPUDeviceUtilization `json:"devices"`
	OverallUtilization *ResourceUtilization   `json:"overall_utilization"`
	MemoryUtilization  *ResourceUtilization   `json:"memory_utilization"`
	PowerUsage         *ResourceUtilization   `json:"power_usage"`
	Temperature        map[string]float64     `json:"temperature"`
	ComputeMode        string                 `json:"compute_mode"`
	DriverVersion      string                 `json:"driver_version"`
	CUDAVersion        string                 `json:"cuda_version"`
	Metadata           map[string]interface{} `json:"metadata,omitempty"`
}

GPUUtilization represents GPU usage metrics.

type GetAssociationOptions

type GetAssociationOptions struct {
	User      string `json:"user"`
	Account   string `json:"account"`
	Cluster   string `json:"cluster,omitempty"`
	Partition string `json:"partition,omitempty"`
	WithUsage bool   `json:"with_usage,omitempty"`
	WithTRES  bool   `json:"with_tres,omitempty"`
}

GetAssociationOptions configures association retrieval.

type GetInstanceOptions

type GetInstanceOptions struct {
	Cluster   string     `json:"cluster,omitempty"`
	Extra     string     `json:"extra,omitempty"`
	Format    string     `json:"format,omitempty"`
	Instance  string     `json:"instance,omitempty"`
	NodeList  string     `json:"node_list,omitempty"`
	TimeStart *time.Time `json:"time_start,omitempty"`
	TimeEnd   *time.Time `json:"time_end,omitempty"`
}

GetInstanceOptions provides filtering options for instances

type GetInstancesOptions

type GetInstancesOptions struct {
	Clusters  []string   `json:"clusters,omitempty"`
	Extra     string     `json:"extra,omitempty"`
	Format    string     `json:"format,omitempty"`
	Instance  string     `json:"instance,omitempty"`
	NodeList  string     `json:"node_list,omitempty"`
	TimeStart *time.Time `json:"time_start,omitempty"`
	TimeEnd   *time.Time `json:"time_end,omitempty"`
}

GetInstancesOptions provides filtering options for multiple instances

type GetSharesOptions

type GetSharesOptions struct {
	Users     []string `json:"users,omitempty"`
	Accounts  []string `json:"accounts,omitempty"`
	Clusters  []string `json:"clusters,omitempty"`
	Partition string   `json:"partition,omitempty"`
}

GetSharesOptions provides filtering options for shares

type HTTPDoer

type HTTPDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

ClientConfig represents client configuration. HTTPDoer is the interface that wraps the Do method for HTTP requests. This matches the HttpRequestDoer interface expected by the OpenAPI clients.

type IOAnalytics

type IOAnalytics struct {
	ReadBytes          int64   `json:"read_bytes"`
	WriteBytes         int64   `json:"write_bytes"`
	ReadOperations     int64   `json:"read_operations"`
	WriteOperations    int64   `json:"write_operations"`
	UtilizationPercent float64 `json:"utilization_percent"`
	EfficiencyPercent  float64 `json:"efficiency_percent"`

	AverageReadBandwidth  float64 `json:"average_read_bandwidth_mbps"`
	AverageWriteBandwidth float64 `json:"average_write_bandwidth_mbps"`
	PeakReadBandwidth     float64 `json:"peak_read_bandwidth_mbps"`
	PeakWriteBandwidth    float64 `json:"peak_write_bandwidth_mbps"`

	AverageReadLatency  float64 `json:"average_read_latency_ms"`
	AverageWriteLatency float64 `json:"average_write_latency_ms"`
	MaxReadLatency      float64 `json:"max_read_latency_ms"`
	MaxWriteLatency     float64 `json:"max_write_latency_ms"`

	QueueDepth    float64 `json:"queue_depth"`
	MaxQueueDepth float64 `json:"max_queue_depth"`
	QueueTime     float64 `json:"queue_time_ms"`

	RandomAccessPercent     float64 `json:"random_access_percent"`
	SequentialAccessPercent float64 `json:"sequential_access_percent"`

	AverageIOSize int64 `json:"average_io_size_bytes"`
	MaxIOSize     int64 `json:"max_io_size_bytes"`
	MinIOSize     int64 `json:"min_io_size_bytes"`

	StorageDevices []StorageDevice `json:"storage_devices,omitempty"`

	Recommendations []OptimizationRecommendation `json:"recommendations,omitempty"`
	Bottlenecks     []PerformanceBottleneck      `json:"bottlenecks,omitempty"`

	Metadata map[string]interface{} `json:"metadata,omitempty"`
}

IOAnalytics provides detailed I/O analytics.

type IOStats

type IOStats struct {
	MountPoint      string  `json:"mount_point"`
	BytesRead       int64   `json:"bytes_read"`
	BytesWritten    int64   `json:"bytes_written"`
	ReadsCompleted  int64   `json:"reads_completed"`
	WritesCompleted int64   `json:"writes_completed"`
	AvgReadLatency  float64 `json:"avg_read_latency_ms"`
	AvgWriteLatency float64 `json:"avg_write_latency_ms"`
}

IOStats represents I/O statistics for a filesystem.

type IOTimeSeries

type IOTimeSeries struct {
	ReadBandwidth  *ResourceTimeSeries `json:"read_bandwidth,omitempty"`
	WriteBandwidth *ResourceTimeSeries `json:"write_bandwidth,omitempty"`
	ReadIOPS       *ResourceTimeSeries `json:"read_iops,omitempty"`
	WriteIOPS      *ResourceTimeSeries `json:"write_iops,omitempty"`
}

IOTimeSeries represents I/O time series data.

type IOUtilization

type IOUtilization struct {
	ReadBandwidth     *ResourceUtilization   `json:"read_bandwidth"`
	WriteBandwidth    *ResourceUtilization   `json:"write_bandwidth"`
	ReadIOPS          *ResourceUtilization   `json:"read_iops"`
	WriteIOPS         *ResourceUtilization   `json:"write_iops"`
	TotalBytesRead    int64                  `json:"total_bytes_read"`
	TotalBytesWritten int64                  `json:"total_bytes_written"`
	FileSystems       map[string]IOStats     `json:"file_systems,omitempty"`
	Metadata          map[string]interface{} `json:"metadata,omitempty"`
}

IOUtilization represents I/O usage metrics.

type InfoManager

type InfoManager interface {
	Get(ctx context.Context) (*ClusterInfo, error)
	Ping(ctx context.Context) error
	PingDatabase(ctx context.Context) error
	Stats(ctx context.Context) (*ClusterStats, error)
	Version(ctx context.Context) (*APIVersion, error)
}

type Instance

type Instance struct {
	Cluster      string    `json:"cluster"`
	ExtraInfo    string    `json:"extra,omitempty"`
	Instance     string    `json:"instance"`
	InstanceID   string    `json:"instance_id"`
	InstanceType string    `json:"instance_type"`
	NodeCount    int       `json:"node_count,omitempty"`
	TimeStart    time.Time `json:"time_start,omitempty"`
	TimeEnd      time.Time `json:"time_end,omitempty"`
}

Instance represents a SLURM database instance

type InstanceList

type InstanceList struct {
	Instances []Instance             `json:"instances"`
	Meta      map[string]interface{} `json:"meta,omitempty"`
}

InstanceList represents a list of instances

type Job

type Job struct {
	Account                  *string                `json:"account,omitempty"`                    // Account associated with the job
	AccrueTime               time.Time              `json:"accrue_time,omitempty"`                // When the job started accruing age priority (UNIX timestamp) (UNIX timestamp or...
	AdminComment             *string                `json:"admin_comment,omitempty"`              // Arbitrary comment made by administrator
	AllocatingNode           *string                `json:"allocating_node,omitempty"`            // Local node making the resource allocation
	ArrayJobID               *uint32                `json:"array_job_id,omitempty"`               // Job ID of job array, or 0 if N/A (32 bit integer number with flags)
	ArrayMaxTasks            *uint32                `json:"array_max_tasks,omitempty"`            // Maximum number of simultaneously running array tasks, 0 if no limit (32 bit...
	ArrayTaskID              *uint32                `json:"array_task_id,omitempty"`              // Task ID of this task in job array (32 bit integer number with flags)
	ArrayTaskString          *string                `json:"array_task_string,omitempty"`          // String expression of task IDs in this record
	AssociationID            *int32                 `json:"association_id,omitempty"`             // Unique identifier for the association
	BatchFeatures            *string                `json:"batch_features,omitempty"`             // Features required for batch script's node
	BatchFlag                *bool                  `json:"batch_flag,omitempty"`                 // True if batch job
	BatchHost                *string                `json:"batch_host,omitempty"`                 // Name of host running batch script
	BillableTRES             *float64               `json:"billable_tres,omitempty"`              // Billable TRES (64 bit floating point number with flags)
	BurstBuffer              *string                `json:"burst_buffer,omitempty"`               // Burst buffer specifications
	BurstBufferState         *string                `json:"burst_buffer_state,omitempty"`         // Burst buffer state details
	Cluster                  *string                `json:"cluster,omitempty"`                    // Cluster name
	ClusterFeatures          *string                `json:"cluster_features,omitempty"`           // List of required cluster features
	Command                  *string                `json:"command,omitempty"`                    // Executed command
	Comment                  *string                `json:"comment,omitempty"`                    // Arbitrary comment
	Container                *string                `json:"container,omitempty"`                  // Absolute path to OCI container bundle
	ContainerID              *string                `json:"container_id,omitempty"`               // OCI container ID
	Contiguous               *bool                  `json:"contiguous,omitempty"`                 // True if job requires contiguous nodes
	CoreSpec                 *int32                 `json:"core_spec,omitempty"`                  // Specialized core count
	CoresPerSocket           *uint16                `json:"cores_per_socket,omitempty"`           // Cores per socket required (16 bit integer number with flags)
	CPUFrequencyGovernor     *uint32                `json:"cpu_frequency_governor,omitempty"`     // CPU frequency governor (32 bit integer number with flags)
	CPUFrequencyMaximum      *uint32                `json:"cpu_frequency_maximum,omitempty"`      // Maximum CPU frequency (32 bit integer number with flags)
	CPUFrequencyMinimum      *uint32                `json:"cpu_frequency_minimum,omitempty"`      // Minimum CPU frequency (32 bit integer number with flags)
	CPUs                     *uint32                `json:"cpus,omitempty"`                       // Minimum number of CPUs required (32 bit integer number with flags)
	CPUsPerTask              *uint16                `json:"cpus_per_task,omitempty"`              // Number of CPUs required by each task (16 bit integer number with flags)
	CPUsPerTRES              *string                `json:"cpus_per_tres,omitempty"`              // Semicolon delimited list of TRES=# values indicating how many CPUs should be...
	Cron                     *string                `json:"cron,omitempty"`                       // Time specification for scrontab job
	CurrentWorkingDirectory  *string                `json:"current_working_directory,omitempty"`  // Working directory to use for the job
	Deadline                 time.Time              `json:"deadline,omitempty"`                   // Latest time that the job may start (UNIX timestamp) (UNIX timestamp or time...
	DelayBoot                *uint32                `json:"delay_boot,omitempty"`                 // Number of seconds after job eligible start that nodes will be rebooted to...
	Dependency               *string                `json:"dependency,omitempty"`                 // Other jobs that must meet certain criteria before this job can start
	DerivedExitCode          *ExitCode              `json:"derived_exit_code,omitempty"`          // Highest exit code of all job steps (return code returned by process)
	EligibleTime             time.Time              `json:"eligible_time,omitempty"`              // Time when the job became eligible to run (UNIX timestamp) (UNIX timestamp or...
	EndTime                  time.Time              `json:"end_time,omitempty"`                   // End time, real or expected (UNIX timestamp) (UNIX timestamp or time string...
	ExcludedNodes            *string                `json:"excluded_nodes,omitempty"`             // Comma-separated list of nodes that may not be used
	ExitCode                 *ExitCode              `json:"exit_code,omitempty"`                  // Exit code of the job (return code returned by process)
	Extra                    *string                `json:"extra,omitempty"`                      // Arbitrary string used for node filtering if extra constraints are enabled
	FailedNode               *string                `json:"failed_node,omitempty"`                // Name of node that caused job failure
	Features                 *string                `json:"features,omitempty"`                   // Comma-separated list of features that are required
	FederationOrigin         *string                `json:"federation_origin,omitempty"`          // Origin cluster's name (when using federation)
	FederationSiblingsActive *string                `json:"federation_siblings_active,omitempty"` // Active sibling job names
	FederationSiblingsViable *string                `json:"federation_siblings_viable,omitempty"` // Viable sibling job names
	Flags                    []FlagsValue           `json:"flags,omitempty"`                      // Job flags
	GRESDetail               []string               `json:"gres_detail,omitempty"`                // List of GRES index and counts allocated per node
	GroupID                  *int32                 `json:"group_id,omitempty"`                   // Group ID of the user that owns the job
	GroupName                *string                `json:"group_name,omitempty"`                 // Group name of the user that owns the job
	HetJobID                 *uint32                `json:"het_job_id,omitempty"`                 // Heterogeneous job ID, if applicable (32 bit integer number with flags)
	HetJobIDSet              *string                `json:"het_job_id_set,omitempty"`             // Job ID range for all heterogeneous job components
	HetJobOffset             *uint32                `json:"het_job_offset,omitempty"`             // Unique sequence number applied to this component of the heterogeneous job (32...
	Hold                     *bool                  `json:"hold,omitempty"`                       // Hold (true) or release (false) job (Job held)
	JobID                    *int32                 `json:"job_id,omitempty"`                     // Job ID
	JobResources             *JobResources          `json:"job_resources,omitempty"`              // Resources used by the job
	JobSizeStr               []string               `json:"job_size_str,omitempty"`               // Number of nodes (in a range) required for this job
	JobState                 []JobState             `json:"job_state,omitempty"`                  // Current state
	LastSchedEvaluation      time.Time              `json:"last_sched_evaluation,omitempty"`      // Last time job was evaluated for scheduling (UNIX timestamp) (UNIX timestamp or...
	Licenses                 *string                `json:"licenses,omitempty"`                   // License(s) required by the job
	LicensesAllocated        *string                `json:"licenses_allocated,omitempty"`         // License(s) allocated to the job
	MailType                 []MailTypeValue        `json:"mail_type,omitempty"`                  // Mail event type(s)
	MailUser                 *string                `json:"mail_user,omitempty"`                  // User to receive email notifications
	MaxCPUs                  *uint32                `json:"max_cpus,omitempty"`                   // Maximum number of CPUs usable by the job (32 bit integer number with flags)
	MaxNodes                 *uint32                `json:"max_nodes,omitempty"`                  // Maximum number of nodes usable by the job (32 bit integer number with flags)
	MaximumSwitchWaitTime    *int32                 `json:"maximum_switch_wait_time,omitempty"`   // Maximum time to wait for switches in seconds
	MCSLabel                 *string                `json:"mcs_label,omitempty"`                  // Multi-Category Security label on the job
	MemoryPerCPU             *uint64                `json:"memory_per_cpu,omitempty"`             // Minimum memory in megabytes per allocated CPU (64 bit integer number with flags)
	MemoryPerNode            *uint64                `json:"memory_per_node,omitempty"`            // Minimum memory in megabytes per allocated node (64 bit integer number with...
	MemoryPerTRES            *string                `json:"memory_per_tres,omitempty"`            // Semicolon delimited list of TRES=# values indicating how much memory in...
	MinimumCPUsPerNode       *uint16                `json:"minimum_cpus_per_node,omitempty"`      // Minimum number of CPUs per node (16 bit integer number with flags)
	MinimumTmpDiskPerNode    *uint32                `json:"minimum_tmp_disk_per_node,omitempty"`  // Minimum tmp disk space required per node (32 bit integer number with flags)
	Name                     *string                `json:"name,omitempty"`                       // Job name
	Network                  *string                `json:"network,omitempty"`                    // Network specs for the job
	Nice                     *int32                 `json:"nice,omitempty"`                       // Requested job priority change
	NodeCount                *uint32                `json:"node_count,omitempty"`                 // Minimum number of nodes required (32 bit integer number with flags)
	Nodes                    *string                `json:"nodes,omitempty"`                      // Node(s) allocated to the job
	Partition                *string                `json:"partition,omitempty"`                  // Partition assigned to the job
	Power                    *JobPower              `json:"power,omitempty"`
	PreSusTime               *uint64                `json:"pre_sus_time,omitempty"`          // Total run time prior to last suspend in seconds (UNIX timestamp or time string...
	PreemptTime              time.Time              `json:"preempt_time,omitempty"`          // Time job received preemption signal (UNIX timestamp) (UNIX timestamp or time...
	PreemptableTime          time.Time              `json:"preemptable_time,omitempty"`      // Time job becomes eligible for preemption (UNIX timestamp) (UNIX timestamp or...
	Prefer                   *string                `json:"prefer,omitempty"`                // Feature(s) the job requested but that are not required
	Priority                 *uint32                `json:"priority,omitempty"`              // Request specific job priority (32 bit integer number with flags)
	PriorityByPartition      []JobPartitionPriority `json:"priority_by_partition,omitempty"` // Prospective job priority in each partition that may be used by this job
	Profile                  []ProfileValue         `json:"profile,omitempty"`               // Profile used by the acct_gather_profile plugin
	QoS                      *string                `json:"qos,omitempty"`                   // Quality of Service assigned to the job, if pending the QOS requested
	Reboot                   *bool                  `json:"reboot,omitempty"`                // Node reboot requested before start
	Requeue                  *bool                  `json:"requeue,omitempty"`               // Determines whether the job may be requeued
	RequiredNodes            *string                `json:"required_nodes,omitempty"`        // Comma-separated list of required nodes
	RequiredSwitches         *int32                 `json:"required_switches,omitempty"`     // Maximum number of switches
	ResizeTime               time.Time              `json:"resize_time,omitempty"`           // Time of last size change (UNIX timestamp) (UNIX timestamp or time string...
	RestartCnt               *int32                 `json:"restart_cnt,omitempty"`           // Number of job restarts
	ResvName                 *string                `json:"resv_name,omitempty"`             // Name of reservation to use
	ScheduledNodes           *string                `json:"scheduled_nodes,omitempty"`       // List of nodes scheduled to be used for the job
	SegmentSize              *int32                 `json:"segment_size,omitempty"`          // Requested segment size
	SelinuxContext           *string                `json:"selinux_context,omitempty"`       // SELinux context
	Shared                   []SharedValue          `json:"shared,omitempty"`                // How the job can share resources with other jobs, if at all
	SocketsPerBoard          *int32                 `json:"sockets_per_board,omitempty"`     // Number of sockets per board required
	SocketsPerNode           *uint16                `json:"sockets_per_node,omitempty"`      // Number of sockets per node required (16 bit integer number with flags)
	StandardError            *string                `json:"standard_error,omitempty"`        // Path to stderr file
	StandardInput            *string                `json:"standard_input,omitempty"`        // Path to stdin file
	StandardOutput           *string                `json:"standard_output,omitempty"`       // Path to stdout file
	StartTime                time.Time              `json:"start_time,omitempty"`            // Time execution began, or is expected to begin (UNIX timestamp) (UNIX timestamp...
	StateDescription         *string                `json:"state_description,omitempty"`     // Optional details for state_reason
	StateReason              *string                `json:"state_reason,omitempty"`          // Reason for current Pending or Failed state
	StderrExpanded           *string                `json:"stderr_expanded,omitempty"`       // Job stderr with expanded fields
	StdinExpanded            *string                `json:"stdin_expanded,omitempty"`        // Job stdin with expanded fields
	StdoutExpanded           *string                `json:"stdout_expanded,omitempty"`       // Job stdout with expanded fields
	StepID                   *StepID                `json:"step_id,omitempty"`               // Job step ID
	SubmitLine               *string                `json:"submit_line,omitempty"`           // Job submit line (e.g. 'sbatch -N3 job.sh job_arg'
	SubmitTime               time.Time              `json:"submit_time,omitempty"`           // Time when the job was submitted (UNIX timestamp) (UNIX timestamp or time string...
	SuspendTime              time.Time              `json:"suspend_time,omitempty"`          // Time the job was last suspended or resumed (UNIX timestamp) (UNIX timestamp or...
	SystemComment            *string                `json:"system_comment,omitempty"`        // Arbitrary comment from slurmctld
	Tasks                    *uint32                `json:"tasks,omitempty"`                 // Number of tasks (32 bit integer number with flags)
	TasksPerBoard            *uint16                `json:"tasks_per_board,omitempty"`       // Number of tasks invoked on each board (16 bit integer number with flags)
	TasksPerCore             *uint16                `json:"tasks_per_core,omitempty"`        // Number of tasks invoked on each core (16 bit integer number with flags)
	TasksPerNode             *uint16                `json:"tasks_per_node,omitempty"`        // Number of tasks invoked on each node (16 bit integer number with flags)
	TasksPerSocket           *uint16                `json:"tasks_per_socket,omitempty"`      // Number of tasks invoked on each socket (16 bit integer number with flags)
	TasksPerTRES             *uint16                `json:"tasks_per_tres,omitempty"`        // Number of tasks that can assess each GPU (16 bit integer number with flags)
	ThreadSpec               *int32                 `json:"thread_spec,omitempty"`           // Specialized thread count
	ThreadsPerCore           *uint16                `json:"threads_per_core,omitempty"`      // Number of processor threads per CPU core required (16 bit integer number with...
	TimeLimit                *uint32                `json:"time_limit,omitempty"`            // Maximum run time in minutes (32 bit integer number with flags)
	TimeMinimum              *uint32                `json:"time_minimum,omitempty"`          // Minimum run time in minutes (32 bit integer number with flags)
	TRESAllocStr             *string                `json:"tres_alloc_str,omitempty"`        // TRES used by the job
	TRESBind                 *string                `json:"tres_bind,omitempty"`             // Task to TRES binding directives
	TRESFreq                 *string                `json:"tres_freq,omitempty"`             // TRES frequency directives
	TRESPerJob               *string                `json:"tres_per_job,omitempty"`          // Comma-separated list of TRES=# values to be allocated per job
	TRESPerNode              *string                `json:"tres_per_node,omitempty"`         // Comma-separated list of TRES=# values to be allocated per node
	TRESPerSocket            *string                `json:"tres_per_socket,omitempty"`       // Comma-separated list of TRES=# values to be allocated per socket
	TRESPerTask              *string                `json:"tres_per_task,omitempty"`         // Comma-separated list of TRES=# values to be allocated per task
	TRESReqStr               *string                `json:"tres_req_str,omitempty"`          // TRES requested by the job
	UserID                   *int32                 `json:"user_id,omitempty"`               // User ID that owns the job
	UserName                 *string                `json:"user_name,omitempty"`             // User name that owns the job
	Wckey                    *string                `json:"wckey,omitempty"`                 // Workload characterization key
}

Job represents a SLURM Job.

type JobAccountingSummary

type JobAccountingSummary struct {
	TotalSteps     int `json:"total_steps"`
	CompletedSteps int `json:"completed_steps"`
	FailedSteps    int `json:"failed_steps"`
	RunningSteps   int `json:"running_steps"`

	TotalCPUTime    time.Duration `json:"total_cpu_time"`
	TotalElapsed    time.Duration `json:"total_elapsed"`
	TotalMemoryUsed int64         `json:"total_memory_used"`
	TotalDiskRead   int64         `json:"total_disk_read"`
	TotalDiskWrite  int64         `json:"total_disk_write"`

	OverallCPUEff float64 `json:"overall_cpu_efficiency"`
	OverallMemEff float64 `json:"overall_memory_efficiency"`
	OverallIOEff  float64 `json:"overall_io_efficiency"`

	Metadata map[string]interface{} `json:"metadata,omitempty"`
}

JobAccountingSummary summarizes job accounting data.

type JobAllocateRequest

type JobAllocateRequest struct {
	// Job specification
	Name      string `json:"name,omitempty"`
	Account   string `json:"account,omitempty"`
	Partition string `json:"partition,omitempty"`
	QoS       string `json:"qos,omitempty"`

	// Resource requirements
	Nodes  string `json:"nodes,omitempty"`  // Number or range of nodes
	Cpus   int32  `json:"cpus,omitempty"`   // Number of CPUs (matches OpenAPI casing)
	Memory string `json:"memory,omitempty"` // Memory requirement
	Gpus   string `json:"gpus,omitempty"`   // GPU requirement (matches OpenAPI casing)

	// Time limits
	TimeLimit int32 `json:"time_limit,omitempty"` // Time limit in minutes

	// Environment and execution
	Environment map[string]string `json:"environment,omitempty"`
	WorkingDir  string            `json:"working_directory,omitempty"`
	Command     []string          `json:"command,omitempty"` // Command to run

	// Advanced options
	Exclusive   bool     `json:"exclusive,omitempty"`
	Features    []string `json:"features,omitempty"`
	Constraints string   `json:"constraints,omitempty"`

	// Output handling
	StdOut string `json:"stdout,omitempty"`
	StdErr string `json:"stderr,omitempty"`
	StdIn  string `json:"stdin,omitempty"`
}

JobAllocateRequest represents a request to allocate resources for a job

type JobAllocateResponse

type JobAllocateResponse struct {
	JobId   int32  `json:"job_id"` // Matches OpenAPI casing
	Status  string `json:"status"`
	Message string `json:"message,omitempty"`

	// Allocated resources
	Nodes  []string `json:"nodes,omitempty"`
	Cpus   int32    `json:"cpus_allocated,omitempty"` // Matches OpenAPI casing
	Memory int64    `json:"memory_allocated,omitempty"`
	Gpus   int32    `json:"gpus_allocated,omitempty"` // Matches OpenAPI casing

	// Timing information
	StartTime *time.Time `json:"start_time,omitempty"`
	EndTime   *time.Time `json:"end_time,omitempty"`
	TimeLimit int32      `json:"time_limit,omitempty"`

	// Connection information for interactive jobs
	ConnectionInfo map[string]interface{} `json:"connection_info,omitempty"`

	Meta map[string]interface{} `json:"meta,omitempty"`
}

JobAllocateResponse represents the response from a job allocation request

type JobAnalysisSummary

type JobAnalysisSummary struct {
	JobID             string        `json:"job_id"`
	JobName           string        `json:"job_name"`
	Efficiency        float64       `json:"efficiency"`
	Runtime           time.Duration `json:"runtime"`
	CPUUtilization    float64       `json:"cpu_utilization"`
	MemoryUtilization float64       `json:"memory_utilization"`
	Status            string        `json:"status"`
	Issues            []string      `json:"issues,omitempty"`
}

JobAnalysisSummary provides a job analysis summary.

type JobCancelFlags

type JobCancelFlags struct {
	// BatchJob cancels only the batch job
	BatchJob bool `json:"batch_job,omitempty"`
	// FullJob cancels the entire job array
	FullJob bool `json:"full_job,omitempty"`
	// HurdleJob cancels hurdle jobs
	HurdleJob bool `json:"hurdle_job,omitempty"`
	// IgnoreFederation ignores federation in job cancellation
	IgnoreFederation bool `json:"ignore_federation,omitempty"`
	// Signal to send to the job (default: SIGKILL)
	Signal string `json:"signal,omitempty"`
	// WaitTime to wait before forcefully terminating the job (in seconds)
	WaitTime int32 `json:"wait_time,omitempty"`
}

JobCancelFlags represents flags for job cancellation

type JobCancelRequest

type JobCancelRequest struct {
	Signal    string `json:"signal,omitempty"`
	Message   string `json:"message,omitempty"`
	Account   string `json:"account,omitempty"`
	Name      string `json:"name,omitempty"`
	Partition string `json:"partition,omitempty"`
	QoS       string `json:"qos,omitempty"`
	State     string `json:"state,omitempty"`
	UserID    int32  `json:"user_id,omitempty"`
	UserName  string `json:"user_name,omitempty"`
	WaitTime  int32  `json:"wait_time,omitempty"`
}

JobCancelRequest represents the request to cancel a job

type JobComprehensiveAnalytics

type JobComprehensiveAnalytics struct {
	JobID     uint32        `json:"job_id"`
	JobName   string        `json:"job_name"`
	StartTime time.Time     `json:"start_time"`
	EndTime   *time.Time    `json:"end_time,omitempty"`
	Duration  time.Duration `json:"duration"`
	Status    string        `json:"status"`

	CPUAnalytics    *CPUAnalytics    `json:"cpu_analytics"`
	MemoryAnalytics *MemoryAnalytics `json:"memory_analytics"`
	IOAnalytics     *IOAnalytics     `json:"io_analytics"`

	OverallEfficiency float64 `json:"overall_efficiency_percent"`

	CrossResourceAnalysis *CrossResourceAnalysis   `json:"cross_resource_analysis"`
	OptimalConfiguration  *OptimalJobConfiguration `json:"optimal_configuration"`

	Recommendations []OptimizationRecommendation `json:"recommendations,omitempty"`
	Bottlenecks     []PerformanceBottleneck      `json:"bottlenecks,omitempty"`

	Metadata map[string]interface{} `json:"metadata,omitempty"`
}

JobComprehensiveAnalytics provides complete job analytics.

type JobController

type JobController interface {
	Cancel(ctx context.Context, jobID string) error
	Hold(ctx context.Context, jobID string) error
	Release(ctx context.Context, jobID string) error
	Signal(ctx context.Context, jobID string, signal string) error
	Notify(ctx context.Context, jobID string, message string) error
	Requeue(ctx context.Context, jobID string) error
}

JobController provides job control operations

type JobCountPoint

type JobCountPoint struct {
	Timestamp time.Time `json:"timestamp"`
	Running   int       `json:"running"`
	Pending   int       `json:"pending"`
	Total     int       `json:"total"`
}

JobCountPoint represents job count data.

type JobCreate

type JobCreate struct {
	Account                 *string                  `json:"account,omitempty"`                   // Account associated with the job
	AccountGatherFrequency  *string                  `json:"account_gather_frequency,omitempty"`  // Job accounting and profiling sampling intervals in seconds
	AdminComment            *string                  `json:"admin_comment,omitempty"`             // Arbitrary comment made by administrator
	AllocationNodeList      *string                  `json:"allocation_node_list,omitempty"`      // Local node making the resource allocation
	AllocationNodePort      *int32                   `json:"allocation_node_port,omitempty"`      // Port to send allocation confirmation to
	Argv                    []string                 `json:"argv,omitempty"`                      // Arguments to the script. Note: The slurmstepd always overrides argv[0] with the...
	Array                   *string                  `json:"array,omitempty"`                     // Job array index value specification
	BatchFeatures           *string                  `json:"batch_features,omitempty"`            // Features required for batch script's node
	BeginTime               *uint64                  `json:"begin_time,omitempty"`                // Defer the allocation of the job until the specified time (UNIX timestamp) (UNIX...
	BurstBuffer             *string                  `json:"burst_buffer,omitempty"`              // Burst buffer specifications
	ClusterConstraint       *string                  `json:"cluster_constraint,omitempty"`        // Required features that a federated cluster must have to have a sibling job...
	Clusters                *string                  `json:"clusters,omitempty"`                  // Clusters that a federated job can run on
	Comment                 *string                  `json:"comment,omitempty"`                   // Arbitrary comment made by user
	Constraints             *string                  `json:"constraints,omitempty"`               // Comma-separated list of features that are required
	Container               *string                  `json:"container,omitempty"`                 // Absolute path to OCI container bundle
	ContainerID             *string                  `json:"container_id,omitempty"`              // OCI container ID
	Contiguous              *bool                    `json:"contiguous,omitempty"`                // True if job requires contiguous nodes
	CoreSpecification       *int32                   `json:"core_specification,omitempty"`        // Specialized core count
	CPUBinding              *string                  `json:"cpu_binding,omitempty"`               // Method for binding tasks to allocated CPUs
	CPUBindingFlags         []CPUBindingFlagsValue   `json:"cpu_binding_flags,omitempty"`         // Flags for CPU binding
	CPUFrequency            *string                  `json:"cpu_frequency,omitempty"`             // Requested CPU frequency range <p1>[-p2][:p3]
	CPUsPerTask             *int32                   `json:"cpus_per_task,omitempty"`             // Number of CPUs required by each task
	CPUsPerTRES             *string                  `json:"cpus_per_tres,omitempty"`             // Semicolon delimited list of TRES=# values values indicating how many CPUs...
	Crontab                 *CronEntry               `json:"crontab,omitempty"`                   // Specification for scrontab job (crontab entry)
	CurrentWorkingDirectory *string                  `json:"current_working_directory,omitempty"` // Working directory to use for the job
	Deadline                *int64                   `json:"deadline,omitempty"`                  // Latest time that the job may start (UNIX timestamp) (UNIX timestamp or time...
	DelayBoot               *int32                   `json:"delay_boot,omitempty"`                // Number of seconds after job eligible start that nodes will be rebooted to...
	Dependency              *string                  `json:"dependency,omitempty"`                // Other jobs that must meet certain criteria before this job can start
	Distribution            *string                  `json:"distribution,omitempty"`              // Layout
	DistributionPlaneSize   *uint16                  `json:"distribution_plane_size,omitempty"`   // Plane size specification when distribution specifies plane (16 bit integer...
	EndTime                 *int64                   `json:"end_time,omitempty"`                  // Expected end time (UNIX timestamp) (UNIX timestamp or time string recognized by...
	Environment             []string                 `json:"environment,omitempty"`               // Environment variables to be set for the job
	ExcludedNodes           []string                 `json:"excluded_nodes,omitempty"`            // Comma-separated list of nodes that may not be used
	Extra                   *string                  `json:"extra,omitempty"`                     // Arbitrary string used for node filtering if extra constraints are enabled
	Flags                   []FlagsValue             `json:"flags,omitempty"`                     // Job flags
	GroupID                 *string                  `json:"group_id,omitempty"`                  // Group ID of the user that owns the job
	HetjobGroup             *int32                   `json:"hetjob_group,omitempty"`              // Unique sequence number applied to this component of the heterogeneous job
	Hold                    *bool                    `json:"hold,omitempty"`                      // Hold (true) or release (false) job (Job held)
	Immediate               *bool                    `json:"immediate,omitempty"`                 // If true, exit if resources are not available within the time period specified
	JobID                   *int32                   `json:"job_id,omitempty"`                    // Job ID
	KillOnNodeFail          *bool                    `json:"kill_on_node_fail,omitempty"`         // If true, kill job on node failure
	KillWarningDelay        *uint16                  `json:"kill_warning_delay,omitempty"`        // Number of seconds before end time to send the warning signal (16 bit integer...
	KillWarningFlags        []KillWarningFlagsValue  `json:"kill_warning_flags,omitempty"`        // Flags related to job signals
	KillWarningSignal       *string                  `json:"kill_warning_signal,omitempty"`       // Signal to send when approaching end time (e.g. "10" or "USR1")
	Licenses                *string                  `json:"licenses,omitempty"`                  // License(s) required by the job
	MailType                []MailTypeValue          `json:"mail_type,omitempty"`                 // Mail event type(s)
	MailUser                *string                  `json:"mail_user,omitempty"`                 // User to receive email notifications
	MaximumCPUs             *int32                   `json:"maximum_cpus,omitempty"`              // Maximum number of CPUs required
	MaximumNodes            *int32                   `json:"maximum_nodes,omitempty"`             // Maximum node count
	MCSLabel                *string                  `json:"mcs_label,omitempty"`                 // Multi-Category Security label on the job
	MemoryBinding           *string                  `json:"memory_binding,omitempty"`            // Binding map for map/mask_cpu
	MemoryBindingType       []MemoryBindingTypeValue `json:"memory_binding_type,omitempty"`       // Method for binding tasks to memory
	MemoryPerCPU            *uint64                  `json:"memory_per_cpu,omitempty"`            // Minimum memory in megabytes per allocated CPU (64 bit integer number with flags)
	MemoryPerNode           *uint64                  `json:"memory_per_node,omitempty"`           // Minimum memory in megabytes per allocated node (64 bit integer number with...
	MemoryPerTRES           *string                  `json:"memory_per_tres,omitempty"`           // Semicolon delimited list of TRES=# values indicating how much memory in...
	MinimumBoardsPerNode    *int32                   `json:"minimum_boards_per_node,omitempty"`   // Boards per node required
	MinimumCPUs             *int32                   `json:"minimum_cpus,omitempty"`              // Minimum number of CPUs required
	MinimumCPUsPerNode      *int32                   `json:"minimum_cpus_per_node,omitempty"`     // Minimum number of CPUs per node
	MinimumNodes            *int32                   `json:"minimum_nodes,omitempty"`             // Minimum node count
	MinimumSocketsPerBoard  *int32                   `json:"minimum_sockets_per_board,omitempty"` // Sockets per board required
	Name                    *string                  `json:"name,omitempty"`                      // Job name
	Network                 *string                  `json:"network,omitempty"`                   // Network specs for job step
	Nice                    *int32                   `json:"nice,omitempty"`                      // Requested job priority change
	Nodes                   *string                  `json:"nodes,omitempty"`                     // Node count range specification (e.g. 1-15:4)
	NtasksPerTRES           *int32                   `json:"ntasks_per_tres,omitempty"`           // Number of tasks that can access each GPU
	OomKillStep             *int32                   `json:"oom_kill_step,omitempty"`             // Kill whole step in case of OOM in one of the tasks
	OpenMode                []OpenModeValue          `json:"open_mode,omitempty"`                 // Open mode used for stdout and stderr files
	Overcommit              *bool                    `json:"overcommit,omitempty"`                // Overcommit resources
	Partition               *string                  `json:"partition,omitempty"`                 // Partition assigned to the job
	PowerFlags              []interface{}            `json:"power_flags,omitempty"`
	Prefer                  *string                  `json:"prefer,omitempty"`            // Comma-separated list of features that are preferred but not required
	Priority                *uint32                  `json:"priority,omitempty"`          // Request specific job priority (32 bit integer number with flags)
	Profile                 []ProfileValue           `json:"profile,omitempty"`           // Profile used by the acct_gather_profile plugin
	QoS                     *string                  `json:"qos,omitempty"`               // Quality of Service assigned to the job
	Reboot                  *bool                    `json:"reboot,omitempty"`            // Node reboot requested before start
	Requeue                 *bool                    `json:"requeue,omitempty"`           // Determines whether the job may be requeued
	RequiredNodes           []string                 `json:"required_nodes,omitempty"`    // Comma-separated list of required nodes
	RequiredSwitches        *uint32                  `json:"required_switches,omitempty"` // Maximum number of switches (32 bit integer number with flags)
	Reservation             *string                  `json:"reservation,omitempty"`       // Name of reservation to use
	ReservePorts            *int32                   `json:"reserve_ports,omitempty"`     // Port to send various notification msg to
	Rlimits                 *JobCreateRlimits        `json:"rlimits,omitempty"`
	Script                  *string                  `json:"script,omitempty"`                  // Job batch script contents; only the first component in a HetJob is populated or...
	SegmentSize             *uint16                  `json:"segment_size,omitempty"`            // Segment size for topology/block (16 bit integer number with flags)
	SelinuxContext          *string                  `json:"selinux_context,omitempty"`         // SELinux context
	Shared                  []SharedValue            `json:"shared,omitempty"`                  // How the job can share resources with other jobs, if at all
	SiteFactor              *int32                   `json:"site_factor,omitempty"`             // Site-specific priority factor
	SocketsPerNode          *int32                   `json:"sockets_per_node,omitempty"`        // Sockets per node required
	SpankEnvironment        []string                 `json:"spank_environment,omitempty"`       // Environment variables for job prolog/epilog scripts as set by SPANK plugins
	StandardError           *string                  `json:"standard_error,omitempty"`          // Path to stderr file
	StandardInput           *string                  `json:"standard_input,omitempty"`          // Path to stdin file
	StandardOutput          *string                  `json:"standard_output,omitempty"`         // Path to stdout file
	StepID                  *StepID                  `json:"step_id,omitempty"`                 // Job step ID
	Tasks                   *int32                   `json:"tasks,omitempty"`                   // Number of tasks
	TasksPerBoard           *int32                   `json:"tasks_per_board,omitempty"`         // Number of tasks to invoke on each board
	TasksPerCore            *int32                   `json:"tasks_per_core,omitempty"`          // Number of tasks to invoke on each core
	TasksPerNode            *int32                   `json:"tasks_per_node,omitempty"`          // Number of tasks to invoke on each node
	TasksPerSocket          *int32                   `json:"tasks_per_socket,omitempty"`        // Number of tasks to invoke on each socket
	TemporaryDiskPerNode    *int32                   `json:"temporary_disk_per_node,omitempty"` // Minimum tmp disk space required per node
	ThreadSpecification     *int32                   `json:"thread_specification,omitempty"`    // Specialized thread count
	ThreadsPerCore          *int32                   `json:"threads_per_core,omitempty"`        // Threads per core required
	TimeLimit               *uint32                  `json:"time_limit,omitempty"`              // Maximum run time in minutes (32 bit integer number with flags)
	TimeMinimum             *uint32                  `json:"time_minimum,omitempty"`            // Minimum run time in minutes (32 bit integer number with flags)
	TRESBind                *string                  `json:"tres_bind,omitempty"`               // Task to TRES binding directives
	TRESFreq                *string                  `json:"tres_freq,omitempty"`               // TRES frequency directives
	TRESPerJob              *string                  `json:"tres_per_job,omitempty"`            // Comma-separated list of TRES=# values to be allocated for every job
	TRESPerNode             *string                  `json:"tres_per_node,omitempty"`           // Comma-separated list of TRES=# values to be allocated for every node
	TRESPerSocket           *string                  `json:"tres_per_socket,omitempty"`         // Comma-separated list of TRES=# values to be allocated for every socket
	TRESPerTask             *string                  `json:"tres_per_task,omitempty"`           // Comma-separated list of TRES=# values to be allocated for every task
	UserID                  *string                  `json:"user_id,omitempty"`                 // User ID that owns the job
	WaitAllNodes            *bool                    `json:"wait_all_nodes,omitempty"`          // If true, wait to start until after all nodes have booted
	WaitForSwitch           *int32                   `json:"wait_for_switch,omitempty"`         // Maximum time to wait for switches in seconds
	Wckey                   *string                  `json:"wckey,omitempty"`                   // Workload characterization key
	X11                     []X11Value               `json:"x11,omitempty"`                     // X11 forwarding options
	X11MagicCookie          *string                  `json:"x11_magic_cookie,omitempty"`        // Magic cookie for X11 forwarding
	X11TargetHost           *string                  `json:"x11_target_host,omitempty"`         // Hostname or UNIX socket if x11_target_port=0
	X11TargetPort           *int32                   `json:"x11_target_port,omitempty"`         // TCP port
}

JobCreate represents a SLURM JobCreate.

type JobCreateRlimits

type JobCreateRlimits struct {
	As      *uint64 `json:"as,omitempty"`      // Address space limit (Address space limit.) (64 bit integer number with flags)
	Core    *uint64 `json:"core,omitempty"`    // Largest core file that can be created, in bytes (Largest core file that can be...
	CPU     *uint64 `json:"cpu,omitempty"`     // Per-process CPU limit, in seconds (Per-process CPU limit, in seconds.) (64 bit...
	Data    *uint64 `json:"data,omitempty"`    // Maximum size of data segment, in bytes (Maximum size of data segment, in bytes....
	Fsize   *uint64 `json:"fsize,omitempty"`   // Largest file that can be created, in bytes (Largest file that can be created,...
	Memlock *uint64 `json:"memlock,omitempty"` // Locked-in-memory address space (Locked-in-memory address space) (64 bit integer...
	Nofile  *uint64 `json:"nofile,omitempty"`  // Number of open files (Number of open files.) (64 bit integer number with flags)
	Nproc   *uint64 `json:"nproc,omitempty"`   // Number of processes (Number of processes.) (64 bit integer number with flags)
	Rss     *uint64 `json:"rss,omitempty"`     // Largest resident set size, in bytes. This affects swapping; processes that are...
	Stack   *uint64 `json:"stack,omitempty"`   // Maximum size of stack segment, in bytes (Maximum size of stack segment, in...
}

JobCreateRlimits is a nested type within its parent.

type JobDependency

type JobDependency struct {
	Type   string  `json:"type"`
	JobIDs []int32 `json:"job_ids,omitempty"`
	State  string  `json:"state,omitempty"`
}

JobDependency represents a job dependency (helper type for user convenience) Note: When using the generated JobCreate, specify dependencies as a string in SLURM dependency format (e.g., "afterok:123:456")

type JobDurationTrend

type JobDurationTrend struct {
	Timestamp       time.Time     `json:"timestamp"`
	ShortJobs       int           `json:"short_jobs"`
	MediumJobs      int           `json:"medium_jobs"`
	LongJobs        int           `json:"long_jobs"`
	AverageDuration time.Duration `json:"average_duration"`
}

JobDurationTrend represents job duration trends.

type JobEvent

type JobEvent struct {
	// EventTime when the event occurred
	EventTime time.Time `json:"event_time"`
	// EventType type of event (submit, start, end, fail, etc.)
	EventType string `json:"event_type"`
	// JobId of the job (matches OpenAPI field name)
	JobId int32 `json:"job_id"`
	// JobName of the job
	JobName string `json:"job_name,omitempty"`
	// UserName who owns the job
	UserName string `json:"user_name,omitempty"`
	// PreviousState before the event
	PreviousState JobState `json:"previous_state,omitempty"`
	// NewState after the event
	NewState JobState `json:"new_state"`
	// Reason for the state change
	Reason string `json:"reason,omitempty"`
	// NodeList affected by the event
	NodeList string `json:"node_list,omitempty"`
	// ExitCode if job ended
	ExitCode int32 `json:"exit_code,omitempty"`
	// Job is the full job object (for watch events)
	Job *Job `json:"job,omitempty"`
}

JobEvent represents a job state change event

type JobHoldRequest

type JobHoldRequest struct {
	JobId    int32 `json:"job_id"` // Matches OpenAPI casing
	Hold     bool  `json:"hold"`
	Priority int32 `json:"priority,omitempty"`
}

JobHoldRequest represents a request to hold/release a job

type JobList

type JobList struct {
	Jobs  []Job `json:"jobs"`
	Total int   `json:"total"`
}

JobList represents a list of jobs

type JobListOptions

type JobListOptions struct {
	Accounts   []string   `json:"accounts,omitempty"`
	Users      []string   `json:"users,omitempty"`
	States     []JobState `json:"states,omitempty"`
	Partitions []string   `json:"partitions,omitempty"`
	QoS        []string   `json:"qos,omitempty"`
	JobIDs     []int32    `json:"job_ids,omitempty"`
	JobNames   []string   `json:"job_names,omitempty"`
	StartTime  *time.Time `json:"start_time,omitempty"`
	EndTime    *time.Time `json:"end_time,omitempty"`

	// Limit specifies the maximum number of jobs to return.
	// WARNING: Due to SLURM REST API limitations, this is CLIENT-SIDE pagination.
	// The full job list is fetched from the server, then sliced. For large clusters
	// (100K+ jobs), consider using filtering options (States, Accounts, Partitions, etc.)
	// to reduce the dataset before pagination.
	Limit int `json:"limit,omitempty"`

	// Offset specifies the number of jobs to skip before returning results.
	// WARNING: This is CLIENT-SIDE pagination - see Limit field documentation.
	Offset int `json:"offset,omitempty"`

	IncludeSteps bool `json:"include_steps,omitempty"`
}

JobListOptions represents options for listing jobs

type JobLiveMetrics

type JobLiveMetrics struct {
	JobID          string        `json:"job_id"`
	JobName        string        `json:"job_name"`
	State          string        `json:"state"`
	RunningTime    time.Duration `json:"running_time"`
	CollectionTime time.Time     `json:"collection_time"`

	CPUUsage     *LiveResourceMetric `json:"cpu_usage"`
	MemoryUsage  *LiveResourceMetric `json:"memory_usage"`
	GPUUsage     *LiveResourceMetric `json:"gpu_usage,omitempty"`
	NetworkUsage *LiveResourceMetric `json:"network_usage,omitempty"`
	IOUsage      *LiveResourceMetric `json:"io_usage,omitempty"`

	ProcessCount int `json:"process_count"`
	ThreadCount  int `json:"thread_count"`

	NodeMetrics map[string]*NodeLiveMetrics `json:"node_metrics,omitempty"`
	Alerts      []PerformanceAlert          `json:"alerts,omitempty"`
	Metadata    map[string]interface{}      `json:"metadata,omitempty"`
}

JobLiveMetrics represents real-time job metrics.

type JobManager

type JobManager interface {
	JobReader
	JobWriter
	JobController
	JobWatcher
}

JobManager combines all core job operations

type JobMetricsEvent

type JobMetricsEvent struct {
	Type        string            `json:"type"`
	JobID       string            `json:"job_id"`
	Timestamp   time.Time         `json:"timestamp"`
	Metrics     *JobLiveMetrics   `json:"metrics,omitempty"`
	Alert       *PerformanceAlert `json:"alert,omitempty"`
	Error       error             `json:"error,omitempty"`
	StateChange *JobStateChange   `json:"state_change,omitempty"`
}

JobMetricsEvent represents a metrics update event.

type JobNotifyRequest

type JobNotifyRequest struct {
	JobId   int32  `json:"job_id"` // Matches OpenAPI casing
	Message string `json:"message"`
}

JobNotifyRequest represents a request to notify a job

type JobPartitionPriority

type JobPartitionPriority struct {
	Partition *string `json:"partition,omitempty"` // Partition name
	Priority  *int32  `json:"priority,omitempty"`  // Prospective job priority if it runs in this partition
}

JobPartitionPriority represents a SLURM JobPartitionPriority.

type JobPerformance

type JobPerformance struct {
	JobID     uint32     `json:"job_id"`
	JobName   string     `json:"job_name"`
	StartTime time.Time  `json:"start_time"`
	EndTime   *time.Time `json:"end_time,omitempty"`
	Status    string     `json:"status"`
	ExitCode  int        `json:"exit_code"`

	ResourceUtilization *ResourceUtilization `json:"resource_utilization"`
	JobUtilization      *JobUtilization      `json:"job_utilization"`
	StepMetrics         []JobStepPerformance `json:"step_metrics,omitempty"`
	PerformanceTrends   *PerformanceTrends   `json:"performance_trends,omitempty"`

	Bottlenecks     []PerformanceBottleneck      `json:"bottlenecks,omitempty"`
	Recommendations []OptimizationRecommendation `json:"recommendations,omitempty"`
}

JobPerformance represents comprehensive job performance metrics.

type JobPerformanceHistory

type JobPerformanceHistory struct {
	JobID     string    `json:"job_id"`
	JobName   string    `json:"job_name"`
	StartTime time.Time `json:"start_time"`
	EndTime   time.Time `json:"end_time"`

	TimeSeriesData []PerformanceSnapshot     `json:"time_series_data"`
	Statistics     PerformanceStatistics     `json:"statistics"`
	Trends         *PerformanceTrendAnalysis `json:"trends,omitempty"`
	Anomalies      []PerformanceAnomaly      `json:"anomalies,omitempty"`
}

JobPerformanceHistory provides historical performance data.

type JobPower

type JobPower struct {
	Flags []interface{} `json:"flags,omitempty"`
}

JobPower is a nested type within its parent.

type JobPriorityFactors

type JobPriorityFactors struct {
	Age       int              `json:"age"`
	FairShare int              `json:"fair_share"`
	JobSize   int              `json:"job_size"`
	Partition int              `json:"partition"`
	QoS       int              `json:"qos"`
	TRES      int              `json:"tres"`
	Site      int              `json:"site"`
	Nice      int              `json:"nice"`
	Assoc     int              `json:"assoc"`
	Total     int              `json:"total"`
	Weights   *PriorityWeights `json:"weights,omitempty"`
}

JobPriorityFactors represents job priority factors.

type JobPriorityInfo

type JobPriorityInfo struct {
	JobID           uint32              `json:"job_id,omitempty"`
	UserName        string              `json:"user_name"`
	Account         string              `json:"account"`
	Partition       string              `json:"partition"`
	QoS             string              `json:"qos"`
	Priority        int                 `json:"priority"`
	Factors         *JobPriorityFactors `json:"factors"`
	Age             int                 `json:"age"`
	EligibleTime    time.Time           `json:"eligible_time"`
	EstimatedStart  time.Time           `json:"estimated_start"`
	PositionInQueue int                 `json:"position_in_queue"`
	PriorityTier    string              `json:"priority_tier"`
}

JobPriorityInfo represents job priority information.

type JobReader

type JobReader interface {
	List(ctx context.Context, opts *ListJobsOptions) (*JobList, error)
	Get(ctx context.Context, jobID string) (*Job, error)
}

JobReader provides read-only job operations

type JobResCore

type JobResCore struct {
	Index  int32                   `json:"index"`  // Core index
	Status []JobResCoreStatusValue `json:"status"` // Core status
}

JobResCore represents a SLURM JobResCore.

type JobResCoreStatusValue

type JobResCoreStatusValue string

JobResCoreStatusValue represents possible values for JobResCoreStatus field.

const (
	JobResCoreStatusInvalid     JobResCoreStatusValue = "INVALID"
	JobResCoreStatusUnallocated JobResCoreStatusValue = "UNALLOCATED"
	JobResCoreStatusAllocated   JobResCoreStatusValue = "ALLOCATED"
	JobResCoreStatusInUse       JobResCoreStatusValue = "IN_USE"
)

JobResCoreStatusValue constants.

type JobResNode

type JobResNode struct {
	CPUs    *JobResNodeCPUs   `json:"cpus,omitempty"`
	Index   int32             `json:"index"` // Node index
	Memory  *JobResNodeMemory `json:"memory,omitempty"`
	Name    string            `json:"name"`    // Node name
	Sockets []JobResSocket    `json:"sockets"` // Socket allocations in node
}

JobResNode represents a SLURM JobResNode.

type JobResNodeCPUs

type JobResNodeCPUs struct {
	Count *int32 `json:"count,omitempty"` // Total number of CPUs assigned to job
	Used  *int32 `json:"used,omitempty"`  // Total number of CPUs used by job
}

JobResNodeCPUs is a nested type within its parent.

type JobResNodeMemory

type JobResNodeMemory struct {
	Allocated *int64 `json:"allocated,omitempty"` // Total memory (MiB) allocated to job
	Used      *int64 `json:"used,omitempty"`      // Total memory (MiB) used by job
}

JobResNodeMemory is a nested type within its parent.

type JobResSocket

type JobResSocket struct {
	Cores []JobResCore `json:"cores"` // Core in socket
	Index int32        `json:"index"` // Core index
}

JobResSocket represents a SLURM JobResSocket.

type JobResourceTrends

type JobResourceTrends struct {
	JobID      string        `json:"job_id"`
	JobName    string        `json:"job_name"`
	StartTime  time.Time     `json:"start_time"`
	EndTime    *time.Time    `json:"end_time,omitempty"`
	TimeWindow time.Duration `json:"time_window"`
	DataPoints int           `json:"data_points"`

	TimePoints    []time.Time         `json:"time_points"`
	CPUTrends     *ResourceTimeSeries `json:"cpu_trends,omitempty"`
	MemoryTrends  *ResourceTimeSeries `json:"memory_trends,omitempty"`
	GPUTrends     *ResourceTimeSeries `json:"gpu_trends,omitempty"`
	IOTrends      *IOTimeSeries       `json:"io_trends,omitempty"`
	NetworkTrends *NetworkTimeSeries  `json:"network_trends,omitempty"`
	EnergyTrends  *EnergyTimeSeries   `json:"energy_trends,omitempty"`

	Anomalies []ResourceAnomaly      `json:"anomalies,omitempty"`
	Summary   *TrendsSummary         `json:"summary"`
	Metadata  map[string]interface{} `json:"metadata,omitempty"`
}

JobResourceTrends represents resource usage trends for a job.

type JobResources

type JobResources struct {
	CPUs           int32              `json:"cpus"` // Number of allocated CPUs
	Nodes          *JobResourcesNodes `json:"nodes,omitempty"`
	SelectType     []SelectTypeValue  `json:"select_type"`      // Scheduler consumable resource selection type
	ThreadsPerCore uint16             `json:"threads_per_core"` // Number of processor threads per CPU core (16 bit integer number with flags)
}

JobResources represents a SLURM JobResources.

type JobResourcesNodes

type JobResourcesNodes struct {
	Allocation []JobResNode                       `json:"allocation,omitempty"`  // Allocated node resources (Job resources for a node)
	Count      *int32                             `json:"count,omitempty"`       // Number of allocated nodes
	List       *string                            `json:"list,omitempty"`        // Node(s) allocated to the job
	SelectType []JobResourcesNodesSelectTypeValue `json:"select_type,omitempty"` // Node scheduling selection method
	Whole      *bool                              `json:"whole,omitempty"`       // Whether whole nodes were allocated
}

JobResourcesNodes is a nested type within its parent.

type JobResourcesNodesSelectTypeValue

type JobResourcesNodesSelectTypeValue string

JobResourcesNodesSelectTypeValue represents possible values for JobResourcesNodesSelectType field.

const (
	JobResourcesNodesSelectTypeAvailable JobResourcesNodesSelectTypeValue = "AVAILABLE"
	JobResourcesNodesSelectTypeOneRow    JobResourcesNodesSelectTypeValue = "ONE_ROW"
	JobResourcesNodesSelectTypeReserved  JobResourcesNodesSelectTypeValue = "RESERVED"
)

JobResourcesNodesSelectTypeValue constants.

type JobSignalRequest

type JobSignalRequest struct {
	Signal string `json:"signal"`
	JobId  int32  `json:"job_id"` // Matches OpenAPI casing
	StepId string `json:"step_id,omitempty"`
}

JobSignalRequest represents a request to signal a job

type JobSizeTrend

type JobSizeTrend struct {
	Timestamp   time.Time `json:"timestamp"`
	SmallJobs   int       `json:"small_jobs"`
	MediumJobs  int       `json:"medium_jobs"`
	LargeJobs   int       `json:"large_jobs"`
	AverageSize float64   `json:"average_size"`
}

JobSizeTrend represents job size trends.

type JobState

type JobState string

JobState represents possible values for JobState field.

const (
	JobStatePending      JobState = "PENDING"
	JobStateRunning      JobState = "RUNNING"
	JobStateSuspended    JobState = "SUSPENDED"
	JobStateCompleted    JobState = "COMPLETED"
	JobStateCancelled    JobState = "CANCELLED"
	JobStateFailed       JobState = "FAILED"
	JobStateTimeout      JobState = "TIMEOUT"
	JobStateNodeFail     JobState = "NODE_FAIL"
	JobStatePreempted    JobState = "PREEMPTED"
	JobStateBootFail     JobState = "BOOT_FAIL"
	JobStateDeadline     JobState = "DEADLINE"
	JobStateOutOfMemory  JobState = "OUT_OF_MEMORY"
	JobStateLaunchFailed JobState = "LAUNCH_FAILED"
	JobStateRequeued     JobState = "REQUEUED"
	JobStateRequeueHold  JobState = "REQUEUE_HOLD"
	JobStateSpecialExit  JobState = "SPECIAL_EXIT"
	JobStateResizing     JobState = "RESIZING"
	JobStateConfiguring  JobState = "CONFIGURING"
	JobStateCompleting   JobState = "COMPLETING"
	JobStateStopped      JobState = "STOPPED"
	JobStateReconfigFail JobState = "RECONFIG_FAIL"
	JobStatePowerUpNode  JobState = "POWER_UP_NODE"
	JobStateRevoked      JobState = "REVOKED"
	JobStateRequeueFed   JobState = "REQUEUE_FED"
	JobStateResvDelHold  JobState = "RESV_DEL_HOLD"
	JobStateSignaling    JobState = "SIGNALING"
	JobStateStageOut     JobState = "STAGE_OUT"
	JobStateExpediting   JobState = "EXPEDITING"
)

JobState constants.

type JobStateChange

type JobStateChange struct {
	OldState string `json:"old_state"`
	NewState string `json:"new_state"`
	Reason   string `json:"reason,omitempty"`
}

JobStateChange represents a job state transition.

type JobStep

type JobStep struct {
	ID        string     `json:"id"`
	JobID     string     `json:"job_id"`
	Name      string     `json:"name"`
	State     string     `json:"state"`
	CPUs      int        `json:"cpus"`
	Memory    int        `json:"memory"`
	StartTime *time.Time `json:"start_time,omitempty"`
	EndTime   *time.Time `json:"end_time,omitempty"`
	ExitCode  int        `json:"exit_code"`
}

JobStep represents a single job step.

type JobStepAPIData

type JobStepAPIData struct {
	StepID   string `json:"step_id"`
	JobID    string `json:"job_id"`
	StepName string `json:"step_name"`
	State    string `json:"state"`

	CurrentCPUUsage    float64 `json:"current_cpu_usage"`
	CurrentMemoryUsage int64   `json:"current_memory_usage"`
	CurrentIOReads     int64   `json:"current_io_reads"`
	CurrentIOWrites    int64   `json:"current_io_writes"`

	TaskCount      int `json:"task_count"`
	RunningTasks   int `json:"running_tasks"`
	CompletedTasks int `json:"completed_tasks"`
	FailedTasks    int `json:"failed_tasks"`

	NetworkBytesIn  int64 `json:"network_bytes_in"`
	NetworkBytesOut int64 `json:"network_bytes_out"`

	ContextSwitches int64 `json:"context_switches"`
	PageFaults      int64 `json:"page_faults"`

	StartTime  *time.Time `json:"start_time,omitempty"`
	LastUpdate time.Time  `json:"last_update"`

	ProcessTree     []ProcessInfo          `json:"process_tree,omitempty"`
	EnvironmentVars map[string]string      `json:"environment_vars,omitempty"`
	Metadata        map[string]interface{} `json:"metadata,omitempty"`
}

JobStepAPIData represents real-time step data from the API.

type JobStepDetails

type JobStepDetails struct {
	StepID    string        `json:"step_id"`
	StepName  string        `json:"step_name"`
	JobID     string        `json:"job_id"`
	JobName   string        `json:"job_name"`
	State     string        `json:"state"`
	StartTime *time.Time    `json:"start_time,omitempty"`
	EndTime   *time.Time    `json:"end_time,omitempty"`
	Duration  time.Duration `json:"duration"`
	ExitCode  int           `json:"exit_code"`

	CPUAllocation    int      `json:"cpu_allocation"`
	MemoryAllocation int64    `json:"memory_allocation_bytes"`
	GPUAllocation    int      `json:"gpu_allocation,omitempty"`
	NodeList         []string `json:"node_list"`
	TaskCount        int      `json:"task_count"`
	TasksPerNode     int      `json:"tasks_per_node,omitempty"`

	TaskDistribution map[string]int    `json:"task_distribution,omitempty"`
	Command          string            `json:"command"`
	CommandLine      string            `json:"command_line"`
	WorkingDir       string            `json:"working_dir"`
	Environment      map[string]string `json:"environment,omitempty"`

	CPUTime    time.Duration `json:"cpu_time"`
	SystemTime time.Duration `json:"system_time"`
	UserTime   time.Duration `json:"user_time"`
	MaxRSS     int64         `json:"max_rss_bytes"`
	MaxVMSize  int64         `json:"max_vmsize_bytes"`
	AverageRSS int64         `json:"average_rss_bytes"`

	TotalReadBytes  int64 `json:"total_read_bytes"`
	TotalWriteBytes int64 `json:"total_write_bytes"`
	ReadOperations  int64 `json:"read_operations"`
	WriteOperations int64 `json:"write_operations"`

	NetworkBytesReceived int64 `json:"network_bytes_received"`
	NetworkBytesSent     int64 `json:"network_bytes_sent"`

	EnergyConsumed   float64 `json:"energy_consumed_joules"`
	AveragePowerDraw float64 `json:"average_power_draw_watts"`

	Tasks []StepTaskInfo `json:"tasks,omitempty"`

	StepType        string                 `json:"step_type"`
	Priority        int                    `json:"priority"`
	AccountingGroup string                 `json:"accounting_group"`
	QOSLevel        string                 `json:"qos_level"`
	Metadata        map[string]interface{} `json:"metadata,omitempty"`
}

JobStepDetails provides detailed information about a job step.

type JobStepList

type JobStepList struct {
	Steps []JobStep `json:"steps"`
	Total int       `json:"total"`
}

JobStepList represents a list of job steps.

type JobStepMetricsList

type JobStepMetricsList struct {
	JobID         string                 `json:"job_id"`
	JobName       string                 `json:"job_name"`
	Steps         []*JobStepWithMetrics  `json:"steps"`
	Summary       *JobStepsSummary       `json:"summary,omitempty"`
	TotalSteps    int                    `json:"total_steps"`
	FilteredSteps int                    `json:"filtered_steps"`
	Metadata      map[string]interface{} `json:"metadata,omitempty"`
}

JobStepMetricsList represents a list of step metrics.

type JobStepPerformance

type JobStepPerformance struct {
	StepID    uint32        `json:"step_id"`
	StepName  string        `json:"step_name"`
	StartTime time.Time     `json:"start_time"`
	EndTime   *time.Time    `json:"end_time,omitempty"`
	Duration  time.Duration `json:"duration"`
	ExitCode  int           `json:"exit_code"`

	CPUUtilization    float64 `json:"cpu_utilization"`
	MemoryUtilization float64 `json:"memory_utilization"`
	GPUUtilization    float64 `json:"gpu_utilization,omitempty"`
	IOThroughput      float64 `json:"io_throughput"`
	NetworkThroughput float64 `json:"network_throughput"`
}

JobStepPerformance represents step-level performance metrics.

type JobStepUtilization

type JobStepUtilization struct {
	StepID    string        `json:"step_id"`
	StepName  string        `json:"step_name"`
	JobID     string        `json:"job_id"`
	JobName   string        `json:"job_name"`
	StartTime *time.Time    `json:"start_time,omitempty"`
	EndTime   *time.Time    `json:"end_time,omitempty"`
	Duration  time.Duration `json:"duration"`

	CPUUtilization     *ResourceUtilization `json:"cpu_utilization,omitempty"`
	MemoryUtilization  *ResourceUtilization `json:"memory_utilization,omitempty"`
	GPUUtilization     *GPUUtilization      `json:"gpu_utilization,omitempty"`
	IOUtilization      *IOUtilization       `json:"io_utilization,omitempty"`
	NetworkUtilization *NetworkUtilization  `json:"network_utilization,omitempty"`
	EnergyUtilization  *ResourceUtilization `json:"energy_utilization,omitempty"`

	TaskUtilizations   []TaskUtilization       `json:"task_utilizations,omitempty"`
	PerformanceMetrics *StepPerformanceMetrics `json:"performance_metrics,omitempty"`
	Metadata           map[string]interface{}  `json:"metadata,omitempty"`
}

JobStepUtilization represents step-level utilization metrics.

type JobStepWithMetrics

type JobStepWithMetrics struct {
	*JobStepDetails     `json:",inline"`
	*JobStepUtilization `json:",inline"`

	Trends       *StepResourceTrends          `json:"trends,omitempty"`
	Comparison   *StepComparison              `json:"comparison,omitempty"`
	Optimization *StepOptimizationSuggestions `json:"optimization,omitempty"`
}

JobStepWithMetrics combines step details and utilization.

type JobStepsSummary

type JobStepsSummary struct {
	TotalSteps      int           `json:"total_steps"`
	CompletedSteps  int           `json:"completed_steps"`
	FailedSteps     int           `json:"failed_steps"`
	RunningSteps    int           `json:"running_steps"`
	TotalDuration   time.Duration `json:"total_duration"`
	AverageDuration time.Duration `json:"average_duration"`

	AverageCPUEfficiency     float64 `json:"average_cpu_efficiency"`
	AverageMemoryEfficiency  float64 `json:"average_memory_efficiency"`
	AverageIOEfficiency      float64 `json:"average_io_efficiency"`
	AverageOverallEfficiency float64 `json:"average_overall_efficiency"`

	TotalCPUHours     float64 `json:"total_cpu_hours"`
	TotalMemoryGBH    float64 `json:"total_memory_gb_hours"`
	TotalIOOperations int64   `json:"total_io_operations"`
	TotalEnergyUsed   float64 `json:"total_energy_used,omitempty"`

	PrimaryBottlenecks   map[string]int `json:"primary_bottlenecks"`
	BottleneckSeverities map[string]int `json:"bottleneck_severities"`
	MostEfficientStep    *string        `json:"most_efficient_step,omitempty"`
	LeastEfficientStep   *string        `json:"least_efficient_step,omitempty"`

	OptimizationPotential float64  `json:"optimization_potential"`
	RecommendedActions    []string `json:"recommended_actions,omitempty"`
}

JobStepsSummary summarizes all steps in a job.

type JobSubmission deprecated

type JobSubmission struct {
	Name        string            `json:"name"`
	Account     string            `json:"account,omitempty"`
	Script      string            `json:"script,omitempty"`
	Command     string            `json:"command,omitempty"`
	Args        []string          `json:"args,omitempty"`
	Partition   string            `json:"partition,omitempty"`
	CPUs        int               `json:"cpus,omitempty"`
	Memory      int               `json:"memory,omitempty"`
	TimeLimit   int               `json:"time_limit,omitempty"`
	WorkingDir  string            `json:"working_dir,omitempty"`
	Environment map[string]string `json:"environment,omitempty"`
	Nodes       int               `json:"nodes,omitempty"`
	Priority    int               `json:"priority,omitempty"`
}

JobSubmission represents a simplified job submission request with 12 fields.

Deprecated: Use JobCreate with SubmitRaw for full field support (90+ fields from the SLURM OpenAPI spec).

type JobSubmitOptions

type JobSubmitOptions struct {
	// HoldJob holds the job immediately after submission
	HoldJob bool `json:"hold_job,omitempty"`
	// TestOnly validates the job submission without actually submitting
	TestOnly bool `json:"test_only,omitempty"`
	// Parsable returns job ID in a parsable format
	Parsable bool `json:"parsable,omitempty"`
	// WaitForCompletion waits for the job to complete
	WaitForCompletion bool `json:"wait_for_completion,omitempty"`
	// Verbose provides verbose output
	Verbose bool `json:"verbose,omitempty"`
}

JobSubmitOptions represents options for job submission

type JobSubmitRequest

type JobSubmitRequest = JobCreate

JobSubmitRequest is an alias for JobCreate

type JobSubmitResponse

type JobSubmitResponse struct {
	JobId            int32    `json:"job_id"`            // Matches OpenAPI: JobId *int32
	StepId           string   `json:"step_id,omitempty"` // Matches OpenAPI casing
	JobSubmitUserMsg string   `json:"job_submit_user_msg,omitempty"`
	Error            []string `json:"error,omitempty"`
	Warning          []string `json:"warning,omitempty"`
}

JobSubmitResponse represents the response from job submission

type JobUpdate

type JobUpdate = JobCreate

JobUpdate is an alias for JobCreate since SLURM uses the same job_desc_msg for both create and update operations.

type JobUpdateRequest

type JobUpdateRequest = JobUpdate

JobUpdateRequest is an alias for JobUpdate

type JobUtilization

type JobUtilization struct {
	JobID              string                 `json:"job_id"`
	JobName            string                 `json:"job_name"`
	UserID             string                 `json:"user_id"`
	StartTime          time.Time              `json:"start_time"`
	EndTime            *time.Time             `json:"end_time,omitempty"`
	CPUUtilization     *ResourceUtilization   `json:"cpu_utilization,omitempty"`
	MemoryUtilization  *ResourceUtilization   `json:"memory_utilization,omitempty"`
	GPUUtilization     *GPUUtilization        `json:"gpu_utilization,omitempty"`
	IOUtilization      *IOUtilization         `json:"io_utilization,omitempty"`
	NetworkUtilization *NetworkUtilization    `json:"network_utilization,omitempty"`
	EnergyUsage        *EnergyUsage           `json:"energy_usage,omitempty"`
	SamplingInterval   int                    `json:"sampling_interval_seconds"`
	LastUpdated        time.Time              `json:"last_updated"`
	Metadata           map[string]interface{} `json:"metadata,omitempty"`
}

JobUtilization represents detailed resource utilization metrics for a job.

type JobWatchEvent

type JobWatchEvent = JobEvent

Type aliases for compatibility

type JobWatchOptions

type JobWatchOptions struct {
	// JobId is the specific job to watch (0 means all jobs) - matches OpenAPI casing
	JobId int32 `json:"job_id,omitempty"`
	// StartTime to begin watching from
	StartTime *time.Time `json:"start_time,omitempty"`
	// EventTypes to filter (e.g., "submit", "start", "end", "fail")
	EventTypes []string `json:"event_types,omitempty"`
	// MaxEvents maximum number of events to return
	MaxEvents int32 `json:"max_events,omitempty"`
	// IncludeSteps includes job step events
	IncludeSteps bool `json:"include_steps,omitempty"`
	// PollInterval is the interval between polling requests (default: 5s)
	PollInterval time.Duration `json:"poll_interval,omitempty"`
}

JobWatchOptions represents options for watching job events

type JobWatcher

type JobWatcher interface {
	Watch(ctx context.Context, opts *WatchJobsOptions) (<-chan JobEvent, error)
	Allocate(ctx context.Context, req *JobAllocateRequest) (*JobAllocateResponse, error)
}

JobWatcher provides real-time job operations

type JobWriter

type JobWriter interface {
	// Deprecated: Submit uses the simplified JobSubmission struct which only supports 12 fields.
	// Use SubmitRaw with *JobCreate for full field support (90+ fields from the SLURM OpenAPI spec).
	Submit(ctx context.Context, job *JobSubmission) (*JobSubmitResponse, error)
	// SubmitRaw submits a job using the full JobCreate struct from the SLURM OpenAPI spec.
	// This provides access to all fields (QoS, GPUs, array, mail, exclusive, requeue,
	// dependencies, constraints, etc.) without the lossy conversion of Submit.
	SubmitRaw(ctx context.Context, job *JobCreate) (*JobSubmitResponse, error)
	Update(ctx context.Context, jobID string, update *JobUpdate) error
}

JobWriter provides job mutation operations

type KillWarningFlagsValue

type KillWarningFlagsValue string

KillWarningFlagsValue represents possible values for KillWarningFlags field.

const (
	KillWarningFlagsBatchJob          KillWarningFlagsValue = "BATCH_JOB"
	KillWarningFlagsArrayTask         KillWarningFlagsValue = "ARRAY_TASK"
	KillWarningFlagsFullStepsOnly     KillWarningFlagsValue = "FULL_STEPS_ONLY"
	KillWarningFlagsFullJob           KillWarningFlagsValue = "FULL_JOB"
	KillWarningFlagsFederationRequeue KillWarningFlagsValue = "FEDERATION_REQUEUE"
	KillWarningFlagsHurry             KillWarningFlagsValue = "HURRY"
	KillWarningFlagsOutOfMemory       KillWarningFlagsValue = "OUT_OF_MEMORY"
	KillWarningFlagsNoSiblingJobs     KillWarningFlagsValue = "NO_SIBLING_JOBS"
	KillWarningFlagsReservationJob    KillWarningFlagsValue = "RESERVATION_JOB"
	KillWarningFlagsVerbose           KillWarningFlagsValue = "VERBOSE"
	KillWarningFlagsCronJobs          KillWarningFlagsValue = "CRON_JOBS"
	KillWarningFlagsWarningSent       KillWarningFlagsValue = "WARNING_SENT"
)

KillWarningFlagsValue constants.

type License

type License struct {
	Name       string `json:"name"`
	Total      int    `json:"total"`
	Used       int    `json:"used"`
	Free       int    `json:"free"`
	Reserved   int    `json:"reserved"`
	RemoteUsed int    `json:"remote_used,omitempty"`
}

License represents a SLURM license

type LicenseList

type LicenseList struct {
	Licenses []License              `json:"licenses"`
	Meta     map[string]interface{} `json:"meta,omitempty"`
}

LicenseList represents a list of licenses

type ListAccountUsersOptions

type ListAccountUsersOptions struct {
	Roles            []string `json:"roles,omitempty"`
	Permissions      []string `json:"permissions,omitempty"`
	ActiveOnly       bool     `json:"active_only,omitempty"`
	CoordinatorsOnly bool     `json:"coordinators_only,omitempty"`
	Partitions       []string `json:"partitions,omitempty"`
	QoS              []string `json:"qos,omitempty"`
	WithPermissions  bool     `json:"with_permissions,omitempty"`
	WithQuotas       bool     `json:"with_quotas,omitempty"`
	WithUsage        bool     `json:"with_usage,omitempty"`
	WithFairShare    bool     `json:"with_fair_share,omitempty"`
	Limit            int      `json:"limit,omitempty"`
	Offset           int      `json:"offset,omitempty"`
	SortBy           string   `json:"sort_by,omitempty"`
	SortOrder        string   `json:"sort_order,omitempty"`
}

ListAccountUsersOptions configures listing users in an account.

type ListAccountsOptions

type ListAccountsOptions struct {
	Names            []string `json:"names,omitempty"`
	Organizations    []string `json:"organizations,omitempty"`
	ParentAccounts   []string `json:"parent_accounts,omitempty"`
	WithAssociations bool     `json:"with_associations,omitempty"`
	WithCoordinators bool     `json:"with_coordinators,omitempty"`
	WithDeleted      bool     `json:"with_deleted,omitempty"`
	WithUsers        bool     `json:"with_users,omitempty"`
	WithQuotas       bool     `json:"with_quotas,omitempty"`
	WithUsage        bool     `json:"with_usage,omitempty"`
	Limit            int      `json:"limit,omitempty"`
	Offset           int      `json:"offset,omitempty"`
}

ListAccountsOptions configures account listing.

type ListAssociationsOptions

type ListAssociationsOptions struct {
	Users           []string `json:"users,omitempty"`
	Accounts        []string `json:"accounts,omitempty"`
	Clusters        []string `json:"clusters,omitempty"`
	Partitions      []string `json:"partitions,omitempty"`
	ParentAccounts  []string `json:"parent_accounts,omitempty"`
	QoS             []string `json:"qos,omitempty"`
	WithDeleted     bool     `json:"with_deleted,omitempty"`
	WithUsage       bool     `json:"with_usage,omitempty"`
	WithTRES        bool     `json:"with_tres,omitempty"`
	WithSubAccounts bool     `json:"with_sub_accounts,omitempty"`
	OnlyDefaults    bool     `json:"only_defaults,omitempty"`
	Offset          int      `json:"offset,omitempty"`
	Limit           int      `json:"limit,omitempty"`
}

ListAssociationsOptions configures association listing.

type ListClustersOptions

type ListClustersOptions struct {
	Names            []string `json:"names,omitempty"`
	FederationStates []string `json:"federation_states,omitempty"`
	Features         []string `json:"features,omitempty"`
	ControlHosts     []string `json:"control_hosts,omitempty"`
	WithFederation   bool     `json:"with_federation,omitempty"`
	WithTRES         bool     `json:"with_tres,omitempty"`
	WithPlugins      bool     `json:"with_plugins,omitempty"`
	Offset           int      `json:"offset,omitempty"`
	Limit            int      `json:"limit,omitempty"`
}

ListClustersOptions configures cluster listing.

type ListJobStepsOptions

type ListJobStepsOptions struct {
	StepStates []string `json:"step_states,omitempty"`
	NodeNames  []string `json:"node_names,omitempty"`
	StepNames  []string `json:"step_names,omitempty"`
	TaskStates []string `json:"task_states,omitempty"`

	StartTimeAfter  *time.Time     `json:"start_time_after,omitempty"`
	StartTimeBefore *time.Time     `json:"start_time_before,omitempty"`
	EndTimeAfter    *time.Time     `json:"end_time_after,omitempty"`
	EndTimeBefore   *time.Time     `json:"end_time_before,omitempty"`
	MinDuration     *time.Duration `json:"min_duration,omitempty"`
	MaxDuration     *time.Duration `json:"max_duration,omitempty"`

	MinCPUEfficiency     *float64 `json:"min_cpu_efficiency,omitempty"`
	MaxCPUEfficiency     *float64 `json:"max_cpu_efficiency,omitempty"`
	MinMemoryEfficiency  *float64 `json:"min_memory_efficiency,omitempty"`
	MaxMemoryEfficiency  *float64 `json:"max_memory_efficiency,omitempty"`
	MinOverallEfficiency *float64 `json:"min_overall_efficiency,omitempty"`
	MaxOverallEfficiency *float64 `json:"max_overall_efficiency,omitempty"`

	IncludeTaskMetrics         bool `json:"include_task_metrics,omitempty"`
	IncludePerformanceAnalysis bool `json:"include_performance_analysis,omitempty"`
	IncludeResourceTrends      bool `json:"include_resource_trends,omitempty"`
	IncludeBottleneckAnalysis  bool `json:"include_bottleneck_analysis,omitempty"`

	Limit     int    `json:"limit,omitempty"`
	Offset    int    `json:"offset,omitempty"`
	SortBy    string `json:"sort_by,omitempty"`
	SortOrder string `json:"sort_order,omitempty"`
}

ListJobStepsOptions configures job step listing.

type ListJobsOptions

type ListJobsOptions struct {
	UserID    string   `json:"user_id,omitempty"`
	States    []string `json:"states,omitempty"`
	Partition string   `json:"partition,omitempty"`
	Limit     int      `json:"limit,omitempty"`
	Offset    int      `json:"offset,omitempty"`
}

ListJobsOptions configures job listing with a simple, string-based interface.

This type provides a simpler API for common use cases with string-based filtering. For more comprehensive filtering with type-safe JobState values and multi-value filtering, see JobListOptions in api/job.go.

Note: Both types are maintained for different use cases:

  • ListJobsOptions: Simple string-based filtering (UserID, Partition, []string States)
  • JobListOptions: Type-safe filtering ([]string Users, []string Partitions, []JobState States)

type ListNodesOptions

type ListNodesOptions struct {
	States    []string `json:"states,omitempty"`
	Partition string   `json:"partition,omitempty"`
	Features  []string `json:"features,omitempty"`
	Limit     int      `json:"limit,omitempty"`
	Offset    int      `json:"offset,omitempty"`
}

ListNodesOptions configures node listing.

type ListPartitionsOptions

type ListPartitionsOptions struct {
	States []string `json:"states,omitempty"`
	Limit  int      `json:"limit,omitempty"`
	Offset int      `json:"offset,omitempty"`
}

ListPartitionsOptions configures partition listing.

type ListQoSOptions

type ListQoSOptions struct {
	Names    []string `json:"names,omitempty"`
	Accounts []string `json:"accounts,omitempty"`
	Users    []string `json:"users,omitempty"`
	Limit    int      `json:"limit,omitempty"`
	Offset   int      `json:"offset,omitempty"`
}

ListQoSOptions configures QoS listing.

type ListReservationsOptions

type ListReservationsOptions struct {
	Names    []string `json:"names,omitempty"`
	Users    []string `json:"users,omitempty"`
	Accounts []string `json:"accounts,omitempty"`
	States   []string `json:"states,omitempty"`
	Limit    int      `json:"limit,omitempty"`
	Offset   int      `json:"offset,omitempty"`
}

ListReservationsOptions configures reservation listing.

type ListUserAccountAssociationsOptions

type ListUserAccountAssociationsOptions struct {
	Accounts         []string `json:"accounts,omitempty"`
	Clusters         []string `json:"clusters,omitempty"`
	Partitions       []string `json:"partitions,omitempty"`
	Roles            []string `json:"roles,omitempty"`
	Permissions      []string `json:"permissions,omitempty"`
	ActiveOnly       bool     `json:"active_only,omitempty"`
	DefaultOnly      bool     `json:"default_only,omitempty"`
	CoordinatorRoles bool     `json:"coordinator_roles,omitempty"`
	WithQuotas       bool     `json:"with_quotas,omitempty"`
	WithUsage        bool     `json:"with_usage,omitempty"`
	WithFairShare    bool     `json:"with_fair_share,omitempty"`
	Limit            int      `json:"limit,omitempty"`
	Offset           int      `json:"offset,omitempty"`
	SortBy           string   `json:"sort_by,omitempty"`
	SortOrder        string   `json:"sort_order,omitempty"`
}

ListUserAccountAssociationsOptions configures listing user-account associations.

type ListUsersOptions

type ListUsersOptions struct {
	Names            []string `json:"names,omitempty"`
	Accounts         []string `json:"accounts,omitempty"`
	Clusters         []string `json:"clusters,omitempty"`
	AdminLevels      []string `json:"admin_levels,omitempty"`
	ActiveOnly       bool     `json:"active_only,omitempty"`
	CoordinatorsOnly bool     `json:"coordinators_only,omitempty"`
	WithAccounts     bool     `json:"with_accounts,omitempty"`
	WithQuotas       bool     `json:"with_quotas,omitempty"`
	WithFairShare    bool     `json:"with_fair_share,omitempty"`
	WithAssociations bool     `json:"with_associations,omitempty"`
	WithUsage        bool     `json:"with_usage,omitempty"`
	Limit            int      `json:"limit,omitempty"`
	Offset           int      `json:"offset,omitempty"`
	SortBy           string   `json:"sort_by,omitempty"`
	SortOrder        string   `json:"sort_order,omitempty"`
}

ListUsersOptions configures user listing.

type LiveResourceMetric

type LiveResourceMetric struct {
	Current            float64 `json:"current"`
	Average1Min        float64 `json:"average_1min"`
	Average5Min        float64 `json:"average_5min"`
	Peak               float64 `json:"peak"`
	Allocated          float64 `json:"allocated"`
	UtilizationPercent float64 `json:"utilization_percent"`
	Trend              string  `json:"trend"`
	Unit               string  `json:"unit"`
}

LiveResourceMetric represents a real-time resource metric.

type MailTypeValue

type MailTypeValue string

MailTypeValue represents possible values for MailType field.

const (
	MailTypeBegin             MailTypeValue = "BEGIN"
	MailTypeEnd               MailTypeValue = "END"
	MailTypeFail              MailTypeValue = "FAIL"
	MailTypeRequeue           MailTypeValue = "REQUEUE"
	MailTypeTime100           MailTypeValue = "TIME=100%"
	MailTypeTime90            MailTypeValue = "TIME=90%"
	MailTypeTime80            MailTypeValue = "TIME=80%"
	MailTypeTime50            MailTypeValue = "TIME=50%"
	MailTypeStageOut          MailTypeValue = "STAGE_OUT"
	MailTypeArrayTasks        MailTypeValue = "ARRAY_TASKS"
	MailTypeInvalidDependency MailTypeValue = "INVALID_DEPENDENCY"
)

MailTypeValue constants.

type MemoryAnalytics

type MemoryAnalytics struct {
	AllocatedBytes     int64   `json:"allocated_bytes"`
	RequestedBytes     int64   `json:"requested_bytes"`
	UsedBytes          int64   `json:"used_bytes"`
	UtilizationPercent float64 `json:"utilization_percent"`
	EfficiencyPercent  float64 `json:"efficiency_percent"`
	FreeBytes          int64   `json:"free_bytes"`
	Overcommitted      bool    `json:"overcommitted"`

	ResidentSetSize   int64 `json:"resident_set_size"`
	VirtualMemorySize int64 `json:"virtual_memory_size"`
	SharedMemory      int64 `json:"shared_memory"`
	BufferedMemory    int64 `json:"buffered_memory"`
	CachedMemory      int64 `json:"cached_memory"`

	NUMANodes []NUMANodeMetrics `json:"numa_nodes,omitempty"`

	BandwidthUtilization float64 `json:"bandwidth_utilization_percent"`
	MemoryBandwidthMBPS  int64   `json:"memory_bandwidth_mbps"`
	PeakBandwidthMBPS    int64   `json:"peak_bandwidth_mbps"`

	PageFaults      int64 `json:"page_faults"`
	MajorPageFaults int64 `json:"major_page_faults"`
	MinorPageFaults int64 `json:"minor_page_faults"`
	PageSwaps       int64 `json:"page_swaps"`

	RandomAccess     float64 `json:"random_access_percent"`
	SequentialAccess float64 `json:"sequential_access_percent"`
	LocalityScore    float64 `json:"locality_score"`

	MemoryLeaks []MemoryLeak `json:"memory_leaks,omitempty"`

	Recommendations []OptimizationRecommendation `json:"recommendations,omitempty"`
	Bottlenecks     []PerformanceBottleneck      `json:"bottlenecks,omitempty"`

	Metadata map[string]interface{} `json:"metadata,omitempty"`
}

MemoryAnalytics provides detailed memory analytics.

type MemoryBindingTypeValue

type MemoryBindingTypeValue string

MemoryBindingTypeValue represents possible values for MemoryBindingType field.

const (
	MemoryBindingTypeNone    MemoryBindingTypeValue = "NONE"
	MemoryBindingTypeRank    MemoryBindingTypeValue = "RANK"
	MemoryBindingTypeMap     MemoryBindingTypeValue = "MAP"
	MemoryBindingTypeMask    MemoryBindingTypeValue = "MASK"
	MemoryBindingTypeLocal   MemoryBindingTypeValue = "LOCAL"
	MemoryBindingTypeVerbose MemoryBindingTypeValue = "VERBOSE"
	MemoryBindingTypePrefer  MemoryBindingTypeValue = "PREFER"
)

MemoryBindingTypeValue constants.

type MemoryLeak

type MemoryLeak struct {
	LeakType    string `json:"leak_type"`
	SizeBytes   int64  `json:"size_bytes"`
	GrowthRate  int64  `json:"growth_rate"`
	Location    string `json:"location"`
	Severity    string `json:"severity"`
	Description string `json:"description"`
}

MemoryLeak represents a detected memory leak.

type ModeValue

type ModeValue string

ModeValue represents possible values for Mode field.

const (
	ModeDisabled ModeValue = "DISABLED"
	ModeSuspend  ModeValue = "SUSPEND"
	ModeRequeue  ModeValue = "REQUEUE"
	ModeCancel   ModeValue = "CANCEL"
	ModeGang     ModeValue = "GANG"
)

ModeValue constants.

type NUMANodeMetrics

type NUMANodeMetrics struct {
	NodeID           int     `json:"node_id"`
	CPUCores         int     `json:"cpu_cores"`
	MemoryTotal      int64   `json:"memory_total"`
	MemoryUsed       int64   `json:"memory_used"`
	MemoryFree       int64   `json:"memory_free"`
	CPUUtilization   float64 `json:"cpu_utilization_percent"`
	MemoryBandwidth  int64   `json:"memory_bandwidth_mbps"`
	LocalAccesses    float64 `json:"local_accesses_percent"`
	RemoteAccesses   float64 `json:"remote_accesses_percent"`
	InterconnectLoad float64 `json:"interconnect_load_percent"`
}

NUMANodeMetrics represents NUMA node metrics.

type NetworkInterfaceStats

type NetworkInterfaceStats struct {
	InterfaceName   string  `json:"interface_name"`
	BytesReceived   int64   `json:"bytes_received"`
	BytesSent       int64   `json:"bytes_sent"`
	PacketsReceived int64   `json:"packets_received"`
	PacketsSent     int64   `json:"packets_sent"`
	BandwidthMbps   float64 `json:"bandwidth_mbps"`
	Utilization     float64 `json:"utilization_percentage"`
}

NetworkInterfaceStats represents per-interface network statistics.

type NetworkTimeSeries

type NetworkTimeSeries struct {
	IngressBandwidth *ResourceTimeSeries `json:"ingress_bandwidth,omitempty"`
	EgressBandwidth  *ResourceTimeSeries `json:"egress_bandwidth,omitempty"`
	PacketRate       *ResourceTimeSeries `json:"packet_rate,omitempty"`
}

NetworkTimeSeries represents network time series data.

type NetworkUtilization

type NetworkUtilization struct {
	Interfaces       map[string]NetworkInterfaceStats `json:"interfaces"`
	TotalBandwidth   *ResourceUtilization             `json:"total_bandwidth"`
	IngressBandwidth *ResourceUtilization             `json:"ingress_bandwidth"`
	EgressBandwidth  *ResourceUtilization             `json:"egress_bandwidth"`
	PacketsReceived  int64                            `json:"packets_received"`
	PacketsSent      int64                            `json:"packets_sent"`
	PacketsDropped   int64                            `json:"packets_dropped"`
	Errors           int64                            `json:"errors"`
	ProtocolStats    map[string]int64                 `json:"protocol_stats,omitempty"`
	Metadata         map[string]interface{}           `json:"metadata,omitempty"`
}

NetworkUtilization represents network usage metrics.

type Node

type Node struct {
	ActiveFeatures            []string               `json:"active_features,omitempty"`             // Currently active features
	Address                   *string                `json:"address,omitempty"`                     // NodeAddr, used to establish a communication path
	AllocCPUs                 *int32                 `json:"alloc_cpus,omitempty"`                  // Total number of CPUs currently allocated for jobs
	AllocIdleCPUs             *int32                 `json:"alloc_idle_cpus,omitempty"`             // Total number of idle CPUs
	AllocMemory               *int64                 `json:"alloc_memory,omitempty"`                // Total memory in MB currently allocated for jobs
	Architecture              *string                `json:"architecture,omitempty"`                // Computer architecture
	Boards                    *int32                 `json:"boards,omitempty"`                      // Number of Baseboards in nodes with a baseboard controller
	BootTime                  time.Time              `json:"boot_time,omitempty"`                   // Time when the node booted (UNIX timestamp) (UNIX timestamp or time string...
	BurstbufferNetworkAddress *string                `json:"burstbuffer_network_address,omitempty"` // Alternate network path to be used for sbcast network traffic
	CertFlags                 []CertFlagsValue       `json:"cert_flags,omitempty"`                  // Certmgr status flags
	ClusterName               *string                `json:"cluster_name,omitempty"`                // Cluster name (only set in federated environments)
	Comment                   *string                `json:"comment,omitempty"`                     // Arbitrary comment
	Cores                     *int32                 `json:"cores,omitempty"`                       // Number of cores in a single physical processor socket
	CPUBinding                *int32                 `json:"cpu_binding,omitempty"`                 // Default method for binding tasks to allocated CPUs
	CPULoad                   *int32                 `json:"cpu_load,omitempty"`                    // CPU load as reported by the OS
	CPUs                      *int32                 `json:"cpus,omitempty"`                        // Total CPUs, including cores and threads
	EffectiveCPUs             *int32                 `json:"effective_cpus,omitempty"`              // Number of effective CPUs (excluding specialized CPUs)
	Energy                    *NodeEnergy            `json:"energy,omitempty"`                      // Energy usage data
	ExternalSensors           map[string]interface{} `json:"external_sensors,omitempty"`
	Extra                     *string                `json:"extra,omitempty"`                   // Arbitrary string used for node filtering if extra constraints are enabled
	Features                  []string               `json:"features,omitempty"`                // Available features
	FreeMem                   *uint64                `json:"free_mem,omitempty"`                // Total memory in MB currently free as reported by the OS (64 bit integer number...
	GPUSpec                   *string                `json:"gpu_spec,omitempty"`                // CPU cores reserved for jobs that also use a GPU
	GRES                      *string                `json:"gres,omitempty"`                    // Generic resources
	GRESDrained               *string                `json:"gres_drained,omitempty"`            // Drained generic resources
	GRESUsed                  *string                `json:"gres_used,omitempty"`               // Generic resources currently in use
	Hostname                  *string                `json:"hostname,omitempty"`                // NodeHostname
	InstanceID                *string                `json:"instance_id,omitempty"`             // Cloud instance ID
	InstanceType              *string                `json:"instance_type,omitempty"`           // Cloud instance type
	LastBusy                  time.Time              `json:"last_busy,omitempty"`               // Time when the node was last busy (UNIX timestamp) (UNIX timestamp or time...
	MCSLabel                  *string                `json:"mcs_label,omitempty"`               // Multi-Category Security label
	Name                      *string                `json:"name,omitempty"`                    // NodeName
	NextStateAfterReboot      []NodeState            `json:"next_state_after_reboot,omitempty"` // The state the node will be assigned after rebooting
	OperatingSystem           *string                `json:"operating_system,omitempty"`        // Operating system reported by the node
	Owner                     *string                `json:"owner,omitempty"`                   // User allowed to run jobs on this node (unset if no restriction)
	Partitions                []string               `json:"partitions,omitempty"`              // Partitions containing this node
	Port                      *int32                 `json:"port,omitempty"`                    // TCP port number of the slurmd
	Power                     map[string]interface{} `json:"power,omitempty"`
	RealMemory                *int64                 `json:"real_memory,omitempty"`           // Total memory in MB on the node
	Reason                    *string                `json:"reason,omitempty"`                // Describes why the node is in a "DOWN", "DRAINED", "DRAINING", "FAILING" or...
	ReasonChangedAt           time.Time              `json:"reason_changed_at,omitempty"`     // When the reason changed (UNIX timestamp) (UNIX timestamp or time string...
	ReasonSetByUser           *string                `json:"reason_set_by_user,omitempty"`    // User who set the reason
	ResCoresPerGPU            *int32                 `json:"res_cores_per_gpu,omitempty"`     // Number of CPU cores per GPU restricted to GPU jobs
	Reservation               *string                `json:"reservation,omitempty"`           // Name of reservation containing this node
	ResumeAfter               *uint64                `json:"resume_after,omitempty"`          // Number of seconds after the node's state is updated to "DOWN" or "DRAIN" before...
	SlurmdStartTime           time.Time              `json:"slurmd_start_time,omitempty"`     // Time when the slurmd started (UNIX timestamp) (UNIX timestamp or time string...
	Sockets                   *int32                 `json:"sockets,omitempty"`               // Number of physical processor sockets/chips on the node
	SpecializedCores          *int32                 `json:"specialized_cores,omitempty"`     // Number of cores reserved for system use
	SpecializedCPUs           *string                `json:"specialized_cpus,omitempty"`      // Abstract CPU IDs on this node reserved for exclusive use by slurmd and...
	SpecializedMemory         *int64                 `json:"specialized_memory,omitempty"`    // Combined memory limit, in MB, for Slurm compute node daemons
	State                     []NodeState            `json:"state,omitempty"`                 // Node state(s) applicable to this node
	TemporaryDisk             *int32                 `json:"temporary_disk,omitempty"`        // Total size in MB of temporary disk storage in TmpFS
	Threads                   *int32                 `json:"threads,omitempty"`               // Number of logical threads in a single physical core
	TLSCertLastRenewal        time.Time              `json:"tls_cert_last_renewal,omitempty"` // Time when TLS certificate was created (UNIX timestamp or time string recognized...
	Topology                  *string                `json:"topology,omitempty"`              // Topology
	TRES                      *string                `json:"tres,omitempty"`                  // Configured trackable resources
	TRESUsed                  *string                `json:"tres_used,omitempty"`             // Trackable resources currently allocated for jobs
	TRESWeighted              *float64               `json:"tres_weighted,omitempty"`         // Ignored. Was weighted number of billable trackable resources allocated
	Version                   *string                `json:"version,omitempty"`               // Slurmd version
	Weight                    *int32                 `json:"weight,omitempty"`                // Weight of the node for scheduling purposes
}

Node represents a SLURM Node.

type NodeAllocation

type NodeAllocation struct {
	Name        string    `json:"name"`
	JobId       int32     `json:"job_id,omitempty"`
	JobName     string    `json:"job_name,omitempty"`
	UserName    string    `json:"user_name,omitempty"`
	AllocCpus   int32     `json:"alloc_cpus"`
	AllocMemory int64     `json:"alloc_memory"`
	AllocGres   string    `json:"alloc_gres,omitempty"`
	StartTime   time.Time `json:"start_time,omitempty"`
	EndTime     time.Time `json:"end_time,omitempty"`
}

NodeAllocation represents the current allocation status of a node

type NodeCreateRequest

type NodeCreateRequest = NodeUpdate // Nodes are usually not created programmatically

type NodeEnergy

type NodeEnergy struct {
	AverageWatts           *int32  `json:"average_watts,omitempty"`            // Average power consumption, in watts
	BaseConsumedEnergy     *int64  `json:"base_consumed_energy,omitempty"`     // The energy consumed between when the node was powered on and the last time it...
	ConsumedEnergy         *int64  `json:"consumed_energy,omitempty"`          // The energy consumed between the last time the node was registered by the slurmd...
	CurrentWatts           *uint32 `json:"current_watts,omitempty"`            // The instantaneous power consumption at the time of the last node energy...
	LastCollected          *int64  `json:"last_collected,omitempty"`           // Time when energy data was last retrieved (UNIX timestamp) (UNIX timestamp or...
	PreviousConsumedEnergy *int64  `json:"previous_consumed_energy,omitempty"` // Previous value of consumed_energy
}

NodeEnergy represents a SLURM NodeEnergy.

type NodeEvent

type NodeEvent struct {
	// EventTime when the event occurred
	EventTime time.Time `json:"event_time"`
	// EventType type of event (state_change, drain, resume, etc.)
	EventType string `json:"event_type"`
	// NodeName of the node
	NodeName string `json:"node_name"`
	// PreviousState before the event
	PreviousState NodeState `json:"previous_state,omitempty"`
	// NewState after the event
	NewState NodeState `json:"new_state"`
	// Reason for the state change
	Reason string `json:"reason,omitempty"`
	// Partitions affected by the event
	Partitions []string `json:"partitions,omitempty"`
	// Node is the full node object (for watch events)
	Node *Node `json:"node,omitempty"`
}

NodeEvent represents a node state change event

type NodeList

type NodeList struct {
	Nodes []Node `json:"nodes"`
	Total int    `json:"total"`
}

NodeList represents a list of nodes

type NodeListOptions

type NodeListOptions struct {
	Names      []string    `json:"names,omitempty"`
	States     []NodeState `json:"states,omitempty"`
	Partitions []string    `json:"partitions,omitempty"`
	UpdateTime *time.Time  `json:"update_time,omitempty"`
	Reasons    []string    `json:"reasons,omitempty"`

	// Limit specifies the maximum number of nodes to return.
	// WARNING: Due to SLURM REST API limitations, this is CLIENT-SIDE pagination.
	// The full node list is fetched from the server, then sliced. For large clusters
	// (10K+ nodes), consider using filtering options (States, Partitions, Names, etc.)
	// to reduce the dataset before pagination.
	Limit int `json:"limit,omitempty"`

	// Offset specifies the number of nodes to skip before returning results.
	// WARNING: This is CLIENT-SIDE pagination - see Limit field documentation.
	Offset int `json:"offset,omitempty"`
}

NodeListOptions represents options for listing nodes

type NodeLiveMetrics

type NodeLiveMetrics struct {
	NodeName string  `json:"node_name"`
	CPUCores int     `json:"cpu_cores"`
	MemoryGB float64 `json:"memory_gb"`

	CPUUsage    *LiveResourceMetric `json:"cpu_usage"`
	MemoryUsage *LiveResourceMetric `json:"memory_usage"`
	LoadAverage []float64           `json:"load_average"`

	CPUTemperature   float64 `json:"cpu_temperature_celsius,omitempty"`
	PowerConsumption float64 `json:"power_consumption_watts,omitempty"`

	NetworkInRate  float64 `json:"network_in_rate_mbps,omitempty"`
	NetworkOutRate float64 `json:"network_out_rate_mbps,omitempty"`
	DiskReadRate   float64 `json:"disk_read_rate_mbps,omitempty"`
	DiskWriteRate  float64 `json:"disk_write_rate_mbps,omitempty"`
}

NodeLiveMetrics represents per-node live metrics.

type NodeMaintenanceRequest

type NodeMaintenanceRequest struct {
	Nodes         []string   `json:"nodes"`
	Reason        string     `json:"reason"`
	StartTime     *time.Time `json:"start_time,omitempty"`
	EndTime       *time.Time `json:"end_time,omitempty"`
	FixedDuration int32      `json:"fixed_duration,omitempty"`
}

NodeMaintenanceRequest represents a request to put nodes into maintenance

type NodeManager

type NodeManager interface {
	List(ctx context.Context, opts *ListNodesOptions) (*NodeList, error)
	Get(ctx context.Context, nodeName string) (*Node, error)
	Update(ctx context.Context, nodeName string, update *NodeUpdate) error
	Delete(ctx context.Context, nodeName string) error
	Drain(ctx context.Context, nodeName string, reason string) error
	Resume(ctx context.Context, nodeName string) error
	Watch(ctx context.Context, opts *WatchNodesOptions) (<-chan NodeEvent, error)
}

type NodePowerRequest

type NodePowerRequest struct {
	Nodes        []string       `json:"nodes"`
	PowerState   NodePowerState `json:"power_state"`
	Asynchronous bool           `json:"asynchronous,omitempty"`
	Force        bool           `json:"force,omitempty"`
}

NodePowerRequest represents a request to change node power state

type NodePowerState

type NodePowerState string

NodePowerState represents node power states

const (
	NodePowerDown NodePowerState = "POWER_DOWN"
	NodePowerUp   NodePowerState = "POWER_UP"
	NodePowerSave NodePowerState = "POWER_SAVE"
)

type NodeState

type NodeState string

NodeState represents possible values for NodeState field.

const (
	NodeStateInvalid         NodeState = "INVALID"
	NodeStateUnknown         NodeState = "UNKNOWN"
	NodeStateDown            NodeState = "DOWN"
	NodeStateIdle            NodeState = "IDLE"
	NodeStateAllocated       NodeState = "ALLOCATED"
	NodeStateError           NodeState = "ERROR"
	NodeStateMixed           NodeState = "MIXED"
	NodeStateFuture          NodeState = "FUTURE"
	NodeStateExternal        NodeState = "EXTERNAL"
	NodeStateReserved        NodeState = "RESERVED"
	NodeStateUndrain         NodeState = "UNDRAIN"
	NodeStateCloud           NodeState = "CLOUD"
	NodeStateResume          NodeState = "RESUME"
	NodeStateDrain           NodeState = "DRAIN"
	NodeStateCompleting      NodeState = "COMPLETING"
	NodeStateNotResponding   NodeState = "NOT_RESPONDING"
	NodeStatePoweredDown     NodeState = "POWERED_DOWN"
	NodeStateFail            NodeState = "FAIL"
	NodeStatePoweringUp      NodeState = "POWERING_UP"
	NodeStateMaintenance     NodeState = "MAINTENANCE"
	NodeStateRebootRequested NodeState = "REBOOT_REQUESTED"
	NodeStateRebootCanceled  NodeState = "REBOOT_CANCELED"
	NodeStatePoweringDown    NodeState = "POWERING_DOWN"
	NodeStateDynamicFuture   NodeState = "DYNAMIC_FUTURE"
	NodeStateRebootIssued    NodeState = "REBOOT_ISSUED"
	NodeStatePlanned         NodeState = "PLANNED"
	NodeStateInvalidReg      NodeState = "INVALID_REG"
	NodeStatePowerDown       NodeState = "POWER_DOWN"
	NodeStatePowerUp         NodeState = "POWER_UP"
	NodeStatePowerDrain      NodeState = "POWER_DRAIN"
	NodeStateDynamicNorm     NodeState = "DYNAMIC_NORM"
	NodeStateBlocked         NodeState = "BLOCKED"
)

NodeState constants.

type NodeUpdate

type NodeUpdate struct {
	Address     []string    `json:"address,omitempty"`      // NodeAddr, used to establish a communication path
	Comment     *string     `json:"comment,omitempty"`      // Arbitrary comment
	CPUBind     *int32      `json:"cpu_bind,omitempty"`     // Default method for binding tasks to allocated CPUs
	Extra       *string     `json:"extra,omitempty"`        // Arbitrary string used for node filtering if extra constraints are enabled
	Features    []string    `json:"features,omitempty"`     // Available features
	FeaturesAct []string    `json:"features_act,omitempty"` // Currently active features
	GRES        *string     `json:"gres,omitempty"`         // Generic resources
	Hostname    []string    `json:"hostname,omitempty"`     // NodeHostname
	Name        []string    `json:"name,omitempty"`         // NodeName
	Reason      *string     `json:"reason,omitempty"`       // Reason for node being DOWN or DRAINING
	ReasonUID   *string     `json:"reason_uid,omitempty"`   // User ID to associate with the reason (needed if user root is sending message)
	ResumeAfter *uint32     `json:"resume_after,omitempty"` // Number of seconds after which to automatically resume DOWN or DRAINED node (32...
	State       []NodeState `json:"state,omitempty"`        // New state to assign to the node
	TopologyStr *string     `json:"topology_str,omitempty"` // Topology
	Weight      *uint32     `json:"weight,omitempty"`       // Weight of the node for scheduling purposes (32 bit integer number with flags)
}

NodeUpdate represents a SLURM NodeUpdate.

type NodeUpdateRequest

type NodeUpdateRequest = NodeUpdate

NodeUpdateRequest is an alias for NodeUpdate

type NodeWatchEvent

type NodeWatchEvent = NodeEvent

type NodeWatchOptions

type NodeWatchOptions struct {
	// NodeNames is the list of specific nodes to watch (empty means all nodes)
	NodeNames []string `json:"node_names,omitempty"`
	// States to filter by (e.g., "idle", "allocated", "down")
	States []NodeState `json:"states,omitempty"`
	// Partitions to filter by
	Partitions []string `json:"partitions,omitempty"`
	// MaxEvents maximum number of events to return
	MaxEvents int32 `json:"max_events,omitempty"`
	// PollInterval is the interval between polling requests (default: 5s)
	PollInterval time.Duration `json:"poll_interval,omitempty"`
}

NodeWatchOptions represents options for watching node events

type OpenModeValue

type OpenModeValue string

OpenModeValue represents possible values for OpenMode field.

const (
	OpenModeAppend   OpenModeValue = "APPEND"
	OpenModeTruncate OpenModeValue = "TRUNCATE"
)

OpenModeValue constants.

type OptimalJobConfiguration

type OptimalJobConfiguration struct {
	RecommendedCPUs    int               `json:"recommended_cpus"`
	RecommendedMemory  int64             `json:"recommended_memory_bytes"`
	RecommendedNodes   int               `json:"recommended_nodes"`
	RecommendedRuntime int               `json:"recommended_runtime_minutes"`
	ExpectedSpeedup    float64           `json:"expected_speedup"`
	CostReduction      float64           `json:"cost_reduction_percent"`
	ConfigChanges      map[string]string `json:"config_changes,omitempty"`
}

OptimalJobConfiguration provides resource recommendations.

type OptimizationRecommendation

type OptimizationRecommendation struct {
	Resource    string                 `json:"resource"`    // Resource type (CPU, Memory, GPU, IO, Network)
	Type        string                 `json:"type"`        // Type of recommendation (reduction, increase, configuration, pattern)
	Current     interface{}            `json:"current"`     // Current value/configuration
	Recommended interface{}            `json:"recommended"` // Recommended value/configuration
	Reason      string                 `json:"reason"`      // Why this recommendation is made
	Impact      string                 `json:"impact"`      // Expected impact of the change
	Confidence  float64                `json:"confidence"`  // Confidence level (0-1)
	Details     map[string]interface{} `json:"details,omitempty"`
}

OptimizationRecommendation represents a specific optimization suggestion.

type OptimizationSuggestion

type OptimizationSuggestion struct {
	Type                        string  `json:"type"`
	Severity                    string  `json:"severity"`
	Description                 string  `json:"description"`
	ExpectedBenefit             string  `json:"expected_benefit"`
	ImplementationComplexity    string  `json:"implementation_complexity"`
	EstimatedImprovementPercent float64 `json:"estimated_improvement_percent"`
	ActionRequired              string  `json:"action_required"`
}

OptimizationSuggestion provides a specific optimization suggestion.

type Partition

type Partition struct {
	Accounts    *PartitionAccounts  `json:"accounts,omitempty"`
	Alternate   *string             `json:"alternate,omitempty"` // Alternate - Partition name of alternate partition to be used if the state of...
	Cluster     *string             `json:"cluster,omitempty"`   // Cluster name
	CPUs        *PartitionCPUs      `json:"cpus,omitempty"`
	Defaults    *PartitionDefaults  `json:"defaults,omitempty"`
	GraceTime   *int32              `json:"grace_time,omitempty"` // GraceTime - Grace time in seconds to be extended to a job which has been...
	Groups      *PartitionGroups    `json:"groups,omitempty"`
	Maximums    *PartitionMaximums  `json:"maximums,omitempty"`
	Minimums    *PartitionMinimums  `json:"minimums,omitempty"`
	Name        *string             `json:"name,omitempty"`      // PartitionName - Name by which the partition may be referenced
	NodeSets    *string             `json:"node_sets,omitempty"` // NodeSets - Comma-separated list of nodesets which are associated with this...
	Nodes       *PartitionNodes     `json:"nodes,omitempty"`
	Partition   *PartitionPartition `json:"partition,omitempty"`
	Priority    *PartitionPriority  `json:"priority,omitempty"`
	QoS         *PartitionQoS       `json:"qos,omitempty"`
	SelectType  []SelectTypeValue   `json:"select_type,omitempty"`  // Scheduler consumable resource selection type
	SuspendTime time.Time           `json:"suspend_time,omitempty"` // SuspendTime - Nodes which remain idle or down for this number of seconds will...
	Timeouts    *PartitionTimeouts  `json:"timeouts,omitempty"`
	Topology    *string             `json:"topology,omitempty"` // Topology - Name of the topology, defined in topology.yaml, used by jobs in this...
	TRES        *PartitionTRES      `json:"tres,omitempty"`
}

Partition represents a SLURM Partition.

type PartitionAccounts

type PartitionAccounts struct {
	Allowed *string `json:"allowed,omitempty"` // AllowAccounts - Comma-separated list of accounts which may execute jobs in the...
	Deny    *string `json:"deny,omitempty"`    // DenyAccounts - Comma-separated list of accounts which may not execute jobs in...
}

PartitionAccounts is a nested type within its parent.

type PartitionAnalysis

type PartitionAnalysis struct {
	PartitionName  string   `json:"partition_name"`
	JobCount       int      `json:"job_count"`
	Utilization    float64  `json:"utilization"`
	Efficiency     float64  `json:"efficiency"`
	TopUsers       []string `json:"top_users"`
	CommonJobTypes []string `json:"common_job_types"`
	Issues         []string `json:"issues"`
}

PartitionAnalysis provides partition-level analysis.

type PartitionCPUs

type PartitionCPUs struct {
	TaskBinding *int32 `json:"task_binding,omitempty"` // CpuBind - Default method controlling how tasks are bound to allocated resources
	Total       *int32 `json:"total,omitempty"`        // TotalCPUs - Number of CPUs available in this partition
}

PartitionCPUs is a nested type within its parent.

type PartitionCreate

type PartitionCreate struct {
	Name                 string            `json:"name"`
	AllocNodes           string            `json:"alloc_nodes,omitempty"`
	AllowAccounts        []string          `json:"allow_accounts,omitempty"`
	AllowAllocNodes      string            `json:"allow_alloc_nodes,omitempty"`
	AllowGroups          []string          `json:"allow_groups,omitempty"`
	AllowQoS             []string          `json:"allow_qos,omitempty"`
	DenyAccounts         []string          `json:"deny_accounts,omitempty"`
	DenyQoS              []string          `json:"deny_qos,omitempty"`
	DefaultMemPerCPU     int64             `json:"default_mem_per_cpu,omitempty"`
	DefaultMemPerNode    int64             `json:"default_mem_per_node,omitempty"`
	DefaultTime          int32             `json:"default_time,omitempty"`
	DefMemPerNode        int64             `json:"def_mem_per_node,omitempty"`
	GraceTime            int32             `json:"grace_time,omitempty"`
	MaxCPUsPerNode       int32             `json:"max_cpus_per_node,omitempty"`
	MaxMemPerNode        int64             `json:"max_mem_per_node,omitempty"`
	MaxMemPerCPU         int64             `json:"max_mem_per_cpu,omitempty"`
	MaxNodes             int32             `json:"max_nodes,omitempty"`
	MaxTime              int32             `json:"max_time,omitempty"`
	MinNodes             int32             `json:"min_nodes,omitempty"`
	Nodes                string            `json:"nodes,omitempty"`
	OverTimeLimit        int32             `json:"over_time_limit,omitempty"`
	PreemptMode          []string          `json:"preempt_mode,omitempty"`
	Priority             int32             `json:"priority,omitempty"`
	PriorityJobFactor    int32             `json:"priority_job_factor,omitempty"`
	PriorityTier         int32             `json:"priority_tier,omitempty"`
	QoS                  string            `json:"qos,omitempty"`
	State                PartitionState    `json:"state,omitempty"`
	TresStr              string            `json:"tres_str,omitempty"`
	BillingWeightStr     string            `json:"billing_weight_str,omitempty"`
	SelectTypeParameters []string          `json:"select_type_parameters,omitempty"`
	JobDefaults          map[string]string `json:"job_defaults,omitempty"`
	ResumeTimeout        int32             `json:"resume_timeout,omitempty"`
	SuspendTime          int32             `json:"suspend_time,omitempty"`
	SuspendTimeout       int32             `json:"suspend_timeout,omitempty"`
	Hidden               bool              `json:"hidden,omitempty"`
	ExclusiveUser        bool              `json:"exclusive_user,omitempty"`
	LLN                  bool              `json:"lln,omitempty"`
	RootOnly             bool              `json:"root_only,omitempty"`
	ReqResv              bool              `json:"req_resv,omitempty"`
	PowerDownOnIdle      bool              `json:"power_down_on_idle,omitempty"`
}

PartitionCreate represents the data needed to create a new partition

type PartitionCreateRequest

type PartitionCreateRequest = PartitionCreate

PartitionCreateRequest is an alias for PartitionCreate

type PartitionCreateResponse

type PartitionCreateResponse struct {
	PartitionName string `json:"partition_name"`
}

PartitionCreateResponse represents the response from partition creation

type PartitionDefaults

type PartitionDefaults struct {
	Job                    *string `json:"job,omitempty"`                       // JobDefaults - Comma-separated list of job default values (this field is only...
	MemoryPerCPU           *int64  `json:"memory_per_cpu,omitempty"`            // Raw value for DefMemPerCPU or DefMemPerNode
	PartitionMemoryPerCPU  *uint64 `json:"partition_memory_per_cpu,omitempty"`  // DefMemPerCPU - Default real memory size available per allocated CPU in...
	PartitionMemoryPerNode *uint64 `json:"partition_memory_per_node,omitempty"` // DefMemPerNode - Default real memory size available per allocated node in...
	Time                   *uint32 `json:"time,omitempty"`                      // DefaultTime - Run time limit in minutes used for jobs that don't specify a...
}

PartitionDefaults is a nested type within its parent.

type PartitionEvent

type PartitionEvent struct {
	// EventTime when the event occurred
	EventTime time.Time `json:"event_time"`
	// EventType type of event (state_change, create, delete, etc.)
	EventType string `json:"event_type"`
	// PartitionName of the partition
	PartitionName string `json:"partition_name"`
	// PreviousState before the event
	PreviousState PartitionState `json:"previous_state,omitempty"`
	// NewState after the event
	NewState PartitionState `json:"new_state"`
	// Reason for the state change
	Reason string `json:"reason,omitempty"`
	// Partition is the full partition object (for watch events)
	Partition *Partition `json:"partition,omitempty"`
}

PartitionEvent represents a partition state change event

type PartitionGroups

type PartitionGroups struct {
	Allowed *string `json:"allowed,omitempty"` // AllowGroups - Comma-separated list of group names which may execute jobs in...
}

PartitionGroups is a nested type within its parent.

type PartitionList

type PartitionList struct {
	Partitions []Partition `json:"partitions"`
	Total      int         `json:"total"`
}

PartitionList represents a list of partitions

type PartitionListOptions

type PartitionListOptions struct {
	Names      []string         `json:"names,omitempty"`
	States     []PartitionState `json:"states,omitempty"`
	UpdateTime *time.Time       `json:"update_time,omitempty"`

	// Limit specifies the maximum number of partitions to return.
	// WARNING: Due to SLURM REST API limitations, this is CLIENT-SIDE pagination.
	// The full partition list is fetched from the server, then sliced. Consider using
	// filtering options (Names, States) to reduce the dataset before pagination.
	Limit int `json:"limit,omitempty"`

	// Offset specifies the number of partitions to skip before returning results.
	// WARNING: This is CLIENT-SIDE pagination - see Limit field documentation.
	Offset int `json:"offset,omitempty"`
}

PartitionListOptions represents options for listing partitions

type PartitionManager

type PartitionManager interface {
	List(ctx context.Context, opts *ListPartitionsOptions) (*PartitionList, error)
	Get(ctx context.Context, partitionName string) (*Partition, error)
	Create(ctx context.Context, partition *PartitionCreate) (*PartitionCreateResponse, error)
	Update(ctx context.Context, partitionName string, update *PartitionUpdate) error
	Delete(ctx context.Context, partitionName string) error
	Watch(ctx context.Context, opts *WatchPartitionsOptions) (<-chan PartitionEvent, error)
}

type PartitionMaximums

type PartitionMaximums struct {
	CPUsPerNode            *uint32                         `json:"cpus_per_node,omitempty"`   // MaxCPUsPerNode - Maximum number of CPUs on any node available to all jobs from...
	CPUsPerSocket          *uint32                         `json:"cpus_per_socket,omitempty"` // MaxCPUsPerSocket - Maximum number of CPUs on any node available on the all jobs...
	MemoryPerCPU           *int64                          `json:"memory_per_cpu,omitempty"`  // Raw value for MaxMemPerCPU or MaxMemPerNode
	Nodes                  *uint32                         `json:"nodes,omitempty"`           // MaxNodes - Maximum count of nodes which may be allocated to any single job (32...
	OverTimeLimit          *uint16                         `json:"over_time_limit,omitempty"` // OverTimeLimit - Number of minutes by which a job can exceed its time limit...
	Oversubscribe          *PartitionMaximumsOversubscribe `json:"oversubscribe,omitempty"`
	PartitionMemoryPerCPU  *uint64                         `json:"partition_memory_per_cpu,omitempty"`  // MaxMemPerCPU - Maximum real memory size available per allocated CPU in...
	PartitionMemoryPerNode *uint64                         `json:"partition_memory_per_node,omitempty"` // MaxMemPerNode - Maximum real memory size available per allocated node in a job...
	Shares                 *int32                          `json:"shares,omitempty"`                    // OverSubscribe - Controls the ability of the partition to execute more than one...
	Time                   *uint32                         `json:"time,omitempty"`                      // MaxTime - Maximum run time limit for jobs (32 bit integer number with flags)
}

PartitionMaximums is a nested type within its parent.

type PartitionMaximumsOversubscribe

type PartitionMaximumsOversubscribe struct {
	Flags []PartitionMaximumsOversubscribeFlagsValue `json:"flags,omitempty"` // Flags applicable to the OverSubscribe setting
	Jobs  *int32                                     `json:"jobs,omitempty"`  // Maximum number of jobs allowed to oversubscribe resources
}

PartitionMaximumsOversubscribe is a nested type within its parent.

type PartitionMaximumsOversubscribeFlagsValue

type PartitionMaximumsOversubscribeFlagsValue string

PartitionMaximumsOversubscribeFlagsValue represents possible values for PartitionMaximumsOversubscribeFlags field.

const (
	PartitionMaximumsOversubscribeFlagsForce PartitionMaximumsOversubscribeFlagsValue = "force"
)

PartitionMaximumsOversubscribeFlagsValue constants.

type PartitionMinimums

type PartitionMinimums struct {
	Nodes *int32 `json:"nodes,omitempty"` // MinNodes - Minimum count of nodes which may be allocated to any single job
}

PartitionMinimums is a nested type within its parent.

type PartitionNodes

type PartitionNodes struct {
	AllowedAllocation *string `json:"allowed_allocation,omitempty"` // AllocNodes - Comma-separated list of nodes from which users can submit jobs in...
	Configured        *string `json:"configured,omitempty"`         // Nodes - Comma-separated list of nodes which are associated with this partition
	Total             *int32  `json:"total,omitempty"`              // TotalNodes - Number of nodes available in this partition
}

PartitionNodes is a nested type within its parent.

type PartitionPartition

type PartitionPartition struct {
	State []StateValue `json:"state,omitempty"` // Current state(s)
}

PartitionPartition is a nested type within its parent.

type PartitionPriority

type PartitionPriority struct {
	JobFactor *int32 `json:"job_factor,omitempty"` // PriorityJobFactor - Partition factor used by priority/multifactor plugin in...
	Tier      *int32 `json:"tier,omitempty"`       // PriorityTier - Controls the order in which the scheduler evaluates jobs from...
}

PartitionPriority is a nested type within its parent.

type PartitionQoS

type PartitionQoS struct {
	Allowed  *string `json:"allowed,omitempty"`  // AllowQOS - Comma-separated list of Qos which may execute jobs in the partition
	Assigned *string `json:"assigned,omitempty"` // QOS - QOS name containing limits that will apply to all jobs in this partition
	Deny     *string `json:"deny,omitempty"`     // DenyQOS - Comma-separated list of Qos which may not execute jobs in the...
}

PartitionQoS is a nested type within its parent.

type PartitionState

type PartitionState = StateValue

PartitionState is an alias for StateValue from generated partition types

const (
	PartitionStateUp       PartitionState = StateUp
	PartitionStateDown     PartitionState = StateDown
	PartitionStateDrain    PartitionState = StateDrain
	PartitionStateInactive PartitionState = StateInactive
)

PartitionState constants for backward compatibility

type PartitionStatistics

type PartitionStatistics struct {
	Name           string    `json:"name"`
	TotalNodes     int32     `json:"total_nodes"`
	AllocatedNodes int32     `json:"allocated_nodes"`
	IdleNodes      int32     `json:"idle_nodes"`
	DownNodes      int32     `json:"down_nodes"`
	TotalCPUs      int32     `json:"total_cpus"`
	AllocatedCPUs  int32     `json:"allocated_cpus"`
	IdleCPUs       int32     `json:"idle_cpus"`
	RunningJobs    int32     `json:"running_jobs"`
	PendingJobs    int32     `json:"pending_jobs"`
	SuspendedJobs  int32     `json:"suspended_jobs"`
	LastUpdateTime time.Time `json:"last_update_time"`
}

PartitionStatistics represents partition usage statistics

type PartitionTRES

type PartitionTRES struct {
	BillingWeights *string `json:"billing_weights,omitempty"` // TRESBillingWeights - Billing weights of each tracked TRES type that will be...
	Configured     *string `json:"configured,omitempty"`      // TRES - Number of each applicable TRES type available in this partition
}

PartitionTRES is a nested type within its parent.

type PartitionTimeouts

type PartitionTimeouts struct {
	Resume  *uint16 `json:"resume,omitempty"`  // ResumeTimeout - Resumed nodes which fail to respond in this time frame will be...
	Suspend *uint16 `json:"suspend,omitempty"` // SuspendTimeout - Maximum time permitted (in seconds) between when a node...
}

PartitionTimeouts is a nested type within its parent.

type PartitionTrend

type PartitionTrend struct {
	PartitionName string             `json:"partition_name"`
	Utilization   []UtilizationPoint `json:"utilization"`
	Efficiency    []EfficiencyPoint  `json:"efficiency"`
	JobCounts     []JobCountPoint    `json:"job_counts"`
	QueueLength   []QueueLengthPoint `json:"queue_length"`
}

PartitionTrend represents partition-specific trends.

type PartitionUpdate

type PartitionUpdate struct {
	AllocNodes           *string           `json:"alloc_nodes,omitempty"`
	AllowAccounts        []string          `json:"allow_accounts,omitempty"`
	AllowAllocNodes      *string           `json:"allow_alloc_nodes,omitempty"`
	AllowGroups          []string          `json:"allow_groups,omitempty"`
	AllowQoS             []string          `json:"allow_qos,omitempty"`
	DenyAccounts         []string          `json:"deny_accounts,omitempty"`
	DenyQoS              []string          `json:"deny_qos,omitempty"`
	DefaultMemPerCPU     *int64            `json:"default_mem_per_cpu,omitempty"`
	DefaultMemPerNode    *int64            `json:"default_mem_per_node,omitempty"`
	DefaultTime          *int32            `json:"default_time,omitempty"`
	DefMemPerNode        *int64            `json:"def_mem_per_node,omitempty"`
	GraceTime            *int32            `json:"grace_time,omitempty"`
	MaxCPUsPerNode       *int32            `json:"max_cpus_per_node,omitempty"`
	MaxMemPerNode        *int64            `json:"max_mem_per_node,omitempty"`
	MaxMemPerCPU         *int64            `json:"max_mem_per_cpu,omitempty"`
	MaxNodes             *int32            `json:"max_nodes,omitempty"`
	MaxTime              *int32            `json:"max_time,omitempty"`
	MinNodes             *int32            `json:"min_nodes,omitempty"`
	Nodes                *string           `json:"nodes,omitempty"`
	OverTimeLimit        *int32            `json:"over_time_limit,omitempty"`
	PreemptMode          []string          `json:"preempt_mode,omitempty"`
	Priority             *int32            `json:"priority,omitempty"`
	PriorityJobFactor    *int32            `json:"priority_job_factor,omitempty"`
	PriorityTier         *int32            `json:"priority_tier,omitempty"`
	QoS                  *string           `json:"qos,omitempty"`
	State                *PartitionState   `json:"state,omitempty"`
	TresStr              *string           `json:"tres_str,omitempty"`
	BillingWeightStr     *string           `json:"billing_weight_str,omitempty"`
	SelectTypeParameters []string          `json:"select_type_parameters,omitempty"`
	JobDefaults          map[string]string `json:"job_defaults,omitempty"`
	ResumeTimeout        *int32            `json:"resume_timeout,omitempty"`
	SuspendTime          *int32            `json:"suspend_time,omitempty"`
	SuspendTimeout       *int32            `json:"suspend_timeout,omitempty"`
	Hidden               *bool             `json:"hidden,omitempty"`
	ExclusiveUser        *bool             `json:"exclusive_user,omitempty"`
	LLN                  *bool             `json:"lln,omitempty"`
	RootOnly             *bool             `json:"root_only,omitempty"`
	ReqResv              *bool             `json:"req_resv,omitempty"`
	PowerDownOnIdle      *bool             `json:"power_down_on_idle,omitempty"`
}

PartitionUpdate represents the data needed to update a partition

type PartitionUpdateRequest

type PartitionUpdateRequest = PartitionUpdate

type PerformanceAlert

type PerformanceAlert struct {
	Type              string    `json:"type"`
	Category          string    `json:"category"`
	Message           string    `json:"message"`
	Severity          string    `json:"severity"`
	Timestamp         time.Time `json:"timestamp"`
	NodeName          string    `json:"node_name,omitempty"`
	ResourceName      string    `json:"resource_name,omitempty"`
	CurrentValue      float64   `json:"current_value,omitempty"`
	ThresholdValue    float64   `json:"threshold_value,omitempty"`
	RecommendedAction string    `json:"recommended_action,omitempty"`
}

PerformanceAlert represents a performance alert.

type PerformanceAnomaly

type PerformanceAnomaly struct {
	Timestamp   time.Time `json:"timestamp"`
	Type        string    `json:"type"`
	Metric      string    `json:"metric"`
	Severity    string    `json:"severity"`
	Value       float64   `json:"value"`
	Expected    float64   `json:"expected"`
	Deviation   float64   `json:"deviation_percent"`
	Description string    `json:"description"`
}

PerformanceAnomaly represents a detected performance anomaly.

type PerformanceBottleneck

type PerformanceBottleneck struct {
	Type          string        `json:"type"`
	Resource      string        `json:"resource"`
	Severity      string        `json:"severity"`
	Description   string        `json:"description"`
	Impact        string        `json:"impact"`
	TimeDetected  time.Time     `json:"time_detected"`
	Duration      time.Duration `json:"duration"`
	AffectedNodes []string      `json:"affected_nodes,omitempty"`
}

PerformanceBottleneck identifies a resource bottleneck.

type PerformanceHistoryOptions

type PerformanceHistoryOptions struct {
	StartTime     *time.Time `json:"start_time,omitempty"`
	EndTime       *time.Time `json:"end_time,omitempty"`
	Interval      string     `json:"interval,omitempty"`
	MetricTypes   []string   `json:"metric_types,omitempty"`
	IncludeSteps  bool       `json:"include_steps"`
	IncludeTrends bool       `json:"include_trends"`
}

PerformanceHistoryOptions configures performance history queries.

type PerformanceSnapshot

type PerformanceSnapshot struct {
	Timestamp         time.Time `json:"timestamp"`
	CPUUtilization    float64   `json:"cpu_utilization"`
	MemoryUtilization float64   `json:"memory_utilization"`
	IOBandwidth       float64   `json:"io_bandwidth_mbps"`
	GPUUtilization    float64   `json:"gpu_utilization,omitempty"`
	NetworkBandwidth  float64   `json:"network_bandwidth_mbps,omitempty"`
	PowerUsage        float64   `json:"power_usage_watts,omitempty"`
	Efficiency        float64   `json:"efficiency_score"`
}

PerformanceSnapshot represents a point-in-time snapshot.

type PerformanceStatistics

type PerformanceStatistics struct {
	// CPU statistics
	AverageCPU float64 `json:"average_cpu"`
	PeakCPU    float64 `json:"peak_cpu"`
	MinCPU     float64 `json:"min_cpu"`
	StdDevCPU  float64 `json:"stddev_cpu"`

	// Memory statistics
	AverageMemory float64 `json:"average_memory"`
	PeakMemory    float64 `json:"peak_memory"`
	MinMemory     float64 `json:"min_memory"`
	StdDevMemory  float64 `json:"stddev_memory"`

	// IO statistics
	AverageIO float64 `json:"average_io"`
	PeakIO    float64 `json:"peak_io"`
	MinIO     float64 `json:"min_io"`
	StdDevIO  float64 `json:"stddev_io"`

	// Efficiency statistics
	AverageEfficiency float64 `json:"average_efficiency"`
	MedianEfficiency  float64 `json:"median_efficiency"`
	StdDevEfficiency  float64 `json:"stddev_efficiency"`
	BestEfficiency    float64 `json:"best_efficiency"`
	WorstEfficiency   float64 `json:"worst_efficiency"`

	// Runtime statistics
	AverageRuntime time.Duration `json:"average_runtime"`
	MedianRuntime  time.Duration `json:"median_runtime"`

	// Recommendations
	OptimalResources ResourceRecommendation `json:"optimal_resources"`
}

PerformanceStatistics contains aggregated performance statistics.

type PerformanceTrendAnalysis

type PerformanceTrendAnalysis struct {
	CPUTrend        TrendInfo `json:"cpu_trend"`
	MemoryTrend     TrendInfo `json:"memory_trend"`
	IOTrend         TrendInfo `json:"io_trend"`
	EfficiencyTrend TrendInfo `json:"efficiency_trend"`

	PredictedCPU     float64       `json:"predicted_cpu"`
	PredictedMemory  float64       `json:"predicted_memory"`
	PredictedRuntime time.Duration `json:"predicted_runtime"`
}

PerformanceTrendAnalysis provides trend analysis. (Note: truncated to PerformanceTrendAnalysis to match interface)

type PerformanceTrends

type PerformanceTrends struct {
	TimeRange   TimeRange `json:"time_range"`
	Granularity string    `json:"granularity"`

	ClusterUtilization []UtilizationPoint `json:"cluster_utilization"`
	ClusterEfficiency  []EfficiencyPoint  `json:"cluster_efficiency"`

	PartitionTrends map[string]*PartitionTrend `json:"partition_trends"`

	CPUTrends    ResourceTrend `json:"cpu_trends"`
	MemoryTrends ResourceTrend `json:"memory_trends"`
	GPUTrends    ResourceTrend `json:"gpu_trends"`

	JobSizeTrends     []JobSizeTrend     `json:"job_size_trends"`
	JobDurationTrends []JobDurationTrend `json:"job_duration_trends"`

	Insights []TrendInsight `json:"insights"`
}

PerformanceTrends represents cluster-wide performance trends.

type PingResponse

type PingResponse struct {
	Status    string                 `json:"status"`
	Message   string                 `json:"message,omitempty"`
	Latency   int64                  `json:"latency,omitempty"` // in microseconds
	Timestamp time.Time              `json:"timestamp"`
	Meta      map[string]interface{} `json:"meta,omitempty"`
}

PingResponse represents the response from a database ping operation

type PriorityWeights

type PriorityWeights struct {
	Age       int `json:"age"`
	FairShare int `json:"fair_share"`
	JobSize   int `json:"job_size"`
	Partition int `json:"partition"`
	QoS       int `json:"qos"`
	TRES      int `json:"tres"`
	Site      int `json:"site"`
	Nice      int `json:"nice"`
	Assoc     int `json:"assoc"`
}

PriorityWeights represents priority weight configuration.

type ProcessInfo

type ProcessInfo struct {
	PID           int           `json:"pid"`
	PPID          int           `json:"ppid"`
	Command       string        `json:"command"`
	CPUPercent    float64       `json:"cpu_percent"`
	MemoryPercent float64       `json:"memory_percent"`
	RSS           int64         `json:"rss"`
	VMS           int64         `json:"vms"`
	Status        string        `json:"status"`
	StartTime     time.Time     `json:"start_time"`
	Children      []ProcessInfo `json:"children,omitempty"`
}

ProcessInfo represents a process in the process tree.

type ProfileValue

type ProfileValue string

ProfileValue represents possible values for Profile field.

const (
	ProfileNotSet  ProfileValue = "NOT_SET"
	ProfileNone    ProfileValue = "NONE"
	ProfileEnergy  ProfileValue = "ENERGY"
	ProfileLustre  ProfileValue = "LUSTRE"
	ProfileNetwork ProfileValue = "NETWORK"
	ProfileTask    ProfileValue = "TASK"
)

ProfileValue constants.

type QoS

type QoS struct {
	Description    *string         `json:"description,omitempty"` // Arbitrary description
	Flags          []QoSFlagsValue `json:"flags,omitempty"`       // Flags, to avoid modifying current values specify NOT_SET
	ID             *int32          `json:"id,omitempty"`          // Unique ID
	Limits         *QoSLimits      `json:"limits,omitempty"`
	Name           *string         `json:"name,omitempty"` // Name
	Preempt        *QoSPreempt     `json:"preempt,omitempty"`
	Priority       *uint32         `json:"priority,omitempty"`        // Priority - QOS priority factor (32 bit integer number with flags)
	UsageFactor    *float64        `json:"usage_factor,omitempty"`    // UsageFactor - A float that is factored into a job's TRES usage (64 bit floating...
	UsageThreshold *float64        `json:"usage_threshold,omitempty"` // UsageThreshold - A float representing the lowest fairshare of an association...
}

QoS represents a SLURM QoS.

type QoSCreate

type QoSCreate struct {
	Name              string
	Description       string
	Priority          int
	Flags             []string
	PreemptMode       []string
	PreemptList       []string
	PreemptExemptTime *int
	GraceTime         int // Changed to non-pointer for validation
	UsageFactor       float64
	UsageThreshold    float64
	ParentQoS         string
	MaxTRESPerUser    string
	MaxTRESPerAccount string
	MaxTRESPerJob     string
	Limits            *QoSLimits
}

QoSCreate represents the data needed to create a new QoS

type QoSCreateRequest

type QoSCreateRequest = QoSCreate

Additional request types

type QoSCreateResponse

type QoSCreateResponse struct {
	QoSName string
}

QoSCreateResponse represents the response from creating a QoS

type QoSFlagsValue

type QoSFlagsValue string

QoSFlagsValue represents possible values for QoSFlags field.

const (
	QoSFlagsNotSet                QoSFlagsValue = "NOT_SET"
	QoSFlagsAdd                   QoSFlagsValue = "ADD"
	QoSFlagsRemove                QoSFlagsValue = "REMOVE"
	QoSFlagsDeleted               QoSFlagsValue = "DELETED"
	QoSFlagsPartitionMinimumNode  QoSFlagsValue = "PARTITION_MINIMUM_NODE"
	QoSFlagsPartitionMaximumNode  QoSFlagsValue = "PARTITION_MAXIMUM_NODE"
	QoSFlagsPartitionTimeLimit    QoSFlagsValue = "PARTITION_TIME_LIMIT"
	QoSFlagsEnforceUsageThreshold QoSFlagsValue = "ENFORCE_USAGE_THRESHOLD"
	QoSFlagsNoReserve             QoSFlagsValue = "NO_RESERVE"
	QoSFlagsRequiredReservation   QoSFlagsValue = "REQUIRED_RESERVATION"
	QoSFlagsDenyLimit             QoSFlagsValue = "DENY_LIMIT"
	QoSFlagsOverridePartitionQoS  QoSFlagsValue = "OVERRIDE_PARTITION_QOS"
	QoSFlagsPartitionQoS          QoSFlagsValue = "PARTITION_QOS"
	QoSFlagsNoDecay               QoSFlagsValue = "NO_DECAY"
	QoSFlagsUsageFactorSafe       QoSFlagsValue = "USAGE_FACTOR_SAFE"
	QoSFlagsRelative              QoSFlagsValue = "RELATIVE"
)

QoSFlagsValue constants.

type QoSLimits

type QoSLimits struct {
	Factor    *float64      `json:"factor,omitempty"`     // LimitFactor - A float that is factored into an association's [Grp|Max]TRES...
	GraceTime *int32        `json:"grace_time,omitempty"` // GraceTime - Preemption grace time in seconds to be extended to a job which has...
	Max       *QoSLimitsMax `json:"max,omitempty"`
	Min       *QoSLimitsMin `json:"min,omitempty"`
}

QoSLimits is a nested type within its parent.

type QoSLimitsMax

type QoSLimitsMax struct {
	Accruing   *QoSLimitsMaxAccruing   `json:"accruing,omitempty"`
	ActiveJobs *QoSLimitsMaxActiveJobs `json:"active_jobs,omitempty"`
	Jobs       *QoSLimitsMaxJobs       `json:"jobs,omitempty"`
	TRES       *QoSLimitsMaxTRES       `json:"tres,omitempty"`
	WallClock  *QoSLimitsMaxWallClock  `json:"wall_clock,omitempty"`
}

QoSLimitsMax is a nested type within its parent.

type QoSLimitsMaxAccruing

type QoSLimitsMaxAccruing struct {
	Per *QoSLimitsMaxAccruingPer `json:"per,omitempty"`
}

QoSLimitsMaxAccruing is a nested type within its parent.

type QoSLimitsMaxAccruingPer

type QoSLimitsMaxAccruingPer struct {
	Account *uint32 `json:"account,omitempty"` // MaxJobsAccruePerAccount - Maximum number of pending jobs an account (or...
	User    *uint32 `json:"user,omitempty"`    // MaxJobsAccruePerUser - Maximum number of pending jobs a user can have accruing...
}

QoSLimitsMaxAccruingPer is a nested type within its parent.

type QoSLimitsMaxActiveJobs

type QoSLimitsMaxActiveJobs struct {
	Accruing *uint32 `json:"accruing,omitempty"` // GrpJobsAccrue - Maximum number of pending jobs able to accrue age priority (32...
	Count    *uint32 `json:"count,omitempty"`    // GrpJobs - Maximum number of running jobs (32 bit integer number with flags)
}

QoSLimitsMaxActiveJobs is a nested type within its parent.

type QoSLimitsMaxJobs

type QoSLimitsMaxJobs struct {
	ActiveJobs *QoSLimitsMaxJobsActiveJobs `json:"active_jobs,omitempty"`
	Count      *uint32                     `json:"count,omitempty"` // GrpSubmitJobs - Maximum number of jobs in a pending or running state at any...
	Per        *QoSLimitsMaxJobsPer        `json:"per,omitempty"`
}

QoSLimitsMaxJobs is a nested type within its parent.

type QoSLimitsMaxJobsActiveJobs

type QoSLimitsMaxJobsActiveJobs struct {
	Per *QoSLimitsMaxJobsActiveJobsPer `json:"per,omitempty"`
}

QoSLimitsMaxJobsActiveJobs is a nested type within its parent.

type QoSLimitsMaxJobsActiveJobsPer

type QoSLimitsMaxJobsActiveJobsPer struct {
	Account *uint32 `json:"account,omitempty"` // MaxJobsPerAccount - Maximum number of running jobs per account (32 bit integer...
	User    *uint32 `json:"user,omitempty"`    // MaxJobsPerUser - Maximum number of running jobs per user (32 bit integer number...
}

QoSLimitsMaxJobsActiveJobsPer is a nested type within its parent.

type QoSLimitsMaxJobsPer

type QoSLimitsMaxJobsPer struct {
	Account *uint32 `json:"account,omitempty"` // MaxSubmitJobsPerAccount - Maximum number of jobs in a pending or running state...
	User    *uint32 `json:"user,omitempty"`    // MaxSubmitJobsPerUser - Maximum number of jobs in a pending or running state per...
}

QoSLimitsMaxJobsPer is a nested type within its parent.

type QoSLimitsMaxTRES

type QoSLimitsMaxTRES struct {
	Minutes *QoSLimitsMaxTRESMinutes `json:"minutes,omitempty"`
	Per     *QoSLimitsMaxTRESPer     `json:"per,omitempty"`
	Total   []TRES                   `json:"total,omitempty"` // GrpTRES - Maximum number of TRES able to be allocated by running jobs
}

QoSLimitsMaxTRES is a nested type within its parent.

type QoSLimitsMaxTRESMinutes

type QoSLimitsMaxTRESMinutes struct {
	Per   *QoSLimitsMaxTRESMinutesPer `json:"per,omitempty"`
	Total []TRES                      `json:"total,omitempty"` // GrpTRESMins - Maximum number of TRES minutes that can possibly be used by past,...
}

QoSLimitsMaxTRESMinutes is a nested type within its parent.

type QoSLimitsMaxTRESMinutesPer

type QoSLimitsMaxTRESMinutesPer struct {
	Account []TRES `json:"account,omitempty"` // MaxTRESRunMinsPerAccount - Maximum number of TRES minutes each account can use
	Job     []TRES `json:"job,omitempty"`     // MaxTRESMinsPerJob - Maximum number of TRES minutes each job can use
	QoS     []TRES `json:"qos,omitempty"`     // GrpTRESRunMins - Maximum number of TRES minutes able to be allocated by running...
	User    []TRES `json:"user,omitempty"`    // MaxTRESRunMinsPerUser - Maximum number of TRES minutes each user can use
}

QoSLimitsMaxTRESMinutesPer is a nested type within its parent.

type QoSLimitsMaxTRESPer

type QoSLimitsMaxTRESPer struct {
	Account []TRES `json:"account,omitempty"` // MaxTRESPerAccount - Maximum number of TRES each account can use
	Job     []TRES `json:"job,omitempty"`     // MaxTRESPerJob - Maximum number of TRES each job can use
	Node    []TRES `json:"node,omitempty"`    // MaxTRESPerNode - Maximum number of TRES each node in a job allocation can use
	User    []TRES `json:"user,omitempty"`    // MaxTRESPerUser - Maximum number of TRES each user can use
}

QoSLimitsMaxTRESPer is a nested type within its parent.

type QoSLimitsMaxWallClock

type QoSLimitsMaxWallClock struct {
	Per *QoSLimitsMaxWallClockPer `json:"per,omitempty"`
}

QoSLimitsMaxWallClock is a nested type within its parent.

type QoSLimitsMaxWallClockPer

type QoSLimitsMaxWallClockPer struct {
	Job *uint32 `json:"job,omitempty"` // MaxWallDurationPerJob - Maximum wall clock time in minutes each job can use (32...
	QoS *uint32 `json:"qos,omitempty"` // GrpWall - Maximum wall clock time in minutes able to be allocated by running...
}

QoSLimitsMaxWallClockPer is a nested type within its parent.

type QoSLimitsMin

type QoSLimitsMin struct {
	PriorityThreshold *uint32           `json:"priority_threshold,omitempty"` // MinPrioThreshold - Minimum priority required to reserve resources when...
	TRES              *QoSLimitsMinTRES `json:"tres,omitempty"`
}

QoSLimitsMin is a nested type within its parent.

type QoSLimitsMinTRES

type QoSLimitsMinTRES struct {
	Per *QoSLimitsMinTRESPer `json:"per,omitempty"`
}

QoSLimitsMinTRES is a nested type within its parent.

type QoSLimitsMinTRESPer

type QoSLimitsMinTRESPer struct {
	Job []TRES `json:"job,omitempty"` // MinTRESPerJob - Minimum number of TRES each job running under this QOS must...
}

QoSLimitsMinTRESPer is a nested type within its parent.

type QoSList

type QoSList struct {
	QoS   []QoS
	Total int
}

QoSList represents a list of QoS entries

type QoSListOptions

type QoSListOptions struct {
	Names    []string
	Accounts []string
	Users    []string

	// Limit specifies the maximum number of QoS entries to return.
	// WARNING: Due to SLURM REST API limitations, this is CLIENT-SIDE pagination.
	// The full QoS list is fetched from the server, then sliced. Consider using
	// filtering options (Names, Accounts, Users) to reduce the dataset before pagination.
	Limit int

	// Offset specifies the number of QoS entries to skip before returning results.
	// WARNING: This is CLIENT-SIDE pagination - see Limit field documentation.
	Offset int
}

QoSListOptions represents options for listing QoS entries

type QoSManager

type QoSManager interface {
	List(ctx context.Context, opts *ListQoSOptions) (*QoSList, error)
	Get(ctx context.Context, qosName string) (*QoS, error)
	Create(ctx context.Context, qos *QoSCreate) (*QoSCreateResponse, error)
	Update(ctx context.Context, qosName string, update *QoSUpdate) error
	Delete(ctx context.Context, qosName string) error
}

type QoSPreempt

type QoSPreempt struct {
	ExemptTime *uint32     `json:"exempt_time,omitempty"` // PreemptExemptTime - Specifies a minimum run time for jobs before they are...
	List       []string    `json:"list,omitempty"`        // Other QOS's this QOS can preempt
	Mode       []ModeValue `json:"mode,omitempty"`        // PreemptMode - Mechanism used to preempt jobs or enable gang scheduling
}

QoSPreempt is a nested type within its parent.

type QoSUpdate

type QoSUpdate struct {
	Description       *string
	Priority          *int
	Flags             *[]string
	PreemptMode       *[]string
	PreemptList       []string
	PreemptExemptTime *int
	GraceTime         *int
	UsageFactor       *float64
	UsageThreshold    *float64
	ParentQoS         *string
	MaxTRESPerUser    *string
	MaxTRESPerAccount *string
	MaxTRESPerJob     *string
	Limits            *QoSLimits
}

QoSUpdate represents fields that can be updated on a QoS

type QoSUpdateRequest

type QoSUpdateRequest = QoSUpdate

type QueueLengthPoint

type QueueLengthPoint struct {
	Timestamp   time.Time     `json:"timestamp"`
	QueueLength int           `json:"queue_length"`
	WaitTime    time.Duration `json:"average_wait_time"`
}

QueueLengthPoint represents queue length data.

type ReconfigureResponse

type ReconfigureResponse struct {
	Status   string                 `json:"status"`
	Message  string                 `json:"message,omitempty"`
	Changes  []string               `json:"changes,omitempty"`
	Warnings []string               `json:"warnings,omitempty"`
	Errors   []string               `json:"errors,omitempty"`
	Meta     map[string]interface{} `json:"meta,omitempty"`
}

ReconfigureResponse represents the response from a reconfigure operation

type ReportOptions

type ReportOptions struct {
	ReportType    string    `json:"report_type"`
	TimeRange     TimeRange `json:"time_range"`
	Partitions    []string  `json:"partitions,omitempty"`
	Users         []string  `json:"users,omitempty"`
	IncludeCharts bool      `json:"include_charts"`
	Format        string    `json:"format"`
}

ReportOptions configures efficiency report generation.

type ReportRecommendation

type ReportRecommendation struct {
	Category         string   `json:"category"`
	Priority         string   `json:"priority"`
	Title            string   `json:"title"`
	Description      string   `json:"description"`
	ExpectedImpact   string   `json:"expected_impact"`
	AffectedEntities []string `json:"affected_entities"`
	Implementation   string   `json:"implementation_guidance"`
}

ReportRecommendation provides a report recommendation.

type ReportTrendAnalysis

type ReportTrendAnalysis struct {
	EfficiencyTrend     TrendInfo `json:"efficiency_trend"`
	UtilizationTrend    TrendInfo `json:"utilization_trend"`
	JobVolumeTrend      TrendInfo `json:"job_volume_trend"`
	PredictedEfficiency float64   `json:"predicted_efficiency_next_period"`
}

ReportTrendAnalysis provides trend analysis for reports.

type Reservation

type Reservation struct {
	Accounts            *string                    `json:"accounts,omitempty"`             // Comma-separated list of permitted accounts
	BurstBuffer         *string                    `json:"burst_buffer,omitempty"`         // BurstBuffer - Burst buffer resources reserved
	CoreCount           *int32                     `json:"core_count,omitempty"`           // CoreCnt - Number of cores reserved
	CoreSpecializations []ReservationCoreSpec      `json:"core_specializations,omitempty"` // Reserved cores specification
	EndTime             time.Time                  `json:"end_time,omitempty"`             // EndTime (UNIX timestamp) (UNIX timestamp or time string recognized by Slurm...
	Features            *string                    `json:"features,omitempty"`             // Features - Expression describing the reservation's required node features
	Flags               []ReservationFlagsValue    `json:"flags,omitempty"`                // Flags associated with this reservation
	Groups              *string                    `json:"groups,omitempty"`               // Groups - Comma-separated list of permitted groups
	Licenses            *string                    `json:"licenses,omitempty"`             // Licenses - Comma-separated list of licenses reserved
	MaxStartDelay       *int32                     `json:"max_start_delay,omitempty"`      // MaxStartDelay - Maximum time an eligible job not requesting this reservation...
	Name                *string                    `json:"name,omitempty"`                 // ReservationName - Name of the reservation
	NodeCount           *int32                     `json:"node_count,omitempty"`           // NodeCnt - Number of nodes reserved
	NodeList            *string                    `json:"node_list,omitempty"`            // Nodes - Comma-separated list of node names and/or node ranges reserved
	Partition           *string                    `json:"partition,omitempty"`            // PartitionName - Partition used to reserve nodes from
	PurgeCompleted      *ReservationPurgeCompleted `json:"purge_completed,omitempty"`
	StartTime           time.Time                  `json:"start_time,omitempty"` // StartTime (UNIX timestamp) (UNIX timestamp or time string recognized by Slurm...
	TRES                *string                    `json:"tres,omitempty"`       // Comma-separated list of required TRES
	Users               *string                    `json:"users,omitempty"`      // Comma-separated list of permitted users
	Watts               *uint32                    `json:"watts,omitempty"`      // 32 bit integer number with flags
}

Reservation represents a SLURM Reservation.

type ReservationCoreSpec

type ReservationCoreSpec struct {
	Core *string `json:"core,omitempty"` // IDs of reserved cores
	Node *string `json:"node,omitempty"` // Name of reserved node
}

ReservationCoreSpec represents a SLURM ReservationCoreSpec.

type ReservationCreate

type ReservationCreate struct {
	Accounts       []string                         `json:"accounts,omitempty"`        // List of permitted accounts
	BurstBuffer    *string                          `json:"burst_buffer,omitempty"`    // BurstBuffer
	Comment        *string                          `json:"comment,omitempty"`         // Arbitrary string
	CoreCount      *uint32                          `json:"core_count,omitempty"`      // Number of cores to reserve (32 bit integer number with flags)
	Duration       *uint32                          `json:"duration,omitempty"`        // The length of a reservation in minutes (32 bit integer number with flags)
	EndTime        time.Time                        `json:"end_time,omitempty"`        // EndTime (UNIX timestamp) (UNIX timestamp or time string recognized by Slurm...
	Features       *string                          `json:"features,omitempty"`        // Requested node features. Multiple values may be "&" separated if all features...
	Flags          []FlagsValue                     `json:"flags,omitempty"`           // Flags associated with this reservation. Note, to remove flags use "NO_"...
	Groups         []string                         `json:"groups,omitempty"`          // List of groups permitted to use the reservation. This is mutually exclusive...
	Licenses       []string                         `json:"licenses,omitempty"`        // List of license names
	MaxStartDelay  *uint32                          `json:"max_start_delay,omitempty"` // MaxStartDelay in seconds (32 bit integer number with flags)
	Name           *string                          `json:"name,omitempty"`            // ReservationName
	NodeCount      *uint32                          `json:"node_count,omitempty"`      // NodeCnt (32 bit integer number with flags)
	NodeList       []string                         `json:"node_list,omitempty"`       // The nodes to be reserved. Multiple node names may be specified using simple...
	Partition      *string                          `json:"partition,omitempty"`       // Partition used to reserve nodes from. This will attempt to allocate all nodes...
	PurgeCompleted *ReservationCreatePurgeCompleted `json:"purge_completed,omitempty"`
	StartTime      time.Time                        `json:"start_time,omitempty"` // StartTime (UNIX timestamp) (UNIX timestamp or time string recognized by Slurm...
	TRES           []TRES                           `json:"tres,omitempty"`       // List of trackable resources
	Users          []string                         `json:"users,omitempty"`      // List of permitted users
}

ReservationCreate represents a SLURM ReservationCreate.

type ReservationCreatePurgeCompleted

type ReservationCreatePurgeCompleted struct {
	Time *uint32 `json:"time,omitempty"` // If PURGE_COMP flag is set, the number of seconds this reservation will sit idle...
}

ReservationCreatePurgeCompleted is a nested type within its parent.

type ReservationCreateRequest

type ReservationCreateRequest = ReservationCreate

type ReservationCreateResponse

type ReservationCreateResponse struct {
	ReservationName string `json:"reservation_name"`
}

ReservationCreateResponse represents the response from reservation creation

type ReservationFlag

type ReservationFlag = ReservationFlagsValue

ReservationFlag alias for generated ReservationFlagsValue

type ReservationFlagsValue

type ReservationFlagsValue string

ReservationFlagsValue represents possible values for ReservationFlags field.

const (
	ReservationFlagsMaint              ReservationFlagsValue = "MAINT"
	ReservationFlagsNoMaint            ReservationFlagsValue = "NO_MAINT"
	ReservationFlagsDaily              ReservationFlagsValue = "DAILY"
	ReservationFlagsNoDaily            ReservationFlagsValue = "NO_DAILY"
	ReservationFlagsWeekly             ReservationFlagsValue = "WEEKLY"
	ReservationFlagsNoWeekly           ReservationFlagsValue = "NO_WEEKLY"
	ReservationFlagsIgnoreJobs         ReservationFlagsValue = "IGNORE_JOBS"
	ReservationFlagsNoIgnoreJobs       ReservationFlagsValue = "NO_IGNORE_JOBS"
	ReservationFlagsAnyNodes           ReservationFlagsValue = "ANY_NODES"
	ReservationFlagsNoAnyNodes         ReservationFlagsValue = "NO_ANY_NODES"
	ReservationFlagsStatic             ReservationFlagsValue = "STATIC"
	ReservationFlagsNoStatic           ReservationFlagsValue = "NO_STATIC"
	ReservationFlagsPartNodes          ReservationFlagsValue = "PART_NODES"
	ReservationFlagsNoPartNodes        ReservationFlagsValue = "NO_PART_NODES"
	ReservationFlagsOverlap            ReservationFlagsValue = "OVERLAP"
	ReservationFlagsSpecNodes          ReservationFlagsValue = "SPEC_NODES"
	ReservationFlagsTimeFloat          ReservationFlagsValue = "TIME_FLOAT"
	ReservationFlagsReplace            ReservationFlagsValue = "REPLACE"
	ReservationFlagsAllNodes           ReservationFlagsValue = "ALL_NODES"
	ReservationFlagsPurgeComp          ReservationFlagsValue = "PURGE_COMP"
	ReservationFlagsWeekday            ReservationFlagsValue = "WEEKDAY"
	ReservationFlagsNoWeekday          ReservationFlagsValue = "NO_WEEKDAY"
	ReservationFlagsWeekend            ReservationFlagsValue = "WEEKEND"
	ReservationFlagsNoWeekend          ReservationFlagsValue = "NO_WEEKEND"
	ReservationFlagsFlex               ReservationFlagsValue = "FLEX"
	ReservationFlagsNoFlex             ReservationFlagsValue = "NO_FLEX"
	ReservationFlagsDurationPlus       ReservationFlagsValue = "DURATION_PLUS"
	ReservationFlagsDurationMinus      ReservationFlagsValue = "DURATION_MINUS"
	ReservationFlagsNoHoldJobsAfterEnd ReservationFlagsValue = "NO_HOLD_JOBS_AFTER_END"
	ReservationFlagsReplaceDown        ReservationFlagsValue = "REPLACE_DOWN"
	ReservationFlagsNoPurgeComp        ReservationFlagsValue = "NO_PURGE_COMP"
	ReservationFlagsMagnetic           ReservationFlagsValue = "MAGNETIC"
	ReservationFlagsNoMagnetic         ReservationFlagsValue = "NO_MAGNETIC"
	ReservationFlagsSkip               ReservationFlagsValue = "SKIP"
	ReservationFlagsHourly             ReservationFlagsValue = "HOURLY"
	ReservationFlagsNoHourly           ReservationFlagsValue = "NO_HOURLY"
	ReservationFlagsUserDelete         ReservationFlagsValue = "USER_DELETE"
	ReservationFlagsForceStart         ReservationFlagsValue = "FORCE_START"
	ReservationFlagsNoUserDelete       ReservationFlagsValue = "NO_USER_DELETE"
	ReservationFlagsReoccurring        ReservationFlagsValue = "REOCCURRING"
	ReservationFlagsTRESPerNode        ReservationFlagsValue = "TRES_PER_NODE"
)

ReservationFlagsValue constants.

type ReservationList

type ReservationList struct {
	Reservations []Reservation `json:"reservations"`
	Total        int           `json:"total"`
}

ReservationList represents a list of reservations

type ReservationListOptions

type ReservationListOptions struct {
	Names      []string           `json:"names,omitempty"`
	States     []ReservationState `json:"states,omitempty"`
	Accounts   []string           `json:"accounts,omitempty"`
	Users      []string           `json:"users,omitempty"`
	Partitions []string           `json:"partitions,omitempty"`
	StartTime  *time.Time         `json:"start_time,omitempty"`
	EndTime    *time.Time         `json:"end_time,omitempty"`
	UpdateTime *time.Time         `json:"update_time,omitempty"`

	// Limit specifies the maximum number of reservations to return.
	// WARNING: Due to SLURM REST API limitations, this is CLIENT-SIDE pagination.
	// The full reservation list is fetched from the server, then sliced. Consider using
	// filtering options (Names, States, Accounts, Users, Partitions) to reduce the dataset.
	Limit int `json:"limit,omitempty"`

	// Offset specifies the number of reservations to skip before returning results.
	// WARNING: This is CLIENT-SIDE pagination - see Limit field documentation.
	Offset int `json:"offset,omitempty"`
}

ReservationListOptions represents options for listing reservations

type ReservationManager

type ReservationManager interface {
	List(ctx context.Context, opts *ListReservationsOptions) (*ReservationList, error)
	Get(ctx context.Context, reservationName string) (*Reservation, error)
	Create(ctx context.Context, reservation *ReservationCreate) (*ReservationCreateResponse, error)
	Update(ctx context.Context, reservationName string, update *ReservationUpdate) error
	Delete(ctx context.Context, reservationName string) error
}

type ReservationPurgeCompleted

type ReservationPurgeCompleted struct {
	Time *uint32 `json:"time,omitempty"` // If PURGE_COMP flag is set, the number of seconds this reservation will sit idle...
}

ReservationPurgeCompleted is a nested type within its parent.

type ReservationState

type ReservationState string

ReservationState represents the state of a reservation (custom, not in OpenAPI)

const (
	ReservationStateActive   ReservationState = "ACTIVE"
	ReservationStateInactive ReservationState = "INACTIVE"
)

ReservationState constants

type ReservationUpdate

type ReservationUpdate struct {
	Accounts           []string          `json:"accounts,omitempty"`
	BurstBuffer        *string           `json:"burst_buffer,omitempty"`
	CoreCount          *int32            `json:"core_count,omitempty"`
	CoreSpecCount      *int32            `json:"core_spec_count,omitempty"`
	Duration           *int32            `json:"duration,omitempty"`
	EndTime            *time.Time        `json:"end_time,omitempty"`
	Features           []string          `json:"features,omitempty"`
	Flags              []ReservationFlag `json:"flags,omitempty"`
	Groups             []string          `json:"groups,omitempty"`
	Licenses           map[string]int32  `json:"licenses,omitempty"`
	MaxStartDelay      *int32            `json:"max_start_delay,omitempty"`
	NodeCount          *int32            `json:"node_count,omitempty"`
	NodeList           *string           `json:"node_list,omitempty"`
	Partition          *string           `json:"partition_name,omitempty"`
	StartTime          *time.Time        `json:"start_time,omitempty"`
	TRES               map[string]int64  `json:"tres,omitempty"`
	Users              []string          `json:"users,omitempty"`
	Watts              *int64            `json:"watts,omitempty"`
	Comment            *string           `json:"comment,omitempty"`
	PurgeCompletedTime *int32            `json:"purge_completed_time,omitempty"`
}

ReservationUpdate represents the data needed to update a reservation

type ReservationUpdateRequest

type ReservationUpdateRequest = ReservationUpdate

type ReservationUsage

type ReservationUsage struct {
	ReservationName string             `json:"reservation_name"`
	StartTime       time.Time          `json:"start_time"`
	EndTime         time.Time          `json:"end_time"`
	AllocatedNodes  int32              `json:"allocated_nodes"`
	AllocatedCores  int32              `json:"allocated_cores"`
	IdleNodes       int32              `json:"idle_nodes"`
	IdleCores       int32              `json:"idle_cores"`
	JobCount        int32              `json:"job_count"`
	UserCount       int32              `json:"user_count"`
	TRESUsage       map[string]float64 `json:"tres_usage,omitempty"`
	UtilizationRate float64            `json:"utilization_rate"`
}

ReservationUsage represents usage statistics for a reservation

type ResourceAnalysis

type ResourceAnalysis struct {
	CPUAnalysis    ResourceTypeAnalysis `json:"cpu_analysis"`
	MemoryAnalysis ResourceTypeAnalysis `json:"memory_analysis"`
	GPUAnalysis    ResourceTypeAnalysis `json:"gpu_analysis"`
	IOAnalysis     ResourceTypeAnalysis `json:"io_analysis"`
}

ResourceAnalysis provides resource-level analysis.

type ResourceAnomaly

type ResourceAnomaly struct {
	Timestamp     time.Time `json:"timestamp"`
	Resource      string    `json:"resource"`
	Type          string    `json:"type"`
	Severity      string    `json:"severity"`
	Value         float64   `json:"value"`
	ExpectedValue float64   `json:"expected_value"`
	Deviation     float64   `json:"deviation_percent"`
	Description   string    `json:"description"`
}

ResourceAnomaly represents a detected anomaly.

type ResourceChange

type ResourceChange struct {
	JobID             string `json:"job_id"`
	CurrentCPUs       int    `json:"current_cpus"`
	RecommendedCPUs   int    `json:"recommended_cpus"`
	CurrentMemory     int64  `json:"current_memory"`
	RecommendedMemory int64  `json:"recommended_memory"`
	Reason            string `json:"reason"`
}

ResourceChange represents a resource change recommendation.

type ResourceLimits

type ResourceLimits = AssociationLimits

type ResourceRecommendation

type ResourceRecommendation struct {
	CPUs      int     `json:"cpus"`
	MemoryGB  float64 `json:"memory_gb"`
	GPUs      int     `json:"gpus"`
	Reasoning string  `json:"reasoning"`
}

ResourceRecommendation contains recommended resource allocations.

type ResourceRequests

type ResourceRequests struct {
	Memory        int64 `json:"memory,omitempty"`
	MemoryPerCPU  int64 `json:"memory_per_cpu,omitempty"`
	MemoryPerGPU  int64 `json:"memory_per_gpu,omitempty"`
	TemporaryDisk int64 `json:"tmp_disk,omitempty"`
	CPUsPerTask   int32 `json:"cpus_per_task,omitempty"`
	TasksPerNode  int32 `json:"tasks_per_node,omitempty"`
	TasksPerCore  int32 `json:"tasks_per_core,omitempty"`
	Threads       int32 `json:"threads_per_core,omitempty"`
}

ResourceRequests represents the resource requirements for a job

type ResourceTimeSeries

type ResourceTimeSeries struct {
	Values     []float64 `json:"values"`
	Unit       string    `json:"unit"`
	Average    float64   `json:"average"`
	Min        float64   `json:"min"`
	Max        float64   `json:"max"`
	StdDev     float64   `json:"std_dev"`
	Trend      string    `json:"trend"`
	TrendSlope float64   `json:"trend_slope"`
}

ResourceTimeSeries represents a time series of resource values.

type ResourceTrend

type ResourceTrend struct {
	Average    []float64   `json:"average"`
	Peak       []float64   `json:"peak"`
	Timestamps []time.Time `json:"timestamps"`
	Trend      TrendInfo   `json:"trend"`
}

ResourceTrend represents resource trend data.

type ResourceTrendData

type ResourceTrendData struct {
	Values       []float64   `json:"values"`
	Timestamps   []time.Time `json:"timestamps"`
	AverageValue float64     `json:"average_value"`
	MinValue     float64     `json:"min_value"`
	MaxValue     float64     `json:"max_value"`
	StandardDev  float64     `json:"standard_deviation"`
	SlopePerHour float64     `json:"slope_per_hour"`
}

ResourceTrendData represents trend data for a resource.

type ResourceTrendsOptions

type ResourceTrendsOptions struct {
	TimeWindow      time.Duration `json:"time_window,omitempty"`
	DataPoints      int           `json:"data_points,omitempty"`
	IncludeCPU      bool          `json:"include_cpu"`
	IncludeMemory   bool          `json:"include_memory"`
	IncludeGPU      bool          `json:"include_gpu"`
	IncludeIO       bool          `json:"include_io"`
	IncludeNetwork  bool          `json:"include_network"`
	IncludeEnergy   bool          `json:"include_energy"`
	Aggregation     string        `json:"aggregation,omitempty"`
	DetectAnomalies bool          `json:"detect_anomalies"`
}

ResourceTrendsOptions configures trend analysis.

type ResourceTypeAnalysis

type ResourceTypeAnalysis struct {
	AverageUtilization    float64  `json:"average_utilization"`
	PeakUtilization       float64  `json:"peak_utilization"`
	WastePercentage       float64  `json:"waste_percentage"`
	TopWasters            []string `json:"top_waster_job_ids"`
	OptimizationPotential float64  `json:"optimization_potential"`
}

ResourceTypeAnalysis provides analysis for a resource type.

type ResourceUtilization

type ResourceUtilization struct {
	Requested      float64   `json:"requested"`
	Allocated      float64   `json:"allocated"`
	Used           float64   `json:"used"`
	UsedMin        float64   `json:"used_min"`
	UsedMax        float64   `json:"used_max"`
	UsedAvg        float64   `json:"used_avg"`
	UsedStdDev     float64   `json:"used_stddev"`
	Efficiency     float64   `json:"efficiency_percentage"`
	Wasted         float64   `json:"wasted"`
	SampleCount    int       `json:"sample_count"`
	Unit           string    `json:"unit"`
	LastSampleTime time.Time `json:"last_sample_time"`

	// Additional fields for step-level analytics
	Limit      float64                `json:"limit,omitempty"`
	Percentage float64                `json:"percentage,omitempty"`
	Metadata   map[string]interface{} `json:"metadata,omitempty"`
}

ResourceUtilization represents metrics for a single resource type.

type ResourceWaste

type ResourceWaste struct {
	CPUCoreHours  float64 `json:"cpu_core_hours"`
	MemoryGBHours float64 `json:"memory_gb_hours"`
	GPUHours      float64 `json:"gpu_hours"`
	EstimatedCost float64 `json:"estimated_cost"`
}

ResourceWaste represents wasted resources.

type SacctJobStepData

type SacctJobStepData struct {
	JobID        string                 `json:"job_id"`
	QueryOptions *SacctQueryOptions     `json:"query_options"`
	Steps        []SacctStepRecord      `json:"steps"`
	TotalSteps   int                    `json:"total_steps"`
	QueryTime    time.Time              `json:"query_time"`
	Metadata     map[string]interface{} `json:"metadata,omitempty"`
}

SacctJobStepData represents sacct job step data.

type SacctQueryOptions

type SacctQueryOptions struct {
	JobID      string     `json:"job_id,omitempty"`
	User       string     `json:"user,omitempty"`
	Account    string     `json:"account,omitempty"`
	Partition  string     `json:"partition,omitempty"`
	State      []string   `json:"state,omitempty"`
	StartTime  *time.Time `json:"start_time,omitempty"`
	EndTime    *time.Time `json:"end_time,omitempty"`
	Format     []string   `json:"format,omitempty"`
	Delimiter  string     `json:"delimiter,omitempty"`
	NoHeader   bool       `json:"no_header,omitempty"`
	Parsable   bool       `json:"parsable,omitempty"`
	Brief      bool       `json:"brief,omitempty"`
	Verbose    bool       `json:"verbose,omitempty"`
	Units      string     `json:"units,omitempty"`
	MaxRecords int        `json:"max_records,omitempty"`
}

SacctQueryOptions configures sacct queries.

type SacctStepRecord

type SacctStepRecord struct {
	JobID     string `json:"job_id"`
	StepID    string `json:"step_id"`
	StepName  string `json:"step_name"`
	Account   string `json:"account"`
	User      string `json:"user"`
	Group     string `json:"group"`
	JobName   string `json:"job_name"`
	Partition string `json:"partition"`
	NodeList  string `json:"node_list"`
	NodeCount int    `json:"node_count"`

	AllocCPUs  int    `json:"alloc_cpus"`
	ReqCPUs    int    `json:"req_cpus"`
	AllocMem   string `json:"alloc_mem"`
	ReqMem     string `json:"req_mem"`
	AllocNodes int    `json:"alloc_nodes"`
	ReqNodes   string `json:"req_nodes"`

	Submit     string `json:"submit"`
	Start      string `json:"start"`
	End        string `json:"end"`
	Elapsed    string `json:"elapsed"`
	CPUTime    string `json:"cpu_time"`
	CPUTimeRAW int64  `json:"cpu_time_raw"`

	MaxRSS       string `json:"max_rss"`
	MaxVMSize    string `json:"max_vm_size"`
	MaxDiskRead  string `json:"max_disk_read"`
	MaxDiskWrite string `json:"max_disk_write"`
	MaxPages     int64  `json:"max_pages"`

	AveCPU       string  `json:"ave_cpu"`
	AveCPUFreq   string  `json:"ave_cpu_freq"`
	AvePages     float64 `json:"ave_pages"`
	AveDiskRead  string  `json:"ave_disk_read"`
	AveDiskWrite string  `json:"ave_disk_write"`

	State           string `json:"state"`
	ExitCode        string `json:"exit_code"`
	DerivedExitCode string `json:"derived_exit_code"`

	QOS          string `json:"qos,omitempty"`
	Priority     int    `json:"priority,omitempty"`
	ReqTRES      string `json:"req_tres,omitempty"`
	AllocTRES    string `json:"alloc_tres,omitempty"`
	TRESUsageIn  string `json:"tres_usage_in,omitempty"`
	TRESUsageOut string `json:"tres_usage_out,omitempty"`

	RawData  map[string]string      `json:"raw_data,omitempty"`
	Metadata map[string]interface{} `json:"metadata,omitempty"`
}

SacctStepRecord represents a sacct step record.

type SelectTypeValue

type SelectTypeValue string

SelectTypeValue represents possible values for SelectType field.

const (
	SelectTypeCPU                  SelectTypeValue = "CPU"
	SelectTypeSocket               SelectTypeValue = "SOCKET"
	SelectTypeCore                 SelectTypeValue = "CORE"
	SelectTypeBoard                SelectTypeValue = "BOARD"
	SelectTypeMemory               SelectTypeValue = "MEMORY"
	SelectTypeOneTaskPerCore       SelectTypeValue = "ONE_TASK_PER_CORE"
	SelectTypePackNodes            SelectTypeValue = "PACK_NODES"
	SelectTypeCoreDefaultDistBlock SelectTypeValue = "CORE_DEFAULT_DIST_BLOCK"
	SelectTypeLln                  SelectTypeValue = "LLN"
	SelectTypeLinear               SelectTypeValue = "LINEAR"
)

SelectTypeValue constants.

type Share

type Share struct {
	Cluster          string                 `json:"cluster,omitempty"`
	Account          string                 `json:"account,omitempty"`
	User             string                 `json:"user,omitempty"`
	Partition        string                 `json:"partition,omitempty"`
	EffectiveUsage   float64                `json:"effective_usage"`
	FairshareLevel   float64                `json:"fairshare_level"`
	FairshareUsage   float64                `json:"fairshare_usage"`
	FairshareShares  int                    `json:"fairshare_shares"`
	NormalizedShares float64                `json:"normalized_shares"`
	NormalizedUsage  float64                `json:"normalized_usage"`
	RawShares        int                    `json:"raw_shares"`
	RawUsage         int64                  `json:"raw_usage"`
	SharesUsed       int64                  `json:"shares_used"`
	RunSeconds       int64                  `json:"run_seconds"`
	AssocID          int                    `json:"assoc_id,omitempty"`
	ParentAccount    string                 `json:"parent_account,omitempty"`
	Meta             map[string]interface{} `json:"meta,omitempty"`
}

Share represents fairshare information

type SharedValue

type SharedValue string

SharedValue represents possible values for Shared field.

const (
	SharedNone          SharedValue = "none"
	SharedOversubscribe SharedValue = "oversubscribe"
	SharedUser          SharedValue = "user"
	SharedMCS           SharedValue = "mcs"
	SharedTopo          SharedValue = "topo"
)

SharedValue constants.

type SharesList

type SharesList struct {
	Shares []Share                `json:"shares"`
	Meta   map[string]interface{} `json:"meta,omitempty"`
}

SharesList represents a list of shares

type SlurmClient

type SlurmClient interface {
	// Version returns the API version this client supports
	Version() string

	// Capabilities returns the features supported by this client version
	Capabilities() ClientCapabilities

	// Jobs returns the JobManager for this version
	Jobs() JobManager

	// Nodes returns the NodeManager for this version
	Nodes() NodeManager

	// Partitions returns the PartitionManager for this version
	Partitions() PartitionManager

	// Info returns the InfoManager for this version
	Info() InfoManager

	// Reservations returns the ReservationManager for this version (v0.0.43+)
	Reservations() ReservationManager

	// QoS returns the QoSManager for this version (v0.0.43+)
	QoS() QoSManager

	// Accounts returns the AccountManager for this version (v0.0.43+)
	Accounts() AccountManager

	// Users returns the UserManager for this version (v0.0.43+)
	Users() UserManager

	// Clusters returns the ClusterManager for this version (v0.0.43+)
	Clusters() ClusterManager

	// Associations returns the AssociationManager for this version (v0.0.43+)
	Associations() AssociationManager

	// WCKeys returns the WCKeyManager for this version (v0.0.43+)
	WCKeys() WCKeyManager

	// Analytics returns the AnalyticsManager (optional value-added feature)
	// Returns nil if analytics is not implemented in this client version.
	Analytics() AnalyticsManager

	// GetLicenses retrieves license information
	GetLicenses(ctx context.Context) (*LicenseList, error)

	// GetShares retrieves fairshare information with optional filtering
	GetShares(ctx context.Context, opts *GetSharesOptions) (*SharesList, error)

	// GetConfig retrieves SLURM configuration
	GetConfig(ctx context.Context) (*Config, error)

	// GetDiagnostics retrieves SLURM diagnostics information
	GetDiagnostics(ctx context.Context) (*Diagnostics, error)

	// GetDBDiagnostics retrieves SLURM database diagnostics information
	GetDBDiagnostics(ctx context.Context) (*Diagnostics, error)

	// GetInstance retrieves a specific database instance
	GetInstance(ctx context.Context, opts *GetInstanceOptions) (*Instance, error)

	// GetInstances retrieves multiple database instances with filtering
	GetInstances(ctx context.Context, opts *GetInstancesOptions) (*InstanceList, error)

	// GetTRES retrieves all TRES (Trackable RESources)
	GetTRES(ctx context.Context) (*TRESList, error)

	// CreateTRES creates a new TRES entry
	CreateTRES(ctx context.Context, req *CreateTRESRequest) (*TRES, error)

	// Reconfigure triggers a SLURM reconfiguration
	Reconfigure(ctx context.Context) (*ReconfigureResponse, error)

	// Close closes the client and any resources
	Close() error
}

SlurmClient represents a version-agnostic Slurm REST API client

type StateValue

type StateValue string

StateValue represents possible values for State field.

const (
	StateInactive StateValue = "INACTIVE"
	StateUnknown  StateValue = "UNKNOWN"
	StateUp       StateValue = "UP"
	StateDown     StateValue = "DOWN"
	StateDrain    StateValue = "DRAIN"
)

StateValue constants.

type StatusValue

type StatusValue string

StatusValue represents possible values for Status field.

const (
	StatusInvalid    StatusValue = "INVALID"
	StatusPending    StatusValue = "PENDING"
	StatusSuccess    StatusValue = "SUCCESS"
	StatusError      StatusValue = "ERROR"
	StatusSignaled   StatusValue = "SIGNALED"
	StatusCoreDumped StatusValue = "CORE_DUMPED"
)

StatusValue constants.

type StepAccountingRecord

type StepAccountingRecord struct {
	StepID    string   `json:"step_id"`
	StepName  string   `json:"step_name"`
	JobID     string   `json:"job_id"`
	UserID    string   `json:"user_id"`
	GroupID   string   `json:"group_id"`
	Account   string   `json:"account"`
	Partition string   `json:"partition"`
	Nodes     []string `json:"nodes"`
	CPUs      int      `json:"cpus"`
	Tasks     int      `json:"tasks"`

	SubmitTime  time.Time     `json:"submit_time"`
	StartTime   *time.Time    `json:"start_time,omitempty"`
	EndTime     *time.Time    `json:"end_time,omitempty"`
	ElapsedTime time.Duration `json:"elapsed_time"`
	CPUTime     time.Duration `json:"cpu_time"`

	AllocCPUs int   `json:"alloc_cpus"`
	ReqCPUs   int   `json:"req_cpus"`
	AllocMem  int64 `json:"alloc_mem"`
	ReqMem    int64 `json:"req_mem"`
	MaxRSS    int64 `json:"max_rss"`
	MaxVMSize int64 `json:"max_vm_size"`

	MaxDiskRead  int64   `json:"max_disk_read"`
	MaxDiskWrite int64   `json:"max_disk_write"`
	AveCPU       float64 `json:"ave_cpu"`
	AveCPUFreq   float64 `json:"ave_cpu_freq"`

	State           string `json:"state"`
	ExitCode        int    `json:"exit_code"`
	DerivedExitCode int    `json:"derived_exit_code"`

	QOS         string                 `json:"qos,omitempty"`
	Constraints string                 `json:"constraints,omitempty"`
	WorkDir     string                 `json:"work_dir,omitempty"`
	Metadata    map[string]interface{} `json:"metadata,omitempty"`
}

StepAccountingRecord represents accounting data for a step.

type StepComparison

type StepComparison struct {
	StepID                   string   `json:"step_id"`
	RelativeCPUEfficiency    float64  `json:"relative_cpu_efficiency"`
	RelativeMemoryEfficiency float64  `json:"relative_memory_efficiency"`
	RelativeDuration         float64  `json:"relative_duration"`
	PerformanceRank          int      `json:"performance_rank"`
	EfficiencyPercentile     float64  `json:"efficiency_percentile"`
	ComparisonNotes          []string `json:"comparison_notes,omitempty"`
}

StepComparison compares a step to job averages.

type StepID

type StepID struct {
	JobID            *uint32 `json:"job_id,omitempty"`             // Job ID (32 bit integer number with flags)
	Sluid            *string `json:"sluid,omitempty"`              // SLUID (Slurm Lexicographically-sortable Unique ID)
	StepHetComponent *uint32 `json:"step_het_component,omitempty"` // HetJob component (32 bit integer number with flags)
	StepID           *string `json:"step_id,omitempty"`            // Job step ID
}

StepID represents a SLURM StepID.

type StepOptimizationSuggestions

type StepOptimizationSuggestions struct {
	StepID               string  `json:"step_id"`
	OverallScore         float64 `json:"overall_score"`
	ImprovementPotential float64 `json:"improvement_potential"`

	CPUSuggestions     []OptimizationSuggestion `json:"cpu_suggestions,omitempty"`
	MemorySuggestions  []OptimizationSuggestion `json:"memory_suggestions,omitempty"`
	IOSuggestions      []OptimizationSuggestion `json:"io_suggestions,omitempty"`
	NetworkSuggestions []OptimizationSuggestion `json:"network_suggestions,omitempty"`

	RecommendedCPUs       *int     `json:"recommended_cpus,omitempty"`
	RecommendedMemoryMB   *int     `json:"recommended_memory_mb,omitempty"`
	RecommendedNodes      *int     `json:"recommended_nodes,omitempty"`
	AlternativePartitions []string `json:"alternative_partitions,omitempty"`

	HighPriorityActions   []string `json:"high_priority_actions,omitempty"`
	MediumPriorityActions []string `json:"medium_priority_actions,omitempty"`
	LowPriorityActions    []string `json:"low_priority_actions,omitempty"`
}

StepOptimizationSuggestions provides step optimization recommendations.

type StepPerformanceMetrics

type StepPerformanceMetrics struct {
	CPUEfficiency     float64 `json:"cpu_efficiency"`
	MemoryEfficiency  float64 `json:"memory_efficiency"`
	IOEfficiency      float64 `json:"io_efficiency"`
	OverallEfficiency float64 `json:"overall_efficiency"`

	PrimaryBottleneck  string `json:"primary_bottleneck"`
	BottleneckSeverity string `json:"bottleneck_severity"`
	ResourceBalance    string `json:"resource_balance"`

	ThroughputMBPS   float64 `json:"throughput_mbps"`
	LatencyMS        float64 `json:"latency_ms"`
	ScalabilityScore float64 `json:"scalability_score"`
}

StepPerformanceMetrics provides step performance analysis.

type StepResourceTrends

type StepResourceTrends struct {
	StepID           string             `json:"step_id"`
	CPUTrend         *ResourceTrendData `json:"cpu_trend,omitempty"`
	MemoryTrend      *ResourceTrendData `json:"memory_trend,omitempty"`
	IOTrend          *ResourceTrendData `json:"io_trend,omitempty"`
	NetworkTrend     *ResourceTrendData `json:"network_trend,omitempty"`
	SamplingInterval time.Duration      `json:"sampling_interval"`
	TrendDirection   string             `json:"trend_direction"`
	TrendConfidence  float64            `json:"trend_confidence"`
}

StepResourceTrends represents step resource trends.

type StepTaskInfo

type StepTaskInfo struct {
	TaskID    int           `json:"task_id"`
	NodeName  string        `json:"node_name"`
	LocalID   int           `json:"local_id"`
	State     string        `json:"state"`
	ExitCode  int           `json:"exit_code"`
	CPUTime   time.Duration `json:"cpu_time"`
	MaxRSS    int64         `json:"max_rss_bytes"`
	StartTime *time.Time    `json:"start_time,omitempty"`
	EndTime   *time.Time    `json:"end_time,omitempty"`
}

StepTaskInfo provides information about a task within a step.

type StorageDevice

type StorageDevice struct {
	DeviceName     string  `json:"device_name"`
	DeviceType     string  `json:"device_type"`
	MountPoint     string  `json:"mount_point"`
	TotalCapacity  int64   `json:"total_capacity"`
	UsedCapacity   int64   `json:"used_capacity"`
	AvailCapacity  int64   `json:"available_capacity"`
	Utilization    float64 `json:"utilization_percent"`
	IOPS           int64   `json:"iops"`
	ThroughputMBPS int64   `json:"throughput_mbps"`
}

StorageDevice represents storage device metrics.

type TRES

type TRES struct {
	Count *int64  `json:"count,omitempty"` // TRES count (0 if listed generically)
	ID    *int32  `json:"id,omitempty"`    // ID used in the database
	Name  *string `json:"name,omitempty"`  // TRES name (if applicable)
	Type  string  `json:"type"`            // TRES type (CPU, MEM, etc)
}

TRES represents a SLURM TRES.

type TRESList

type TRESList struct {
	TRES []TRES                 `json:"tres"`
	Meta map[string]interface{} `json:"meta,omitempty"`
}

TRESList represents a list of TRES

type TaskUtilization

type TaskUtilization struct {
	TaskID            int     `json:"task_id"`
	NodeName          string  `json:"node_name"`
	CPUUtilization    float64 `json:"cpu_utilization"`
	MemoryUtilization float64 `json:"memory_utilization"`
	State             string  `json:"state"`
	ExitCode          int     `json:"exit_code"`
}

TaskUtilization represents per-task utilization.

type TimeRange

type TimeRange struct {
	Start time.Time `json:"start"`
	End   time.Time `json:"end"`
}

TimeRange represents a time range.

type TrendAnalysisOptions

type TrendAnalysisOptions struct {
	StartTime   *time.Time `json:"start_time,omitempty"`
	EndTime     *time.Time `json:"end_time,omitempty"`
	Granularity string     `json:"granularity"`
	Partitions  []string   `json:"partitions,omitempty"`
	UserFilter  []string   `json:"users,omitempty"`
	JobTypes    []string   `json:"job_types,omitempty"`
	MinJobSize  *int       `json:"min_job_size,omitempty"`
}

TrendAnalysisOptions configures trend analysis.

type TrendInfo

type TrendInfo struct {
	Direction  string  `json:"direction"`
	Slope      float64 `json:"slope"`
	Confidence float64 `json:"confidence"`
	ChangeRate float64 `json:"change_rate_percent"`
}

TrendInfo describes a trend.

type TrendInsight

type TrendInsight struct {
	Type           string    `json:"type"`
	Category       string    `json:"category"`
	Severity       string    `json:"severity"`
	Title          string    `json:"title"`
	Description    string    `json:"description"`
	Timestamp      time.Time `json:"timestamp"`
	Confidence     float64   `json:"confidence"`
	Recommendation string    `json:"recommendation,omitempty"`
}

TrendInsight represents an insight from trend analysis.

type TrendsSummary

type TrendsSummary struct {
	OverallTrend       string             `json:"overall_trend"`
	ResourceEfficiency float64            `json:"resource_efficiency"`
	StabilityScore     float64            `json:"stability_score"`
	VariabilityIndex   float64            `json:"variability_index"`
	PeakUtilization    map[string]float64 `json:"peak_utilization"`
	AverageUtilization map[string]float64 `json:"average_utilization"`
	ResourceBalance    string             `json:"resource_balance"`
}

TrendsSummary summarizes resource trends.

type User

type User struct {
	AdministratorLevel []AdministratorLevelValue `json:"administrator_level,omitempty"` // AdminLevel granted to the user
	Associations       []AssocShort              `json:"associations,omitempty"`        // Associations created for this user
	Coordinators       []Coord                   `json:"coordinators,omitempty"`        // Accounts this user is a coordinator for
	Default            *UserDefault              `json:"default,omitempty"`
	Flags              []UserDefaultFlagsValue   `json:"flags,omitempty"`    // Flags associated with this user
	Name               string                    `json:"name"`               // User name
	OldName            *string                   `json:"old_name,omitempty"` // Previous user name
	Wckeys             []WCKey                   `json:"wckeys,omitempty"`   // List of available WCKeys
}

User represents a SLURM User.

type UserAccessValidation

type UserAccessValidation struct {
	UserName       string                  `json:"user_name"`
	AccountName    string                  `json:"account_name"`
	HasAccess      bool                    `json:"has_access"`
	AccessLevel    string                  `json:"access_level"`
	Permissions    []string                `json:"permissions"`
	Restrictions   []string                `json:"restrictions,omitempty"`
	Reason         string                  `json:"reason,omitempty"`
	ValidFrom      time.Time               `json:"valid_from"`
	ValidUntil     *time.Time              `json:"valid_until,omitempty"`
	Association    *UserAccountAssociation `json:"association,omitempty"`
	QuotaLimits    *UserAccountQuota       `json:"quota_limits,omitempty"`
	CurrentUsage   *AccountUsageStats      `json:"current_usage,omitempty"`
	ValidationTime time.Time               `json:"validation_time"`
}

UserAccessValidation represents user access validation result.

type UserAccount

type UserAccount struct {
	AccountName   string         `json:"account_name"`
	Partition     string         `json:"partition,omitempty"`
	QoS           string         `json:"qos,omitempty"`
	DefaultQoS    string         `json:"default_qos,omitempty"`
	MaxJobs       int            `json:"max_jobs,omitempty"`
	MaxSubmitJobs int            `json:"max_submit_jobs,omitempty"`
	MaxWallTime   int            `json:"max_wall_time,omitempty"`
	Priority      int            `json:"priority,omitempty"`
	GraceTime     int            `json:"grace_time,omitempty"`
	TRES          map[string]int `json:"tres,omitempty"`
	MaxTRES       map[string]int `json:"max_tres,omitempty"`
	MinTRES       map[string]int `json:"min_tres,omitempty"`
	IsDefault     bool           `json:"is_default"`
	IsActive      bool           `json:"is_active"`
	Flags         []string       `json:"flags,omitempty"`
	Created       time.Time      `json:"created"`
	Modified      time.Time      `json:"modified"`
}

UserAccount represents a user's account association.

type UserAccountAssociation

type UserAccountAssociation struct {
	UserName        string                 `json:"user_name"`
	AccountName     string                 `json:"account_name"`
	Cluster         string                 `json:"cluster"`
	Partition       string                 `json:"partition,omitempty"`
	Role            string                 `json:"role"`
	Permissions     []string               `json:"permissions"`
	IsDefault       bool                   `json:"is_default"`
	IsActive        bool                   `json:"is_active"`
	IsCoordinator   bool                   `json:"is_coordinator"`
	MaxJobs         int                    `json:"max_jobs,omitempty"`
	MaxSubmitJobs   int                    `json:"max_submit_jobs,omitempty"`
	MaxWallTime     int                    `json:"max_wall_time,omitempty"`
	Priority        int                    `json:"priority,omitempty"`
	QoS             []string               `json:"qos,omitempty"`
	DefaultQoS      string                 `json:"default_qos,omitempty"`
	TRESLimits      map[string]int         `json:"tres_limits,omitempty"`
	SharesRaw       int                    `json:"shares_raw,omitempty"`
	FairShareFactor float64                `json:"fair_share_factor,omitempty"`
	GraceTime       int                    `json:"grace_time,omitempty"`
	Created         time.Time              `json:"created"`
	Modified        time.Time              `json:"modified"`
	LastAccessed    time.Time              `json:"last_accessed"`
	Flags           []string               `json:"flags,omitempty"`
	Metadata        map[string]interface{} `json:"metadata,omitempty"`
}

UserAccountAssociation represents user-account association details.

type UserAccountOptions

type UserAccountOptions struct {
	// UserName to filter by
	UserName string `json:"user_name,omitempty"`
	// AccountNames to include
	AccountNames []string `json:"account_names,omitempty"`
	// WithLimits includes resource limits
	WithLimits bool `json:"with_limits,omitempty"`
	// WithUsage includes usage information
	WithUsage bool `json:"with_usage,omitempty"`
	// DefaultOnly returns only default account
	DefaultOnly bool `json:"default_only,omitempty"`
}

UserAccountOptions represents options for user-account operations

type UserAccountQuota

type UserAccountQuota struct {
	AccountName   string         `json:"account_name"`
	MaxJobs       int            `json:"max_jobs"`
	MaxSubmitJobs int            `json:"max_submit_jobs"`
	MaxWallTime   int            `json:"max_wall_time"`
	TRESLimits    map[string]int `json:"tres_limits,omitempty"`
	Priority      int            `json:"priority"`
	QoS           []string       `json:"qos,omitempty"`
	DefaultQoS    string         `json:"default_qos,omitempty"`
}

UserAccountQuota represents user-account specific quotas.

type UserAnalysis

type UserAnalysis struct {
	UserID            string  `json:"user_id"`
	JobCount          int     `json:"job_count"`
	AverageEfficiency float64 `json:"average_efficiency"`
	TotalCPUHours     float64 `json:"total_cpu_hours"`
	WastedHours       float64 `json:"wasted_hours"`
	Rank              int     `json:"rank"`
	Trend             string  `json:"trend"`
}

UserAnalysis provides user-level analysis.

type UserAssociation

type UserAssociation struct {
	AccountName    string           `json:"account_name"`
	Cluster        string           `json:"cluster"`
	Partition      string           `json:"partition,omitempty"`
	UserName       string           `json:"user_name"`
	DefaultQoS     string           `json:"default_qos,omitempty"`
	QoSList        []string         `json:"qos_list,omitempty"`
	SharesRaw      int32            `json:"shares_raw,omitempty"`
	Priority       int32            `json:"priority,omitempty"`
	MaxJobs        int32            `json:"max_jobs,omitempty"`
	MaxJobsAccrue  int32            `json:"max_jobs_accrue,omitempty"`
	MaxSubmitJobs  int32            `json:"max_submit_jobs,omitempty"`
	MaxWallTime    int32            `json:"max_wall_time,omitempty"`
	MaxCPUTime     int32            `json:"max_cpu_time,omitempty"`
	MaxNodes       int32            `json:"max_nodes,omitempty"`
	MaxCPUs        int32            `json:"max_cpus,omitempty"`
	MaxMemory      int64            `json:"max_memory,omitempty"`
	GrpJobs        int32            `json:"grp_jobs,omitempty"`
	GrpJobsAccrue  int32            `json:"grp_jobs_accrue,omitempty"`
	GrpNodes       int32            `json:"grp_nodes,omitempty"`
	GrpCPUs        int32            `json:"grp_cpus,omitempty"`
	GrpMemory      int64            `json:"grp_memory,omitempty"`
	GrpSubmitJobs  int32            `json:"grp_submit_jobs,omitempty"`
	GrpWallTime    int32            `json:"grp_wall_time,omitempty"`
	GrpCPUTime     int32            `json:"grp_cpu_time,omitempty"`
	GrpTRES        map[string]int64 `json:"grp_tres,omitempty"`
	GrpTRESMins    map[string]int64 `json:"grp_tres_mins,omitempty"`
	GrpTRESRunMins map[string]int64 `json:"grp_tres_run_mins,omitempty"`
	MaxTRES        map[string]int64 `json:"max_tres,omitempty"`
	MaxTRESPerNode map[string]int64 `json:"max_tres_per_node,omitempty"`
	MinTRES        map[string]int64 `json:"min_tres,omitempty"`
	Comment        string           `json:"comment,omitempty"`
	Deleted        bool             `json:"deleted,omitempty"`
}

UserAssociation represents an association between a user and an account

type UserAssociationRequest

type UserAssociationRequest struct {
	Users        []string          `json:"users"`
	Account      string            `json:"account"`
	Cluster      string            `json:"cluster"`
	Partition    string            `json:"partition,omitempty"`
	QoS          []string          `json:"qos,omitempty"`
	DefaultQoS   string            `json:"default_qos,omitempty"`
	Fairshare    int32             `json:"fairshare,omitempty"`
	MaxTRES      map[string]string `json:"max_tres,omitempty"`
	DefaultWCKey string            `json:"default_wckey,omitempty"`
	AdminLevel   string            `json:"admin_level,omitempty"`
}

UserAssociationRequest represents a request to create user associations

type UserCoordinator

type UserCoordinator struct {
	AccountName string `json:"account_name"`
	Coordinator string `json:"coordinator"`
}

UserCoordinator represents coordinator information for a user

type UserCreate

type UserCreate struct {
	Name                 string           `json:"name"`
	Uid                  int32            `json:"uid,omitempty"`
	DefaultAccount       string           `json:"default_account,omitempty"`
	DefaultWCKey         string           `json:"default_wckey,omitempty"`
	AdminLevel           AdminLevel       `json:"admin_level,omitempty"`
	Accounts             []string         `json:"accounts,omitempty"`
	DefaultQoS           string           `json:"default_qos,omitempty"`
	QoSList              []string         `json:"qos_list,omitempty"`
	MaxJobs              int32            `json:"max_jobs,omitempty"`
	MaxJobsPerAccount    int32            `json:"max_jobs_per_account,omitempty"`
	MaxSubmitJobs        int32            `json:"max_submit_jobs,omitempty"`
	MaxWallTime          int32            `json:"max_wall_time,omitempty"`
	MaxCPUTime           int32            `json:"max_cpu_time,omitempty"`
	MaxNodes             int32            `json:"max_nodes,omitempty"`
	MaxCPUs              int32            `json:"max_cpus,omitempty"`
	MaxMemory            int64            `json:"max_memory,omitempty"`
	MinPriorityThreshold int32            `json:"min_priority_threshold,omitempty"`
	GrpJobs              int32            `json:"grp_jobs,omitempty"`
	GrpJobsAccrue        int32            `json:"grp_jobs_accrue,omitempty"`
	GrpNodes             int32            `json:"grp_nodes,omitempty"`
	GrpCPUs              int32            `json:"grp_cpus,omitempty"`
	GrpMemory            int64            `json:"grp_memory,omitempty"`
	GrpSubmitJobs        int32            `json:"grp_submit_jobs,omitempty"`
	GrpWallTime          int32            `json:"grp_wall_time,omitempty"`
	GrpCPUTime           int32            `json:"grp_cpu_time,omitempty"`
	GrpTRES              map[string]int64 `json:"grp_tres,omitempty"`
	GrpTRESMins          map[string]int64 `json:"grp_tres_mins,omitempty"`
	GrpTRESRunMins       map[string]int64 `json:"grp_tres_run_mins,omitempty"`
	MaxTRES              map[string]int64 `json:"max_tres,omitempty"`
	MaxTRESPerNode       map[string]int64 `json:"max_tres_per_node,omitempty"`
	MinTRES              map[string]int64 `json:"min_tres,omitempty"`
	WCKeys               []string         `json:"wckeys,omitempty"`
}

UserCreate represents the data needed to create a new user

type UserCreateRequest

type UserCreateRequest = UserCreate

UserCreateRequest is an alias for UserCreate

type UserCreateResponse

type UserCreateResponse struct {
	UserName string `json:"user_name"`
}

UserCreateResponse represents the response from user creation

type UserDefault

type UserDefault struct {
	Account *string `json:"account,omitempty"` // Default account
	QoS     *int32  `json:"qos,omitempty"`     // Default QOS
	Wckey   *string `json:"wckey,omitempty"`   // Default WCKey
}

UserDefault is a nested type within its parent.

type UserDefaultFlagsValue

type UserDefaultFlagsValue string

UserDefaultFlagsValue represents possible values for UserDefaultFlags field.

const (
	UserDefaultFlagsNone    UserDefaultFlagsValue = "NONE"
	UserDefaultFlagsDeleted UserDefaultFlagsValue = "DELETED"
)

UserDefaultFlagsValue constants.

type UserEfficiencyTrends

type UserEfficiencyTrends struct {
	UserID    string    `json:"user_id"`
	TimeRange TimeRange `json:"time_range"`

	EfficiencyHistory []EfficiencyDataPoint `json:"efficiency_history"`

	CPUUtilizationTrend    []float64 `json:"cpu_utilization_trend"`
	MemoryUtilizationTrend []float64 `json:"memory_utilization_trend"`

	JobCountTrend    []int           `json:"job_count_trend"`
	JobSizeTrend     []float64       `json:"job_size_trend"`
	JobDurationTrend []time.Duration `json:"job_duration_trend"`

	AverageEfficiency        float64 `json:"average_efficiency"`
	ClusterAverageEfficiency float64 `json:"cluster_average_efficiency"`
	EfficiencyRank           int     `json:"efficiency_rank"`
	EfficiencyPercentile     float64 `json:"efficiency_percentile"`

	ImprovementRate float64   `json:"improvement_rate"`
	BestPeriod      TimeRange `json:"best_period"`
	WorstPeriod     TimeRange `json:"worst_period"`

	Recommendations []string `json:"recommendations"`
}

UserEfficiencyTrends represents user efficiency trends.

type UserFairShare

type UserFairShare struct {
	UserName         string              `json:"user_name"`
	Account          string              `json:"account"`
	Cluster          string              `json:"cluster"`
	Partition        string              `json:"partition,omitempty"`
	FairShareFactor  float64             `json:"fair_share_factor"`
	NormalizedShares float64             `json:"normalized_shares"`
	EffectiveUsage   float64             `json:"effective_usage"`
	FairShareTree    *FairShareNode      `json:"fair_share_tree,omitempty"`
	PriorityFactors  *JobPriorityFactors `json:"priority_factors,omitempty"`
	RawShares        int                 `json:"raw_shares"`
	NormalizedUsage  float64             `json:"normalized_usage"`
	Level            int                 `json:"level"`
	LastDecay        time.Time           `json:"last_decay"`
}

UserFairShare represents user fairshare information.

type UserList

type UserList struct {
	Users []User `json:"users"`
	Total int    `json:"total"`
}

UserList represents a list of users

type UserListOptions

type UserListOptions struct {
	Names          []string   `json:"names,omitempty"`
	DefaultAccount string     `json:"default_account,omitempty"`
	WithDeleted    bool       `json:"with_deleted,omitempty"`
	WithAssocs     bool       `json:"with_assocs,omitempty"`
	WithCoords     bool       `json:"with_coords,omitempty"`
	WithWCKeys     bool       `json:"with_wckeys,omitempty"`
	UpdateTime     *time.Time `json:"update_time,omitempty"`

	// Limit specifies the maximum number of users to return.
	// WARNING: Due to SLURM REST API limitations, this is CLIENT-SIDE pagination.
	// The full user list is fetched from the server, then sliced. For large databases
	// with many users, consider using filtering options (Names, DefaultAccount, etc.)
	// to reduce the dataset before pagination.
	Limit int `json:"limit,omitempty"`

	// Offset specifies the number of users to skip before returning results.
	// WARNING: This is CLIENT-SIDE pagination - see Limit field documentation.
	Offset int `json:"offset,omitempty"`
}

UserListOptions represents options for listing users

type UserManager

type UserManager interface {
	List(ctx context.Context, opts *ListUsersOptions) (*UserList, error)
	Get(ctx context.Context, userName string) (*User, error)
	Create(ctx context.Context, user *UserCreate) (*UserCreateResponse, error)
	Update(ctx context.Context, userName string, update *UserUpdate) error
	Delete(ctx context.Context, userName string) error
}

type UserPermissions

type UserPermissions struct {
	UserName              string   `json:"user_name"`
	CanSubmitJobs         bool     `json:"can_submit_jobs"`
	CanViewJobs           bool     `json:"can_view_jobs"`
	CanCancelJobs         bool     `json:"can_cancel_jobs"`
	CanModifyJobs         bool     `json:"can_modify_jobs"`
	CanViewAllJobs        bool     `json:"can_view_all_jobs"`
	CanManageReservations bool     `json:"can_manage_reservations"`
	CanManageAccounts     bool     `json:"can_manage_accounts"`
	CanManageUsers        bool     `json:"can_manage_users"`
	CanManageQoS          bool     `json:"can_manage_qos"`
	AllowedPartitions     []string `json:"allowed_partitions,omitempty"`
	AllowedQoS            []string `json:"allowed_qos,omitempty"`
	AllowedAccounts       []string `json:"allowed_accounts,omitempty"`
}

UserPermissions represents permissions for a user

type UserQuota

type UserQuota struct {
	UserName       string                       `json:"user_name"`
	DefaultAccount string                       `json:"default_account"`
	MaxJobs        int                          `json:"max_jobs"`
	MaxSubmitJobs  int                          `json:"max_submit_jobs"`
	MaxWallTime    int                          `json:"max_wall_time"`
	MaxCPUs        int                          `json:"max_cpus"`
	MaxNodes       int                          `json:"max_nodes"`
	MaxMemory      int                          `json:"max_memory"`
	TRESLimits     map[string]int               `json:"tres_limits,omitempty"`
	AccountQuotas  map[string]*UserAccountQuota `json:"account_quotas,omitempty"`
	QoSLimits      map[string]*QoSLimits        `json:"qos_limits,omitempty"`
	GraceTime      int                          `json:"grace_time,omitempty"`
	CurrentUsage   *UserUsage                   `json:"current_usage,omitempty"`
	IsActive       bool                         `json:"is_active"`
	Enforcement    string                       `json:"enforcement"`
}

UserQuota represents a user's resource quotas.

type UserUpdate

type UserUpdate struct {
	DefaultAccount       *string          `json:"default_account,omitempty"`
	DefaultWCKey         *string          `json:"default_wckey,omitempty"`
	AdminLevel           *AdminLevel      `json:"admin_level,omitempty"`
	Accounts             []string         `json:"accounts,omitempty"`
	DefaultQoS           *string          `json:"default_qos,omitempty"`
	QoSList              []string         `json:"qos_list,omitempty"`
	MaxJobs              *int32           `json:"max_jobs,omitempty"`
	MaxJobsPerAccount    *int32           `json:"max_jobs_per_account,omitempty"`
	MaxSubmitJobs        *int32           `json:"max_submit_jobs,omitempty"`
	MaxWallTime          *int32           `json:"max_wall_time,omitempty"`
	MaxCPUTime           *int32           `json:"max_cpu_time,omitempty"`
	MaxNodes             *int32           `json:"max_nodes,omitempty"`
	MaxCPUs              *int32           `json:"max_cpus,omitempty"`
	MaxMemory            *int64           `json:"max_memory,omitempty"`
	MinPriorityThreshold *int32           `json:"min_priority_threshold,omitempty"`
	GrpJobs              *int32           `json:"grp_jobs,omitempty"`
	GrpJobsAccrue        *int32           `json:"grp_jobs_accrue,omitempty"`
	GrpNodes             *int32           `json:"grp_nodes,omitempty"`
	GrpCPUs              *int32           `json:"grp_cpus,omitempty"`
	GrpMemory            *int64           `json:"grp_memory,omitempty"`
	GrpSubmitJobs        *int32           `json:"grp_submit_jobs,omitempty"`
	GrpWallTime          *int32           `json:"grp_wall_time,omitempty"`
	GrpCPUTime           *int32           `json:"grp_cpu_time,omitempty"`
	GrpTRES              map[string]int64 `json:"grp_tres,omitempty"`
	GrpTRESMins          map[string]int64 `json:"grp_tres_mins,omitempty"`
	GrpTRESRunMins       map[string]int64 `json:"grp_tres_run_mins,omitempty"`
	MaxTRES              map[string]int64 `json:"max_tres,omitempty"`
	MaxTRESPerNode       map[string]int64 `json:"max_tres_per_node,omitempty"`
	MinTRES              map[string]int64 `json:"min_tres,omitempty"`
	WCKeys               []string         `json:"wckeys,omitempty"`
}

UserUpdate represents the data needed to update a user

type UserUpdateRequest

type UserUpdateRequest = UserUpdate

UserUpdateRequest is an alias for UserUpdate

type UserUsage

type UserUsage struct {
	UserName        string             `json:"user_name"`
	AccountName     string             `json:"account_name,omitempty"`
	StartTime       time.Time          `json:"start_time"`
	EndTime         time.Time          `json:"end_time"`
	CPUSeconds      int64              `json:"cpu_seconds"`
	NodeHours       float64            `json:"node_hours"`
	JobCount        int32              `json:"job_count"`
	TRESUsage       map[string]float64 `json:"tres_usage,omitempty"`
	AverageJobSize  float64            `json:"average_job_size,omitempty"`
	AverageWaitTime int32              `json:"average_wait_time,omitempty"`
	SuccessRate     float64            `json:"success_rate,omitempty"`
}

UserUsage represents usage statistics for a user

type UtilizationPoint

type UtilizationPoint struct {
	Timestamp   time.Time `json:"timestamp"`
	Utilization float64   `json:"utilization"`
	JobCount    int       `json:"job_count"`
}

UtilizationPoint represents a utilization data point.

type WCKey

type WCKey struct {
	Accounting []Accounting      `json:"accounting,omitempty"` // Accounting records containing related resource usage
	Cluster    string            `json:"cluster"`              // Cluster name
	Flags      []WCKeyFlagsValue `json:"flags,omitempty"`      // Flags associated with this WCKey
	ID         *int32            `json:"id,omitempty"`         // Unique ID for this user-cluster-wckey combination
	Name       string            `json:"name"`                 // WCKey name
	User       string            `json:"user"`                 // User name
}

WCKey represents a SLURM WCKey.

type WCKeyCreate

type WCKeyCreate struct {
	Name        string `json:"name"`
	User        string `json:"user,omitempty"`
	Cluster     string `json:"cluster"`
	Description string `json:"description,omitempty"`
}

WCKeyCreate represents a request to create a new WCKey

type WCKeyCreateResponse

type WCKeyCreateResponse struct {
	ID      string                 `json:"id"`
	Status  string                 `json:"status"`
	Message string                 `json:"message,omitempty"`
	Meta    map[string]interface{} `json:"meta,omitempty"`
}

WCKeyCreateResponse represents the response from creating a WCKey

type WCKeyFlagsValue

type WCKeyFlagsValue string

WCKeyFlagsValue represents possible values for WCKeyFlags field.

const (
	WCKeyFlagsDeleted WCKeyFlagsValue = "DELETED"
)

WCKeyFlagsValue constants.

type WCKeyList

type WCKeyList struct {
	WCKeys []WCKey                `json:"wckeys"`
	Total  int                    `json:"total,omitempty"`
	Meta   map[string]interface{} `json:"meta,omitempty"`
}

WCKeyList represents a list of WCKeys

type WCKeyListOptions

type WCKeyListOptions struct {
	Users        []string `json:"users,omitempty"`
	Clusters     []string `json:"clusters,omitempty"`
	Names        []string `json:"names,omitempty"`
	OnlyDefaults bool     `json:"only_defaults,omitempty"`
	WithDeleted  bool     `json:"with_deleted,omitempty"`

	// Limit specifies the maximum number of WCKeys to return.
	// WARNING: Due to SLURM REST API limitations, this is CLIENT-SIDE pagination.
	// The full WCKey list is fetched from the server, then sliced. Consider using
	// filtering options (Users, Clusters, Names) to reduce the dataset before pagination.
	Limit int `json:"limit,omitempty"`

	// Offset specifies the number of WCKeys to skip before returning results.
	// WARNING: This is CLIENT-SIDE pagination - see Limit field documentation.
	Offset int `json:"offset,omitempty"`
}

WCKeyListOptions provides filtering options for WCKey listing

type WCKeyManager

type WCKeyManager interface {
	List(ctx context.Context, opts *WCKeyListOptions) (*WCKeyList, error)
	Get(ctx context.Context, wckeyName, user, cluster string) (*WCKey, error)
	Create(ctx context.Context, wckey *WCKeyCreate) (*WCKeyCreateResponse, error)
	// Note: WCKey updates are not supported by the SLURM REST API
	Delete(ctx context.Context, wckeyID string) error
}

type WCKeyUpdate

type WCKeyUpdate struct {
	Description *string `json:"description,omitempty"`
}

WCKeyUpdate represents a request to update an existing WCKey

type WatchJobsOptions

type WatchJobsOptions struct {
	UserID           string   `json:"user_id,omitempty"`
	States           []string `json:"states,omitempty"`
	Partition        string   `json:"partition,omitempty"`
	JobIDs           []string `json:"job_ids,omitempty"`
	ExcludeNew       bool     `json:"exclude_new,omitempty"`
	ExcludeCompleted bool     `json:"exclude_completed,omitempty"`
}

WatchJobsOptions configures job watching.

type WatchMetricsOptions

type WatchMetricsOptions struct {
	UpdateInterval     time.Duration `json:"update_interval,omitempty"`
	IncludeCPU         bool          `json:"include_cpu"`
	IncludeMemory      bool          `json:"include_memory"`
	IncludeGPU         bool          `json:"include_gpu"`
	IncludeNetwork     bool          `json:"include_network"`
	IncludeIO          bool          `json:"include_io"`
	IncludeEnergy      bool          `json:"include_energy"`
	IncludeNodeMetrics bool          `json:"include_node_metrics"`
	SpecificNodes      []string      `json:"specific_nodes,omitempty"`
	CPUThreshold       float64       `json:"cpu_threshold,omitempty"`
	MemoryThreshold    float64       `json:"memory_threshold,omitempty"`
	GPUThreshold       float64       `json:"gpu_threshold,omitempty"`
	StopOnCompletion   bool          `json:"stop_on_completion"`
	MaxDuration        time.Duration `json:"max_duration,omitempty"`
}

WatchMetricsOptions configures metric watching.

type WatchNodesOptions

type WatchNodesOptions struct {
	States    []string `json:"states,omitempty"`
	Partition string   `json:"partition,omitempty"`
	Features  []string `json:"features,omitempty"`
	NodeNames []string `json:"node_names,omitempty"`
}

WatchNodesOptions configures node watching.

type WatchPartitionsOptions

type WatchPartitionsOptions struct {
	States         []string `json:"states,omitempty"`
	PartitionNames []string `json:"partition_names,omitempty"`
}

WatchPartitionsOptions configures partition watching.

type WorkflowAnalysisOptions

type WorkflowAnalysisOptions struct {
	IncludeDependencies bool       `json:"include_dependencies"`
	IncludeBottlenecks  bool       `json:"include_bottlenecks"`
	IncludeOptimization bool       `json:"include_optimization"`
	TimeWindow          *TimeRange `json:"time_window,omitempty"`
}

WorkflowAnalysisOptions configures workflow analysis.

type WorkflowBottleneck

type WorkflowBottleneck struct {
	Type        string        `json:"type"`
	Location    string        `json:"location"`
	Description string        `json:"description"`
	Impact      time.Duration `json:"impact_duration"`
	Severity    string        `json:"severity"`
}

WorkflowBottleneck represents a workflow bottleneck.

type WorkflowDependencies

type WorkflowDependencies struct {
	DependencyGraph map[string][]string `json:"dependency_graph"`
	MaxDepth        int                 `json:"max_depth"`
	MaxWidth        int                 `json:"max_width"`
	TotalEdges      int                 `json:"total_edges"`
}

WorkflowDependencies represents workflow dependencies.

type WorkflowOptimization

type WorkflowOptimization struct {
	PotentialSpeedup     float64                   `json:"potential_speedup"`
	OptimizedDuration    time.Duration             `json:"optimized_duration"`
	OptimizedParallelism int                       `json:"optimized_parallelism"`
	RecommendedChanges   []string                  `json:"recommended_changes"`
	ResourceReallocation map[string]ResourceChange `json:"resource_reallocation"`
}

WorkflowOptimization provides workflow optimization suggestions.

type WorkflowPerformance

type WorkflowPerformance struct {
	WorkflowID    string     `json:"workflow_id"`
	WorkflowName  string     `json:"workflow_name"`
	TotalJobs     int        `json:"total_jobs"`
	CompletedJobs int        `json:"completed_jobs"`
	StartTime     time.Time  `json:"start_time"`
	EndTime       *time.Time `json:"end_time,omitempty"`

	TotalDuration     time.Duration `json:"total_duration"`
	WallClockTime     time.Duration `json:"wall_clock_time"`
	Parallelization   float64       `json:"parallelization_efficiency"`
	OverallEfficiency float64       `json:"overall_efficiency"`

	Stages []WorkflowStage `json:"stages"`

	CriticalPath         []string      `json:"critical_path_job_ids"`
	CriticalPathDuration time.Duration `json:"critical_path_duration"`

	Bottlenecks []WorkflowBottleneck `json:"bottlenecks,omitempty"`

	Dependencies *WorkflowDependencies `json:"dependencies,omitempty"`

	Optimization *WorkflowOptimization `json:"optimization,omitempty"`
}

WorkflowPerformance provides workflow performance analysis.

type WorkflowStage

type WorkflowStage struct {
	StageID     string        `json:"stage_id"`
	StageName   string        `json:"stage_name"`
	JobIDs      []string      `json:"job_ids"`
	StartTime   time.Time     `json:"start_time"`
	EndTime     time.Time     `json:"end_time"`
	Duration    time.Duration `json:"duration"`
	Efficiency  float64       `json:"efficiency"`
	Parallelism int           `json:"parallelism"`
	Status      string        `json:"status"`
}

WorkflowStage represents a workflow stage.

type X11Value

type X11Value string

X11Value represents possible values for X11 field.

const (
	X11ForwardAllNodes X11Value = "FORWARD_ALL_NODES"
	X11BatchNode       X11Value = "BATCH_NODE"
	X11FirstNode       X11Value = "FIRST_NODE"
	X11LastNode        X11Value = "LAST_NODE"
)

X11Value constants.

Jump to

Keyboard shortcuts

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