Documentation
¶
Index ¶
- Constants
- func ComputeID(dir string) (string, error)
- type APIVersion
- type BuildJob
- type BuildQueue
- type BuildResult
- type JobOutput
- type QueueLogger
- func (l *QueueLogger) Debug(line string)
- func (l *QueueLogger) Debugf(line string, args ...interface{})
- func (l *QueueLogger) Info(line string)
- func (l *QueueLogger) Infof(line string, args ...interface{})
- func (l *QueueLogger) WriteError(err error)
- func (l *QueueLogger) WriteStatus(status string, args ...interface{})
- func (l *QueueLogger) WriteVersion(version *model.Version)
- type Server
- func (s *Server) DeleteVersion(w http.ResponseWriter, r *http.Request)
- func (s *Server) DownloadFile(w http.ResponseWriter, r *http.Request)
- func (s *Server) DownloadVersion(w http.ResponseWriter, r *http.Request)
- func (s *Server) GetCacheHashes(w http.ResponseWriter, r *http.Request)
- func (s *Server) GetDisplayTokenURL(w http.ResponseWriter, r *http.Request)
- func (s *Server) GetVersion(w http.ResponseWriter, r *http.Request)
- func (s *Server) ListVersions(w http.ResponseWriter, r *http.Request)
- func (s *Server) ReadConfig(dir string) (*model.Config, error)
- func (s *Server) ReceiveFile(w http.ResponseWriter, r *http.Request)
- func (s *Server) ReceiveVersion(dir string, id string, logWriter logger.Logger, user string, name string) (*model.Version, error)
- func (s *Server) SendBuildLogs(w http.ResponseWriter, r *http.Request)
- func (s *Server) Start(port int) error
- func (s *Server) UnzipInputToTempDir(r *http.Request, user string, name string) (string, error)
- func (s *Server) VerifyToken(w http.ResponseWriter, r *http.Request)
- func (s *Server) ZipToTempPath(dir string) (string, error)
- type WebHook
Constants ¶
View Source
const ( QueueStateQueued = "queued" QueueStateStillQueued = "still queued" QueueStateRunning = "running" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BuildQueue ¶
type BuildQueue struct {
// contains filtered or unexported fields
}
func NewBuildQueue ¶
func NewBuildQueue(servingPlatform serving.Platform, dockerImageBuilder docker.ImageBuilder, cpuConcurrency int, gpuConcurrency int) *BuildQueue
func (*BuildQueue) Build ¶
func (q *BuildQueue) Build(ctx context.Context, dir string, name string, id string, arch string, config *model.Config, logWriter logger.Logger) (*BuildResult, error)
Build pushes per-arch BuildJobs onto the build queue's job channels and creates result channels for those jobs. It then waits for results on the newly created result channels.
func (*BuildQueue) Start ¶
func (q *BuildQueue) Start(ctx context.Context)
type BuildResult ¶
type BuildResult struct {
// contains filtered or unexported fields
}
type QueueLogger ¶
type QueueLogger struct {
// contains filtered or unexported fields
}
func NewQueueLogger ¶
func NewQueueLogger(ch chan *JobOutput) *QueueLogger
func (*QueueLogger) Debug ¶
func (l *QueueLogger) Debug(line string)
func (*QueueLogger) Debugf ¶
func (l *QueueLogger) Debugf(line string, args ...interface{})
func (*QueueLogger) Info ¶
func (l *QueueLogger) Info(line string)
func (*QueueLogger) Infof ¶
func (l *QueueLogger) Infof(line string, args ...interface{})
func (*QueueLogger) WriteError ¶
func (l *QueueLogger) WriteError(err error)
func (*QueueLogger) WriteStatus ¶
func (l *QueueLogger) WriteStatus(status string, args ...interface{})
func (*QueueLogger) WriteVersion ¶
func (l *QueueLogger) WriteVersion(version *model.Version)
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(cpuConcurrency int, gpuConcurrency int, rawPostUploadHooks []string, rawPostBuildHooks []string, rawPostBuildPrimaryHooks []string, authDelegate string, db database.Database, dockerImageBuilder docker.ImageBuilder, servingPlatform serving.Platform, store storage.Storage) (*Server, error)
func (*Server) DeleteVersion ¶
func (s *Server) DeleteVersion(w http.ResponseWriter, r *http.Request)
func (*Server) DownloadFile ¶
func (s *Server) DownloadFile(w http.ResponseWriter, r *http.Request)
func (*Server) DownloadVersion ¶
func (s *Server) DownloadVersion(w http.ResponseWriter, r *http.Request)
func (*Server) GetCacheHashes ¶
func (s *Server) GetCacheHashes(w http.ResponseWriter, r *http.Request)
func (*Server) GetDisplayTokenURL ¶
func (s *Server) GetDisplayTokenURL(w http.ResponseWriter, r *http.Request)
func (*Server) GetVersion ¶
func (s *Server) GetVersion(w http.ResponseWriter, r *http.Request)
func (*Server) ListVersions ¶
func (s *Server) ListVersions(w http.ResponseWriter, r *http.Request)
func (*Server) ReadConfig ¶
Load the Cog config
func (*Server) ReceiveFile ¶
func (s *Server) ReceiveFile(w http.ResponseWriter, r *http.Request)
func (*Server) ReceiveVersion ¶
func (*Server) SendBuildLogs ¶
func (s *Server) SendBuildLogs(w http.ResponseWriter, r *http.Request)
func (*Server) UnzipInputToTempDir ¶
func (*Server) VerifyToken ¶
func (s *Server) VerifyToken(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.