syncd: github.com/dreamans/syncd/deploy Index | Files

package deploy

import "github.com/dreamans/syncd/deploy"

Index

Package Files

deploy.go server.go task.go

Constants

const (
    STATUS_INIT   = 0
    STATUS_ING    = 1
    STATUS_DONE   = 2
    STATUS_FAILED = 3
)
const (
    DEPLOY_PARALLEL = 1
    DEPLOY_SERIAL   = 2
)
const (
    COMMAND_TIMEOUT = 3600
)

func ExistsTask Uses

func ExistsTask(id int) bool

func NewServer Uses

func NewServer(srv *Server)

func NewTask Uses

func NewTask(id, mode int, deploys []*Deploy, startFn, finishFn CallbackFn, taskFn TaskCallbackFn) error

func StopTask Uses

func StopTask(id int)

type CallbackFn Uses

type CallbackFn func(int, int, int, []*ServerResult)

type Deploy Uses

type Deploy struct {
    ID            int
    User          string
    PreCmd        string
    PostCmd       string
    DeployPath    string
    DeployTmpPath string
    PackFile      string
    // contains filtered or unexported fields
}

func (*Deploy) AddServer Uses

func (d *Deploy) AddServer(id int, addr string, port int)

func (*Deploy) Parallel Uses

func (d *Deploy) Parallel()

func (*Deploy) Result Uses

func (d *Deploy) Result() ([]*ServerResult, int)

func (*Deploy) Serial Uses

func (d *Deploy) Serial()

func (*Deploy) Terminate Uses

func (d *Deploy) Terminate()

type DeployResult Uses

type DeployResult struct {
    ID         int
    Status     int
    ServerRest []*ServerResult
}

func StatusTask Uses

func StatusTask(id int) []*DeployResult

type Server Uses

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) Deploy Uses

func (srv *Server) Deploy()

func (*Server) Result Uses

func (srv *Server) Result() *ServerResult

func (*Server) Terminate Uses

func (srv *Server) Terminate()

type ServerResult Uses

type ServerResult struct {
    ID         int
    TaskResult []*command.TaskResult
    Status     int
    Error      error
}

type TaskCallbackFn Uses

type TaskCallbackFn func(int, int)

Package deploy imports 5 packages (graph) and is imported by 1 packages. Updated 2019-03-30. Refresh now. Tools for package owners.