generated

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExecutableSchema

func NewExecutableSchema(cfg Config) graphql.ExecutableSchema

NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.

Types

type ClusterResolver

type ClusterResolver interface {
	Partitions(ctx context.Context, obj *schema.Cluster) ([]string, error)
}

type ComplexityRoot

type ComplexityRoot struct {
	Accelerator struct {
		ID    func(childComplexity int) int
		Model func(childComplexity int) int
		Type  func(childComplexity int) int
	}

	Cluster struct {
		Name        func(childComplexity int) int
		Partitions  func(childComplexity int) int
		SubClusters func(childComplexity int) int
	}

	ClusterSupport struct {
		Cluster     func(childComplexity int) int
		SubClusters func(childComplexity int) int
	}

	Count struct {
		Count func(childComplexity int) int
		Name  func(childComplexity int) int
	}

	EnergyFootprintValue struct {
		Hardware func(childComplexity int) int
		Metric   func(childComplexity int) int
		Value    func(childComplexity int) int
	}

	FootprintValue struct {
		Name  func(childComplexity int) int
		Stat  func(childComplexity int) int
		Value func(childComplexity int) int
	}

	Footprints struct {
		Metrics     func(childComplexity int) int
		TimeWeights func(childComplexity int) int
	}

	GlobalMetricListItem struct {
		Availability func(childComplexity int) int
		Footprint    func(childComplexity int) int
		Name         func(childComplexity int) int
		Scope        func(childComplexity int) int
		Unit         func(childComplexity int) int
	}

	HistoPoint struct {
		Count func(childComplexity int) int
		Value func(childComplexity int) int
	}

	IntRangeOutput struct {
		From func(childComplexity int) int
		To   func(childComplexity int) int
	}

	Job struct {
		ArrayJobId       func(childComplexity int) int
		Cluster          func(childComplexity int) int
		ConcurrentJobs   func(childComplexity int) int
		Duration         func(childComplexity int) int
		Energy           func(childComplexity int) int
		EnergyFootprint  func(childComplexity int) int
		Exclusive        func(childComplexity int) int
		Footprint        func(childComplexity int) int
		ID               func(childComplexity int) int
		JobID            func(childComplexity int) int
		MetaData         func(childComplexity int) int
		MonitoringStatus func(childComplexity int) int
		NumAcc           func(childComplexity int) int
		NumHWThreads     func(childComplexity int) int
		NumNodes         func(childComplexity int) int
		Partition        func(childComplexity int) int
		Project          func(childComplexity int) int
		Resources        func(childComplexity int) int
		SMT              func(childComplexity int) int
		StartTime        func(childComplexity int) int
		State            func(childComplexity int) int
		SubCluster       func(childComplexity int) int
		Tags             func(childComplexity int) int
		User             func(childComplexity int) int
		UserData         func(childComplexity int) int
		Walltime         func(childComplexity int) int
	}

	JobLink struct {
		ID    func(childComplexity int) int
		JobID func(childComplexity int) int
	}

	JobLinkResultList struct {
		Count     func(childComplexity int) int
		Items     func(childComplexity int) int
		ListQuery func(childComplexity int) int
	}

	JobMetric struct {
		Series           func(childComplexity int) int
		StatisticsSeries func(childComplexity int) int
		Timestep         func(childComplexity int) int
		Unit             func(childComplexity int) int
	}

	JobMetricWithName struct {
		Metric func(childComplexity int) int
		Name   func(childComplexity int) int
		Scope  func(childComplexity int) int
	}

	JobResultList struct {
		Count       func(childComplexity int) int
		HasNextPage func(childComplexity int) int
		Items       func(childComplexity int) int
		Limit       func(childComplexity int) int
		Offset      func(childComplexity int) int
	}

	JobsStatistics struct {
		HistDuration   func(childComplexity int) int
		HistMetrics    func(childComplexity int) int
		HistNumAccs    func(childComplexity int) int
		HistNumCores   func(childComplexity int) int
		HistNumNodes   func(childComplexity int) int
		ID             func(childComplexity int) int
		Name           func(childComplexity int) int
		RunningJobs    func(childComplexity int) int
		ShortJobs      func(childComplexity int) int
		TotalAccHours  func(childComplexity int) int
		TotalAccs      func(childComplexity int) int
		TotalCoreHours func(childComplexity int) int
		TotalCores     func(childComplexity int) int
		TotalJobs      func(childComplexity int) int
		TotalNodeHours func(childComplexity int) int
		TotalNodes     func(childComplexity int) int
		TotalWalltime  func(childComplexity int) int
	}

	MetricConfig struct {
		Aggregation   func(childComplexity int) int
		Alert         func(childComplexity int) int
		Caution       func(childComplexity int) int
		LowerIsBetter func(childComplexity int) int
		Name          func(childComplexity int) int
		Normal        func(childComplexity int) int
		Peak          func(childComplexity int) int
		Scope         func(childComplexity int) int
		SubClusters   func(childComplexity int) int
		Timestep      func(childComplexity int) int
		Unit          func(childComplexity int) int
	}

	MetricFootprints struct {
		Data   func(childComplexity int) int
		Metric func(childComplexity int) int
	}

	MetricHistoPoint struct {
		Bin   func(childComplexity int) int
		Count func(childComplexity int) int
		Max   func(childComplexity int) int
		Min   func(childComplexity int) int
	}

	MetricHistoPoints struct {
		Data   func(childComplexity int) int
		Metric func(childComplexity int) int
		Stat   func(childComplexity int) int
		Unit   func(childComplexity int) int
	}

	MetricStatistics struct {
		Avg func(childComplexity int) int
		Max func(childComplexity int) int
		Min func(childComplexity int) int
	}

	MetricValue struct {
		Name  func(childComplexity int) int
		Unit  func(childComplexity int) int
		Value func(childComplexity int) int
	}

	Mutation struct {
		AddTagsToJob        func(childComplexity int, job string, tagIds []string) int
		CreateTag           func(childComplexity int, typeArg string, name string, scope string) int
		DeleteTag           func(childComplexity int, id string) int
		RemoveTagsFromJob   func(childComplexity int, job string, tagIds []string) int
		UpdateConfiguration func(childComplexity int, name string, value string) int
	}

	NodeMetrics struct {
		Host       func(childComplexity int) int
		Metrics    func(childComplexity int) int
		SubCluster func(childComplexity int) int
	}

	Query struct {
		AllocatedNodes  func(childComplexity int, cluster string) int
		Clusters        func(childComplexity int) int
		GlobalMetrics   func(childComplexity int) int
		Job             func(childComplexity int, id string) int
		JobMetrics      func(childComplexity int, id string, metrics []string, scopes []schema.MetricScope, resolution *int) int
		Jobs            func(childComplexity int, filter []*model.JobFilter, page *model.PageRequest, order *model.OrderByInput) int
		JobsFootprints  func(childComplexity int, filter []*model.JobFilter, metrics []string) int
		JobsStatistics  func(childComplexity int, filter []*model.JobFilter, metrics []string, page *model.PageRequest, sortBy *model.SortByAggregate, groupBy *model.Aggregate) int
		NodeMetrics     func(childComplexity int, cluster string, nodes []string, scopes []schema.MetricScope, metrics []string, from time.Time, to time.Time) int
		RooflineHeatmap func(childComplexity int, filter []*model.JobFilter, rows int, cols int, minX float64, minY float64, maxX float64, maxY float64) int
		Tags            func(childComplexity int) int
		User            func(childComplexity int, username string) int
	}

	Resource struct {
		Accelerators  func(childComplexity int) int
		Configuration func(childComplexity int) int
		HWThreads     func(childComplexity int) int
		Hostname      func(childComplexity int) int
	}

	Series struct {
		Data       func(childComplexity int) int
		Hostname   func(childComplexity int) int
		Id         func(childComplexity int) int
		Statistics func(childComplexity int) int
	}

	StatsSeries struct {
		Max    func(childComplexity int) int
		Mean   func(childComplexity int) int
		Median func(childComplexity int) int
		Min    func(childComplexity int) int
	}

	SubCluster struct {
		CoresPerSocket  func(childComplexity int) int
		FlopRateScalar  func(childComplexity int) int
		FlopRateSimd    func(childComplexity int) int
		Footprint       func(childComplexity int) int
		MemoryBandwidth func(childComplexity int) int
		MetricConfig    func(childComplexity int) int
		Name            func(childComplexity int) int
		Nodes           func(childComplexity int) int
		NumberOfNodes   func(childComplexity int) int
		ProcessorType   func(childComplexity int) int
		SocketsPerNode  func(childComplexity int) int
		ThreadsPerCore  func(childComplexity int) int
		Topology        func(childComplexity int) int
	}

	SubClusterConfig struct {
		Alert   func(childComplexity int) int
		Caution func(childComplexity int) int
		Name    func(childComplexity int) int
		Normal  func(childComplexity int) int
		Peak    func(childComplexity int) int
		Remove  func(childComplexity int) int
	}

	Tag struct {
		ID    func(childComplexity int) int
		Name  func(childComplexity int) int
		Scope func(childComplexity int) int
		Type  func(childComplexity int) int
	}

	TimeRangeOutput struct {
		From  func(childComplexity int) int
		Range func(childComplexity int) int
		To    func(childComplexity int) int
	}

	TimeWeights struct {
		AccHours  func(childComplexity int) int
		CoreHours func(childComplexity int) int
		NodeHours func(childComplexity int) int
	}

	Topology struct {
		Accelerators func(childComplexity int) int
		Core         func(childComplexity int) int
		Die          func(childComplexity int) int
		MemoryDomain func(childComplexity int) int
		Node         func(childComplexity int) int
		Socket       func(childComplexity int) int
	}

	Unit struct {
		Base   func(childComplexity int) int
		Prefix func(childComplexity int) int
	}

	User struct {
		Email    func(childComplexity int) int
		Name     func(childComplexity int) int
		Username func(childComplexity int) int
	}
}

