Documentation ¶
Index ¶
- Constants
- type Config
- type Plugin
- func (server *Plugin) CmdFactory(env server.Env) (func() *exec.Cmd, error)
- func (server *Plugin) Init(cfg config.Configurer, log log.Logger) error
- func (server *Plugin) Name() string
- func (server *Plugin) NewWorker(ctx context.Context, env server.Env) (worker.BaseProcess, error)
- func (server *Plugin) NewWorkerPool(ctx context.Context, opt poolImpl.Config, env server.Env) (pool.Pool, error)
- func (server *Plugin) Serve() chan error
- func (server *Plugin) Stop() error
Constants ¶
View Source
const PluginName = "server"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Command to run as application. Command string // User to run application under. User string // Group to run application under. Group string // Env represents application environment. Env server.Env // Listen defines connection method and factory to be used to connect to workers: // "pipes", "tcp://:6001", "unix://rr.sock" // This config section must not change on re-configuration. Relay string // RelayTimeout defines for how long socket factory will be waiting for worker connection. This config section // must not change on re-configuration. Defaults to 60s. RelayTimeout time.Duration }
Config config combines factory, pool and cmd configurations.
func (*Config) InitDefaults ¶
func (cfg *Config) InitDefaults()
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
Plugin manages worker
func (*Plugin) CmdFactory ¶
CmdFactory provides worker command factory assocated with given context.
Click to show internal directories.
Click to hide internal directories.