server

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2020 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidStateTransition = fmt.Errorf("invalid state transition")
)

Functions

This section is empty.

Types

type DB

type DB struct {
	*gorm.DB
}

func NewDB

func NewDB(driver string, address string) (*DB, error)

func (*DB) Transaction

func (s *DB) Transaction(fc func(tx *DB) error) (err error)

type JobObserver

type JobObserver struct {
	// contains filtered or unexported fields
}

func (*JobObserver) Check

func (s *JobObserver) Check() error

func (*JobObserver) Start

func (s *JobObserver) Start()

type Scheduler

type Scheduler struct {
	// contains filtered or unexported fields
}

func (*Scheduler) GetAction

func (*Scheduler) GetActionControl

func (*Scheduler) GetWorkspaceVersion

func (*Scheduler) UpdateJobLog

func (*Scheduler) UpdateJobStatus

type Server

type Server struct {
	// contains filtered or unexported fields
}

func New

func New(projects map[string]*api.Project, db *DB, git utils.Git) *Server

func (*Server) StartJobObserver

func (s *Server) StartJobObserver() error

func (*Server) StartScheduler

func (s *Server) StartScheduler(address string) error

func (*Server) StartWeb

func (s *Server) StartWeb(address string) error

type Web

type Web struct {
	// contains filtered or unexported fields
}

func (*Web) ApproveJob

func (s *Web) ApproveJob(_ context.Context, req *api.ApproveJobRequest) (*api.ApproveJobResponse, error)

func (*Web) CancelJob

func (s *Web) CancelJob(_ context.Context, req *api.CancelJobRequest) (*api.CancelJobResponse, error)

func (*Web) GetJob

func (s *Web) GetJob(_ context.Context, req *api.GetJobRequest) (*api.GetJobResponse, error)

func (*Web) ListProjects

func (*Web) ListWorkspaces

func (*Web) RefreshProject

func (*Web) SubmitJob

func (s *Web) SubmitJob(_ context.Context, req *api.SubmitJobRequest) (*api.SubmitJobResponse, error)

Jump to

Keyboard shortcuts

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