type Config

type Config struct {
	Schema     *ast.Schema
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type JobResolver

type JobResolver interface {
	Tags(ctx context.Context, obj *schema.Job) ([]*schema.Tag, error)

	ConcurrentJobs(ctx context.Context, obj *schema.Job) (*model.JobLinkResultList, error)
	Footprint(ctx context.Context, obj *schema.Job) ([]*model.FootprintValue, error)
	EnergyFootprint(ctx context.Context, obj *schema.Job) ([]*model.EnergyFootprintValue, error)
	MetaData(ctx context.Context, obj *schema.Job) (any, error)
	UserData(ctx context.Context, obj *schema.Job) (*model.User, error)
}

type MetricValueResolver added in v1.4.0

type MetricValueResolver interface {
	Name(ctx context.Context, obj *schema.MetricValue) (*string, error)
}

type MutationResolver

type MutationResolver interface {
	CreateTag(ctx context.Context, typeArg string, name string, scope string) (*schema.Tag, error)
	DeleteTag(ctx context.Context, id string) (string, error)
	AddTagsToJob(ctx context.Context, job string, tagIds []string) ([]*schema.Tag, error)
	RemoveTagsFromJob(ctx context.Context, job string, tagIds []string) ([]*schema.Tag, error)
	UpdateConfiguration(ctx context.Context, name string, value string) (*string, error)
}

type QueryResolver

type QueryResolver interface {
	Clusters(ctx context.Context) ([]*schema.Cluster, error)
	Tags(ctx context.Context) ([]*schema.Tag, error)
	GlobalMetrics(ctx context.Context) ([]*schema.GlobalMetricListItem, error)
	User(ctx context.Context, username string) (*model.User, error)
	AllocatedNodes(ctx context.Context, cluster string) ([]*model.Count, error)
	Job(ctx context.Context, id string) (*schema.Job, error)
	JobMetrics(ctx context.Context, id string, metrics []string, scopes []schema.MetricScope, resolution *int) ([]*model.JobMetricWithName, error)
	JobsFootprints(ctx context.Context, filter []*model.JobFilter, metrics []string) (*model.Footprints, error)
	Jobs(ctx context.Context, filter []*model.JobFilter, page *model.PageRequest, order *model.OrderByInput) (*model.JobResultList, error)
	JobsStatistics(ctx context.Context, filter []*model.JobFilter, metrics []string, page *model.PageRequest, sortBy *model.SortByAggregate, groupBy *model.Aggregate) ([]*model.JobsStatistics, error)
	RooflineHeatmap(ctx context.Context, filter []*model.JobFilter, rows int, cols int, minX float64, minY float64, maxX float64, maxY float64) ([][]float64, error)
	NodeMetrics(ctx context.Context, cluster string, nodes []string, scopes []schema.MetricScope, metrics []string, from time.Time, to time.Time) ([]*model.NodeMetrics, error)
}

type ResolverRoot

type ResolverRoot interface {
	Cluster() ClusterResolver
	Job() JobResolver
	MetricValue() MetricValueResolver
	Mutation() MutationResolver
	Query() QueryResolver
	SubCluster() SubClusterResolver
}

type SubClusterResolver

type SubClusterResolver interface {
	NumberOfNodes(ctx context.Context, obj *schema.SubCluster) (int, error)
}

Jump to

Keyboard shortcuts

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