Documentation
¶
Index ¶
- Constants
- func SetLogLevel(lvl log.Level)
- type Spearlet
- func (w *Spearlet) ExecuteTask(taskId int64, funcType task.TaskType, wait bool, method string, data string) (string, error)
- func (w *Spearlet) ExecuteTaskByName(name string, wait bool, method string, data string) (string, error)
- func (w *Spearlet) ExecuteTaskNoMeta(funcName string, funcType task.TaskType, wait bool, method string, data string) (string, error)
- func (w *Spearlet) Initialize()
- func (w *Spearlet) ListTasks() []string
- func (w *Spearlet) LookupTaskId(name string) (int64, error)
- func (w *Spearlet) StartServer()
- func (w *Spearlet) Stop()
- type SpearletConfig
- type TaskMetaData
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 Spearlet ¶
type Spearlet struct {
SearchPaths []string
// contains filtered or unexported fields
}
func NewSpearlet ¶
func NewSpearlet(cfg *SpearletConfig) *Spearlet
func (*Spearlet) ExecuteTask ¶
func (*Spearlet) ExecuteTaskByName ¶
func (*Spearlet) ExecuteTaskNoMeta ¶
func (*Spearlet) Initialize ¶
func (w *Spearlet) Initialize()
func (*Spearlet) StartServer ¶
func (w *Spearlet) StartServer()
type SpearletConfig ¶
type SpearletConfig struct {
Addr string
Port string
// Search Path
SearchPath []string
// Debug
Debug bool
LocalExecution bool
SpearAddr string
// backend service
StartBackendServices bool
}
func NewExecSpearletConfig ¶
func NewExecSpearletConfig(debug bool, spearAddr string, spath []string, startBackendServices bool) *SpearletConfig
func NewServeSpearletConfig ¶
func NewServeSpearletConfig(addr, port string, spath []string, debug bool, spearAddr string) *SpearletConfig
NewServeSpearletConfig creates a new SpearletConfig
Click to show internal directories.
Click to hide internal directories.