Documentation ¶
Index ¶
- Constants
- func ExecuteHandler(ctx context.Context, content interface{}, encode wire.EncoderFunc) error
- func NewFlavour(config Config) run.FlavourFunc
- func RunDockerContainerHandler(ctx context.Context, content interface{}, encode wire.EncoderFunc) error
- type Config
- type EmbeddedFunc
- type HandlerFunc
- type Router
Constants ¶
const DefaultArg = "isolator"
DefaultArg is the default CLI arg for starting the executor server.
Variables ¶
This section is empty.
Functions ¶
func ExecuteHandler ¶ added in v0.6.0
func ExecuteHandler(ctx context.Context, content interface{}, encode wire.EncoderFunc) error
ExecuteHandler is a standard handler handling Execute command.
func NewFlavour ¶ added in v0.6.3
func NewFlavour(config Config) run.FlavourFunc
NewFlavour returns a flavour catching a request to start the executor server. If command is not related, then the standard application function is called.
func RunDockerContainerHandler ¶ added in v0.9.0
func RunDockerContainerHandler(ctx context.Context, content interface{}, encode wire.EncoderFunc) error
RunDockerContainerHandler is a standard handler for RunDockerContainer command.
Types ¶
type Config ¶ added in v0.6.0
type Config struct { // Roouter provide handlers for commands. Router Router // ExecutorArg is the CLI arg on calling binary which starts the executor server. // See `executor.Catch`. ExecutorArg string }
Config is the config of executor server.
type EmbeddedFunc ¶ added in v0.10.0
EmbeddedFunc defines embedded function.
type HandlerFunc ¶ added in v0.6.0
type HandlerFunc func(ctx context.Context, content interface{}, encode wire.EncoderFunc) error
HandlerFunc defines handler for content.
func NewInflateDockerImageHandler ¶ added in v0.8.0
func NewInflateDockerImageHandler() HandlerFunc
NewInflateDockerImageHandler creates new standard handler for InflateDockerImage command.
func NewRunEmbeddedFunctionHandler ¶ added in v0.10.0
func NewRunEmbeddedFunctionHandler(funcs map[string]EmbeddedFunc) HandlerFunc
NewRunEmbeddedFunctionHandler returns new handler running embedded function.
type Router ¶ added in v0.6.0
type Router struct {
// contains filtered or unexported fields
}
Router maps content type to its handler.
func (Router) Handler ¶ added in v0.6.0
func (r Router) Handler(content interface{}) (HandlerFunc, error)
Handler returns handler for the content type.
func (Router) RegisterHandler ¶ added in v0.6.0
func (r Router) RegisterHandler(content interface{}, handler HandlerFunc) Router
RegisterHandler registers new handler for the content type.