Documentation
¶
Index ¶
Constants ¶
View Source
const CollectorServerURI = "/collector"
View Source
const ExecutorServerURI = "/executor"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CollectorInvoker ¶
type CollectorInvoker struct {
*InvokerBase
}
func NewCollectorInvoker ¶
func NewCollectorInvoker(serverHost string, serverPort uint16, user string) *CollectorInvoker
func (*CollectorInvoker) GetInvoker ¶
func (c *CollectorInvoker) GetInvoker() taskmodel.CollectorInvoker
return an invoker function for executor to invoke collector
type CollectorRequestBody ¶
type CollectorRequestBody struct {
Results []taskmodel.SubtaskResult `json:"Results"`
}
collector request body structure
type CollectorServer ¶
type CollectorServer struct { *ServerBase // contains filtered or unexported fields }
the Collector Server receive the requests of subtask results
func NewCollectorServer ¶
func NewCollectorServer(handler taskmodel.CollectorRequestHandler) *CollectorServer
func (*CollectorServer) GetRegister ¶
func (s *CollectorServer) GetRegister() taskmodel.RegisterCollectorRequestHandler
return a register function for collector to register a request handler to hander collector requests
func (*CollectorServer) Serve ¶
func (s *CollectorServer) Serve(serverPort uint16) error
start the collector server to receive requests
type ExecutorInvoker ¶
type ExecutorInvoker struct {
*InvokerBase
}
func NewExecutorInvoker ¶
func NewExecutorInvoker(serverHost string, serverPort uint16, user string) *ExecutorInvoker
func (*ExecutorInvoker) GetInvoker ¶
func (e *ExecutorInvoker) GetInvoker() taskmodel.ExecutorInvoker
return an invoker function for scheduler to invoke the executor executor invoker, send subtasks to the executor
type ExecutorRequestBody ¶
type ExecutorRequestBody struct {
Subtasks []taskmodel.SubtaskBody `json:"Subtasks"`
}
type ExecutorServer ¶
type ExecutorServer struct { *ServerBase // contains filtered or unexported fields }
func NewExecutorServer ¶
func NewExecutorServer(handler taskmodel.ExecutorRequestHandler) *ExecutorServer
func (*ExecutorServer) GetRegister ¶
func (s *ExecutorServer) GetRegister() taskmodel.RegisterExecutorRequestHandler
for executor to register a handler to process executor requests
func (*ExecutorServer) Serve ¶
func (s *ExecutorServer) Serve(serverPort uint16) error
start the executor server to receive requests
func (*ExecutorServer) Shutdown ¶
func (s *ExecutorServer) Shutdown() error
type InvokerBase ¶
type InvokerBase struct { ServerHost string ServerPort uint16 URI string UserName string // contains filtered or unexported fields }
func NewInvokerBase ¶
func NewInvokerBase(serverHost string, serverPort uint16, uri string, user string) *InvokerBase
type ServerBase ¶
type ServerBase struct {
// contains filtered or unexported fields
}
func NewServerBase ¶
func NewServerBase() *ServerBase
func (*ServerBase) Shutdown ¶
func (s *ServerBase) Shutdown() error
Click to show internal directories.
Click to hide internal directories.