Documentation ¶
Index ¶
- Variables
- func NewLoaderContext(ctx context.Context, jobWatcher *watcher.Watcher[*nais_io_v1.Naisjob], ...) context.Context
- func NewRunWatcher(ctx context.Context, mgr *watcher.Manager) *watcher.Watcher[*batchv1.Job]
- func NewWatcher(ctx context.Context, mgr *watcher.Manager) *watcher.Watcher[*nais_io_v1.Naisjob]
- func Search(ctx context.Context, q string) ([]*search.Result, error)
- type DeleteJobInput
- type DeleteJobPayload
- type Job
- func Get(ctx context.Context, teamSlug slug.Slug, environment, name string) (*Job, error)
- func GetByIdent(ctx context.Context, id ident.Ident) (*Job, error)
- func ListAllForTeam(ctx context.Context, teamSlug slug.Slug) []*Job
- func ListAllForTeamInEnvironment(ctx context.Context, teamSlug slug.Slug, environmentName string) []*Job
- type JobConnection
- type JobDeletedActivityLogEntry
- type JobEdge
- type JobManifest
- type JobOrder
- type JobOrderField
- type JobResources
- type JobRun
- type JobRunConnection
- type JobRunEdge
- type JobRunInstance
- type JobRunInstanceConnection
- type JobRunInstanceEdge
- type JobRunState
- type JobRunStatus
- type JobSchedule
- type JobTriggeredActivityLogEntry
- type TeamInventoryCountJobs
- type TeamJobsFilter
- type TriggerJobInput
- type TriggerJobPayload
Constants ¶
This section is empty.
Variables ¶
View Source
var AllJobOrderField = []JobOrderField{ JobOrderFieldName, JobOrderFieldEnvironment, }
View Source
var SortFilter = sortfilter.New[*Job, JobOrderField, *TeamJobsFilter](JobOrderFieldName)
Functions ¶
func NewLoaderContext ¶
func NewRunWatcher ¶
func NewWatcher ¶
Types ¶
type DeleteJobInput ¶
type DeleteJobPayload ¶
type Job ¶
type Job struct { workload.Base Spec *nais_io_v1.NaisjobSpec `json:"-"` }
func (*Job) GetSecrets ¶
GetSecrets returns a list of secret names used by the job
func (Job) IsSearchNode ¶
func (Job) IsSearchNode()
func (Job) IsWorkload ¶
func (Job) IsWorkload()
func (*Job) Resources ¶
func (j *Job) Resources() *JobResources
func (*Job) Schedule ¶
func (j *Job) Schedule() *JobSchedule
type JobConnection ¶
type JobConnection = pagination.Connection[*Job]
type JobDeletedActivityLogEntry ¶
type JobDeletedActivityLogEntry struct {
activitylog.GenericActivityLogEntry
}
type JobEdge ¶
type JobEdge = pagination.Edge[*Job]
type JobManifest ¶
type JobManifest struct {
Content string `json:"content"`
}
func (JobManifest) IsWorkloadManifest ¶
func (JobManifest) IsWorkloadManifest()
type JobOrder ¶
type JobOrder struct { Field JobOrderField `json:"field"` Direction model.OrderDirection `json:"direction"` }
type JobOrderField ¶
type JobOrderField string
const ( // JobOrderFieldStatus JobOrderField = "STATUS" JobOrderFieldName JobOrderField = "NAME" JobOrderFieldEnvironment JobOrderField = "ENVIRONMENT" )
func (JobOrderField) IsValid ¶
func (e JobOrderField) IsValid() bool
func (JobOrderField) MarshalGQL ¶
func (e JobOrderField) MarshalGQL(w io.Writer)
func (JobOrderField) String ¶
func (e JobOrderField) String() string
func (*JobOrderField) UnmarshalGQL ¶
func (e *JobOrderField) UnmarshalGQL(v interface{}) error
type JobResources ¶
type JobResources struct { Limits *workload.WorkloadResourceQuantity `json:"limits"` Requests *workload.WorkloadResourceQuantity `json:"requests"` }
func (JobResources) IsWorkloadResources ¶
func (JobResources) IsWorkloadResources()
type JobRun ¶
type JobRun struct { Name string `json:"name"` StartTime *time.Time `json:"startTime"` CreationTime time.Time `json:"-"` EnvironmentName string `json:"-"` TeamSlug slug.Slug `json:"-"` Failed bool `json:"-"` Message string `json:"-"` // contains filtered or unexported fields }
func (*JobRun) CompletionTime ¶
func (*JobRun) Image ¶
func (j *JobRun) Image() *workload.ContainerImage
func (*JobRun) Status ¶
func (j *JobRun) Status() *JobRunStatus
type JobRunConnection ¶
type JobRunConnection = pagination.Connection[*JobRun]
func Runs ¶
func Runs(ctx context.Context, teamSlug slug.Slug, jobName string, page *pagination.Pagination) (*JobRunConnection, error)
type JobRunEdge ¶
type JobRunEdge = pagination.Edge[*JobRun]
type JobRunInstance ¶
type JobRunInstance struct { Name string `json:"name"` EnvironmentName string `json:"-"` TeamSlug slug.Slug `json:"-"` }
func (JobRunInstance) ID ¶
func (j JobRunInstance) ID() ident.Ident
func (JobRunInstance) IsNode ¶
func (JobRunInstance) IsNode()
type JobRunInstanceConnection ¶
type JobRunInstanceConnection = pagination.Connection[*JobRunInstance]
func ListJobRunInstances ¶
func ListJobRunInstances(ctx context.Context, teamSlug slug.Slug, environmentName, jobRunName string, page *pagination.Pagination) (*JobRunInstanceConnection, error)
type JobRunInstanceEdge ¶
type JobRunInstanceEdge = pagination.Edge[*JobRunInstance]
type JobRunState ¶
type JobRunState int
const ( JobRunStateUnknown JobRunState = iota JobRunStatePending JobRunStateRunning JobRunStateSucceeded JobRunStateFailed )
func (JobRunState) IsValid ¶
func (e JobRunState) IsValid() bool
func (JobRunState) MarshalGQL ¶
func (e JobRunState) MarshalGQL(w io.Writer)
func (JobRunState) String ¶
func (e JobRunState) String() string
func (*JobRunState) UnmarshalGQL ¶
func (e *JobRunState) UnmarshalGQL(v interface{}) error
type JobRunStatus ¶
type JobRunStatus struct { State JobRunState `json:"state"` Message string `json:"message"` }
type JobSchedule ¶
type JobTriggeredActivityLogEntry ¶
type JobTriggeredActivityLogEntry struct {
activitylog.GenericActivityLogEntry
}
type TeamInventoryCountJobs ¶
type TeamJobsFilter ¶
type TeamJobsFilter struct {
Name string `json:"name"`
}
type TriggerJobInput ¶
Click to show internal directories.
Click to hide internal directories.