Documentation ¶
Index ¶
Constants ¶
View Source
const ( STATUS_INIT = 0 STATUS_ING = 1 STATUS_DONE = 2 STATUS_FAILED = 3 )
View Source
const ( DEPLOY_PARALLEL = 1 DEPLOY_SERIAL = 2 )
View Source
const (
COMMAND_TIMEOUT = 3600
)
Variables ¶
This section is empty.
Functions ¶
func ExistsTask ¶
func NewTask ¶
func NewTask(id, mode int, deploys []*Deploy, startFn, finishFn CallbackFn, taskFn TaskCallbackFn) error
Types ¶
type CallbackFn ¶
type CallbackFn func(int, int, int, []*ServerResult)
type Deploy ¶
type Deploy struct { ID int User string PreCmd string PostCmd string DeployPath string DeployTmpPath string PackFile string // contains filtered or unexported fields }
func (*Deploy) Result ¶
func (d *Deploy) Result() ([]*ServerResult, int)
type DeployResult ¶
type DeployResult struct { ID int Status int ServerRest []*ServerResult }
func StatusTask ¶
func StatusTask(id int) []*DeployResult
type Server ¶
type Server struct { ID int Addr string User string Port int PreCmd string PostCmd string Key string PackFile string DeployTmpPath string DeployPath string // contains filtered or unexported fields }
func (*Server) Result ¶
func (srv *Server) Result() *ServerResult
type ServerResult ¶
type ServerResult struct { ID int TaskResult []*command.TaskResult Status int Error error }
type TaskCallbackFn ¶
Click to show internal directories.
Click to hide internal directories.