{"modulePath":"github.com/dolfly/x","version":"v0.28.2","isLatest":true,"isStandardLibrary":false,"goos":"linux","goarch":"amd64","docs":"# package plugin\n\nPackage plugin manages the lifecycle of external plugin subprocesses spawned from plugin configuration.\n\nPlugins are normally external processes that TNET connects to over HTTP or gRPC. When a plugin config carries a non-empty Command, Spawn starts it as a child process of TNET so that a single invocation brings up the whole stack, and Shutdown terminates it again.\n\n## Functions\n\n```go\nfunc Shutdown()\n```\nShutdown terminates all spawned plugin subprocesses.\n\n```go\nfunc Spawn(command []string) error\n```\nSpawn launches command as a child process, deduplicated by its argv string. An empty command is a no-op. A previously-started command that is still running is reused. It returns an error only when the process fails to start.\n\n","path":"github.com/dolfly/x/plugin","name":"plugin","synopsis":"Package plugin manages the lifecycle of external plugin subprocesses spawned from plugin configuration.","isRedistributable":true}
