Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackgroundJobTriggerResponse ¶
type BackgroundJobTriggerResponse struct {
ID string `json:"id"`
}
type BackgroundJobsClient ¶
type BackgroundJobsClient interface {
TriggerProjectsRefreshService(cloneUrl string, branch string, githubToken string, repoFullName string, orgId string) (*BackgroundJobTriggerResponse, error)
}
func GetBackgroundJobsClient ¶
func GetBackgroundJobsClient() (BackgroundJobsClient, error)
type FlyIOMachineJobClient ¶
type FlyIOMachineJobClient struct{}
func (FlyIOMachineJobClient) TriggerProjectsRefreshService ¶
func (f FlyIOMachineJobClient) TriggerProjectsRefreshService(cloneUrl string, branch string, githubToken string, repoFullName string, orgId string) (*BackgroundJobTriggerResponse, error)
type JobOptions ¶
type JobOptions struct {
// Identity
NamePrefix string // e.g. "projects-refresh"
ContainerName string // e.g. "projects-refresh"
Image string // container image (fallback to k.image if empty)
Labels map[string]string // extra labels to place on Job/Pod
Annotations map[string]string // annotations on Pod template
// Runtime / Pod
ServiceAccountName string
Command []string
Args []string
Env map[string]string // simple key/val envs
EnvVars []corev1.EnvVar // advanced envs (e.g. SecretKeyRef), appended after Env
Volumes []corev1.Volume
VolumeMounts []corev1.VolumeMount
NodeSelector map[string]string
Tolerations []corev1.Toleration
// Resources (defaults if empty)
CPU string // e.g. "1", "500m"
Memory string // e.g. "256Mi"
// Job policy (defaults if zero)
BackoffLimit *int32
TTLSecondsAfterFinish *int32
ActiveDeadlineSeconds *int64
RestartPolicy corev1.RestartPolicy
}
type K8sJobClient ¶
type K8sJobClient struct {
// contains filtered or unexported fields
}
func (K8sJobClient) TriggerProjectsRefreshService ¶
func (k K8sJobClient) TriggerProjectsRefreshService( cloneUrl, branch, githubToken, repoFullName, orgId string, ) (*BackgroundJobTriggerResponse, error)
type LocalExecJobClient ¶
type LocalExecJobClient struct{}
func (LocalExecJobClient) TriggerProjectsRefreshService ¶
func (f LocalExecJobClient) TriggerProjectsRefreshService( cloneUrl, branch, githubToken, repoFullName, orgId string, ) (*BackgroundJobTriggerResponse, error)
TriggerProjectsRefreshLocal starts a local binary with the required environment. Binary path is taken from PROJECTS_REFRESH_BIN (fallback: ./projects-refresh-service). It does NOT wait for completion; it returns as soon as the process starts successfully.
type MachineConfig ¶
type MachineConfig struct {
Name string `json:"name"`
Config struct {
Image string `json:"image"`
Env struct {
CloneUrl string `json:"DIGGER_GITHUB_REPO_CLONE_URL"`
Branch string `json:"DIGGER_GITHUB_REPO_CLONE_BRANCH"`
GithubToken string `json:"DIGGER_GITHUB_TOKEN"`
RepoFullName string `json:"DIGGER_REPO_FULL_NAME"`
OrgId string `json:"DIGGER_ORG_ID"`
} `json:"env"`
Guest struct {
CPUs int `json:"cpus"`
CPUKind string `json:"cpu_kind"`
MemoryMB int `json:"memory_mb"`
} `json:"guest"`
AutoDestroy bool `json:"auto_destroy"`
} `json:"config"`
}
type MachineResponse ¶
type MachineResponse struct {
ID string `json:"id"`
}
type QueuedResponse ¶
type QueuedResponse struct {
Queued string `json:"queued"`
}
Click to show internal directories.
Click to hide internal directories.