Documentation ¶
Index ¶
- Constants
- func OnBrokerInit(fn func(b mq.Broker) error)
- func OnDatastoreInit(fn func(ds datastore.Datastore) error)
- func RegisterBrokerProvider(name string, provider mq.Provider)
- func RegisterDatastoreProvider(name string, provider datastore.Provider)
- func RegisterEndpoint(method, path string, handler web.HandlerFunc)
- func RegisterJobMiddleware(mw job.MiddlewareFunc)
- func RegisterMounter(runtime, name string, mounter runtime.Mounter)
- func RegisterNodeMiddleware(mw node.MiddlewareFunc)
- func RegisterRuntime(rt runtime.Runtime)
- func RegisterTaskMiddleware(mw task.MiddlewareFunc)
- func RegisterWebMiddleware(mw web.MiddlewareFunc)
- func Run() error
- func SetMode(mode Mode)
- func Start() error
- func SubmitJob(ctx context.Context, ij *input.Job, listeners ...JobListener) (*tork.Job, error)
- func Terminate() error
- type Config
- type Engine
- func (e *Engine) OnBrokerInit(fn func(b mq.Broker) error)
- func (e *Engine) OnDatastoreInit(fn func(ds datastore.Datastore) error)
- func (e *Engine) RegisterBrokerProvider(name string, provider mq.Provider)
- func (e *Engine) RegisterDatastoreProvider(name string, provider datastore.Provider)
- func (e *Engine) RegisterEndpoint(method, path string, handler web.HandlerFunc)
- func (e *Engine) RegisterJobMiddleware(mw job.MiddlewareFunc)
- func (e *Engine) RegisterMounter(rt string, name string, mounter runtime.Mounter)
- func (e *Engine) RegisterNodeMiddleware(mw node.MiddlewareFunc)
- func (e *Engine) RegisterRuntime(rt runtime.Runtime)
- func (e *Engine) RegisterTaskMiddleware(mw task.MiddlewareFunc)
- func (e *Engine) RegisterWebMiddleware(mw web.MiddlewareFunc)
- func (e *Engine) Run() error
- func (e *Engine) SetMode(mode Mode)
- func (e *Engine) Start() error
- func (e *Engine) State() string
- func (e *Engine) SubmitJob(ctx context.Context, ij *input.Job, listeners ...JobListener) (*tork.Job, error)
- func (e *Engine) Terminate() error
- type JobListener
- type Middleware
- type Mode
Constants ¶
View Source
const ( StateIdle = "IDLE" StateRunning = "RUNNING" StateTerminating = "TERMINATING" StateTerminated = "TERMINATED" )
Variables ¶
This section is empty.
Functions ¶
func OnBrokerInit ¶ added in v0.1.55
func OnDatastoreInit ¶ added in v0.1.76
func RegisterBrokerProvider ¶ added in v0.1.16
func RegisterDatastoreProvider ¶ added in v0.1.16
func RegisterEndpoint ¶ added in v0.1.8
func RegisterEndpoint(method, path string, handler web.HandlerFunc)
func RegisterJobMiddleware ¶ added in v0.1.8
func RegisterJobMiddleware(mw job.MiddlewareFunc)
func RegisterMounter ¶ added in v0.1.16
func RegisterNodeMiddleware ¶ added in v0.1.8
func RegisterNodeMiddleware(mw node.MiddlewareFunc)
func RegisterRuntime ¶ added in v0.1.19
func RegisterTaskMiddleware ¶ added in v0.1.8
func RegisterTaskMiddleware(mw task.MiddlewareFunc)
func RegisterWebMiddleware ¶ added in v0.1.8
func RegisterWebMiddleware(mw web.MiddlewareFunc)
Types ¶
type Config ¶ added in v0.1.8
type Config struct { Mode Mode Middleware Middleware Endpoints map[string]web.HandlerFunc }
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func (*Engine) OnBrokerInit ¶ added in v0.1.55
func (*Engine) OnDatastoreInit ¶ added in v0.1.76
func (*Engine) RegisterBrokerProvider ¶ added in v0.1.16
func (*Engine) RegisterDatastoreProvider ¶ added in v0.1.16
func (*Engine) RegisterEndpoint ¶
func (e *Engine) RegisterEndpoint(method, path string, handler web.HandlerFunc)
func (*Engine) RegisterJobMiddleware ¶ added in v0.1.3
func (e *Engine) RegisterJobMiddleware(mw job.MiddlewareFunc)
func (*Engine) RegisterMounter ¶ added in v0.1.16
func (*Engine) RegisterNodeMiddleware ¶ added in v0.1.3
func (e *Engine) RegisterNodeMiddleware(mw node.MiddlewareFunc)
func (*Engine) RegisterRuntime ¶ added in v0.1.19
func (*Engine) RegisterTaskMiddleware ¶ added in v0.1.3
func (e *Engine) RegisterTaskMiddleware(mw task.MiddlewareFunc)
func (*Engine) RegisterWebMiddleware ¶ added in v0.1.8
func (e *Engine) RegisterWebMiddleware(mw web.MiddlewareFunc)
type JobListener ¶ added in v0.1.67
type Middleware ¶ added in v0.1.8
type Middleware struct { Web []web.MiddlewareFunc Task []task.MiddlewareFunc Job []job.MiddlewareFunc Node []node.MiddlewareFunc }
Click to show internal directories.
Click to hide internal directories.