Go API Documentation

github.com/semaphoreui/semaphore/services/runners

No package summary is available.

Package

Files: 3. Third party imports: 1. Imports from organisation: 0. Tests: 0. Benchmarks: 0.

Types

CommitInfo

This type doesn't have documentation.

Field name Field type Comment
Hash

string

No comment on field.
Message

string

No comment on field.

JobData

This type doesn't have documentation.

Field name Field type Comment
Username

string

No comment on field.
IncomingVersion

*string

No comment on field.
Alias

string

No comment on field.
Task

db.Task

No comment on field.
Template

db.Template

No comment on field.
Inventory

db.Inventory

No comment on field.
InventoryRepository

*db.Repository

No comment on field.
Repository

db.Repository

No comment on field.
Environment

db.Environment

No comment on field.

JobLogger

This type doesn't have documentation.

Field name Field type Comment
Context

string

No comment on field.

JobPool

This type doesn't have documentation.

Field name Field type Comment
logger

chan jobLogRecord

logger channel used to putting log records to database.

register

chan *job

register channel used to put tasks to queue.

runningJobs

map[int]*runningJob

No comment on field.
queue

[]*job

No comment on field.
processing

int32

No comment on field.

JobProgress

This type doesn't have documentation.

Field name Field type Comment
ID

int

No comment on field.
Status

task_logger.TaskStatus

No comment on field.
LogRecords

[]LogRecord

No comment on field.
Commit

*CommitInfo

No comment on field.

JobState

This type doesn't have documentation.

Field name Field type Comment
ID

int

No comment on field.
Status

task_logger.TaskStatus

No comment on field.

LogRecord

This type doesn't have documentation.

Field name Field type Comment
Time

time.Time

No comment on field.
Message

string

No comment on field.

RunnerProgress

This type doesn't have documentation.

Field name Field type Comment
Jobs

[]JobProgress

No comment on field.

RunnerRegistration

This type doesn't have documentation.

Field name Field type Comment
RegistrationToken

string

No comment on field.
Webhook

string

No comment on field.
MaxParallelTasks

int

No comment on field.
PublicKey

*string

No comment on field.

RunnerState

This type doesn't have documentation.

Field name Field type Comment
CurrentJobs

[]JobState

No comment on field.
NewJobs

[]JobData

No comment on field.
AccessKeys

map[int]db.AccessKey

No comment on field.
ClearCache

bool

No comment on field.
CacheCleanProjectID

*int

No comment on field.

job

This type doesn't have documentation.

Field name Field type Comment
username

string

No comment on field.
incomingVersion

*string

No comment on field.
alias

string

No comment on field.
job

*tasks.LocalJob

job presents remote or local job information

status

task_logger.TaskStatus

No comment on field.

jobLogRecord

This type doesn't have documentation.

Field name Field type Comment
taskID

int

No comment on field.
record

LogRecord

No comment on field.

runningJob

This type doesn't have documentation.

Field name Field type Comment
status

task_logger.TaskStatus

No comment on field.
logRecords

[]LogRecord

No comment on field.
job

*tasks.LocalJob

No comment on field.
commit

*CommitInfo

No comment on field.
statusListeners

[]task_logger.StatusListener

No comment on field.
logListeners

[]task_logger.LogListener

No comment on field.
logWG

sync.WaitGroup

No comment on field.

Functions

func (*JobLogger) ActionError

Uses: log.Fields, util.LogErrorF.

func (*JobLogger) Debug

Uses: log.Fields, log.WithFields.

func (*JobLogger) Info

Uses: log.Fields, log.WithFields.

func (*JobLogger) Panic

Uses: log.Fields, log.WithFields.

func (*JobLogger) TaskInfo

Uses: log.Fields, log.WithFields.

func (*JobPool) Register

Uses: fmt.Errorf.

func (*JobPool) Run

Uses: atomic.CompareAndSwapInt32, atomic.StoreInt32, fmt.Errorf, os.Exit, time.NewTicker, time.Second, util.Config.

func (*JobPool) Unregister

Uses: fmt.Errorf, http.Client, http.NewRequest, os.Remove, util.Config.

func (*runningJob) AddLogListener

func (*runningJob) AddStatusListener

func (*runningJob) Log

Uses: tz.Now.

func (*runningJob) LogCmd

func (*runningJob) LogWithTime

func (*runningJob) Logf

Uses: tz.Now.

func (*runningJob) LogfWithTime

Uses: fmt.Sprintf.

func (*runningJob) SetCommit

func (*runningJob) SetStatus

func (*runningJob) WaitLog

Private functions

func decryptChunkedBytes

References: rand.Reader, rsa.DecryptPKCS1v15.

func generatePrivateKey

References: os.Create, util.GeneratePrivateKey.

func loadPrivateKey

References: fmt.Errorf, os.ReadFile, pem.Decode, x509.ParsePKCS1PrivateKey.

func checkNewJobs

checkNewJobs tries to find runner to queued jobs

References: db.TemplateVault, fmt.Errorf, http.Client, http.NewRequest, io.ReadAll, json.Unmarshal, rsa.PrivateKey, strconv.Itoa, tasks.LocalJob, util.Config.

func existsInQueue

func getResponseErrorMessage

References: io.ReadAll, json.Unmarshal, strconv.Itoa.

func hasRunningJobs

func sendProgress

References: bytes.NewBuffer, fmt.Errorf, http.Client, http.NewRequest, json.Marshal, strconv.Itoa, util.Config.

func tryRegisterRunner

References: bytes.NewBuffer, fmt.Errorf, http.Client, http.NewRequest, io.ReadAll, json.Marshal, json.MarshalIndent, json.Unmarshal, log.Info, os.ReadFile, os.WriteFile, util.Config, util.ConfigType.

func logPipe

References: bufio.NewScanner, log.Fields, log.WithError.