{"modulePath":"github.com/mintoolkit/mint","version":"v0.0.0-20261102071007-1bc8c79add0d","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package execution\n\n## Types\n\n```go\ntype Interface interface {\n\tState() string\n\tCommands() \u003c-chan command.Message\n\tPubEvent(etype event.Type, data ...interface{})\n\tClose()\n\n\t// Lifecycle hooks (extension points)\n\tHookSensorPostStart()\n\tHookSensorPreShutdown()\n\tHookMonitorPreStart()\n\tHookTargetAppRunning()\n\tHookMonitorPostShutdown()\n\tHookMonitorFailed()\n}\n```\n\n```go\nfunc NewControlled(\n\tctx context.Context,\n\tlifecycleHookCommand string,\n) (Interface, error)\n```\n\n```go\nfunc NewStandalone(\n\tctx context.Context,\n\tcommandFileName string,\n\teventFileName string,\n\tlifecycleHookCommand string,\n) (Interface, error)\n```\n\n```go\ntype LifecycleEvent struct {\n\tTimestamp int64  `json:\"ts\"`\n\tSeqNumber uint64 `json:\"sn\"`\n}\n```\ntodo: add 'kind' to the lifecycle event and pass the whole event to the lifecycle hook command\n\n","path":"github.com/mintoolkit/mint/pkg/app/sensor/execution","name":"execution","synopsis":"","isRedistributable":true}
