Documentation ¶
Overview ¶
Package manager provides definition of manager
Index ¶
Constants ¶
View Source
const ( // SigStart is a signal sent to control channel of manager which starts sync of all container SigStart = iota // SigStop is a signal sent to control channel of manager which stops sync of all container SigStop // SigExit is a signal sent to control channel of manager which exits manager run loop SigExit // ExitFinish is a signal from finish channel of manager indicating exit finished ExitFinish // StopFinish is a signal from finish channel of manager indicating stopping job finished StopFinish // StartFinish is a signal from finish channel of manager indicating starting job finished StartFinish )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckPoint ¶ added in v0.12.5
type CheckPoint struct {
WorkerInfo map[string]WorkerCheckPoint `json:"worker_info"`
}
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager holds worker instances
func NewManager ¶
NewManager creates a new manager with attached workers from config
func (*Manager) Exit ¶
func (m *Manager) Exit()
Exit polling, block until finish(may take several seconds)
type MangerStatusSimple ¶
type MangerStatusSimple struct { Running bool WorkerStatus map[string]WorkerStatusSimple }
type RestfulAPI ¶
type RestfulAPI struct {
// contains filtered or unexported fields
}
RestfulAPI is a JSON-like API of given manager
func NewRestfulAPI ¶
func NewRestfulAPI(m *Manager) *RestfulAPI
NewRestfulAPI returns a pointer to RestfulAPI of given manager
func (*RestfulAPI) GetAPIHandler ¶
func (r *RestfulAPI) GetAPIHandler() http.Handler
GetAPIHandler returns handler that could be used for http package
type Status ¶
Status holds the status of a manager and its workers WorkerStatus: key = worker's name, value = worker's status
type WorkerCheckPoint ¶ added in v0.12.5
Click to show internal directories.
Click to hide internal directories.