Documentation
¶
Index ¶
- Constants
- func SetLogLevel(lvl log.Level)
- type TaskMetaData
- type Worker
- func (w *Worker) ExecuteTask(taskId int64, funcType task.TaskType, wait bool, method string, data string) (string, error)
- func (w *Worker) Initialize()
- func (w *Worker) ListTasks() []string
- func (w *Worker) LookupTaskId(name string) (int64, error)
- func (w *Worker) StartServer()
- func (w *Worker) Stop()
- type WorkerConfig
Constants ¶
View Source
const ( HeaderFuncId = "Spear-Func-Id" HeaderFuncType = "Spear-Func-Type" HeaderFuncAsync = "Spear-Func-Async" )
Variables ¶
This section is empty.
Functions ¶
func SetLogLevel ¶
Types ¶
type TaskMetaData ¶
type Worker ¶
type Worker struct { SearchPaths []string // contains filtered or unexported fields }
func NewWorker ¶
func NewWorker(cfg *WorkerConfig) *Worker
func (*Worker) ExecuteTask ¶
func (*Worker) Initialize ¶
func (w *Worker) Initialize()
func (*Worker) StartServer ¶
func (w *Worker) StartServer()
type WorkerConfig ¶
type WorkerConfig struct { Addr string Port string // Search Path SearchPath []string // Debug Debug bool LocalExecution bool SpearAddr string }
func NewExecWorkerConfig ¶
func NewExecWorkerConfig(debug bool, spearAddr string) *WorkerConfig
func NewServeWorkerConfig ¶
func NewServeWorkerConfig(addr, port string, spath []string, debug bool, spearAddr string) *WorkerConfig
NewServeWorkerConfig creates a new WorkerConfig
Click to show internal directories.
Click to hide internal directories.