types

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bootstrap

type Bootstrap struct {
	ClusterID string `json:"cluster_id"`
	ProjectID string `json:"project_id"`
	PublicKey string `json:"public_key"`
}

type Cluster

type Cluster struct {
	ID         string    `json:"id" gorm:"primaryKey"`
	PrivateKey string    `json:"private_key,omitempty"`
	PublicKey  string    `json:"public_key,omitempty" gorm:"-"`
	CreatedAt  time.Time `json:"created_at"`
	UpdatedAt  time.Time `json:"updated_at"`
}

func (Cluster) GeneratePrivateKeyPEM

func (c Cluster) GeneratePrivateKeyPEM() (string, error)

func (Cluster) PublicKeyPEM

func (c Cluster) PublicKeyPEM() (string, error)

type Code

type Code struct {
	iron.Code
	Name      string     `gorm:"uniqueIndex" json:"name"`
	Schedules []Schedule `gorm:"foreignKey:CodeName;references:Name;constraint:OnDelete:CASCADE" json:"-"`
	Tasks     []Task     `gorm:"foreignKey:CodeName;references:Name;constraint:OnDelete:CASCADE" json:"-"`
}

type DockerCredentials

type DockerCredentials struct {
	ProjectID string `gorm:"foreignKey:ProjectRefer"`
	iron.DockerCredentials
}

type Project

type Project struct {
	ID        string
	Name      string
	CreatedAt time.Time
	UpdatedAt time.Time
}

type Schedule

type Schedule struct {
	iron.Schedule
	CodeID string
}

type Task

type Task struct {
	iron.Task
}

Task represents a task that needs to be scheduled and run on a cluster The task lifecycle states are `new` - New in the system `pending` - Pulled by a runner but not running yet `running` - Running on a worker `done` - Done, success `error` - Error during run

Jump to

Keyboard shortcuts

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