{"modulePath":"github.com/AliceO2Group/Control","version":"v1.51.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package sm\n\nPackage sm provides state machine functionality for task lifecycle management, including state transitions and event handling.\n\n## Constants\n\n```go\nconst (\n\tCONFIGURE = Event(\"CONFIGURE\")\n\tRESET     = Event(\"RESET\")\n\tSTART     = Event(\"START\")\n\tSTOP      = Event(\"STOP\")\n\tEXIT      = Event(\"EXIT\")\n\tGO_ERROR  = Event(\"GO_ERROR\")\n\tRECOVER   = Event(\"RECOVER\")\n)\n```\n\n## Types\n\n```go\ntype Event string\n```\n\n```go\nfunc (e Event) String() string\n```\n\n```go\ntype EventArgs map[string]string\n```\n\n```go\ntype State int\n```\n\n```go\nconst (\n\tUNKNOWN State = iota\n\tSTANDBY\n\tCONFIGURED\n\tRUNNING\n\tERROR\n\tDONE\n\tMIXED\n\tINVARIANT\n)\n```\n\n```go\nfunc StateFromString(s string) State\n```\n\n```go\nfunc (s State) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (s State) String() string\n```\n\n```go\nfunc (s State) X(other State) State\n```\n\n```go\ntype Transition struct {\n\tEvt  Event\n\tSrc  State\n\tDst  State\n\tArgs EventArgs\n}\n```\n\n","path":"github.com/AliceO2Group/Control/core/task/sm","name":"sm","synopsis":"Package sm provides state machine functionality for task lifecycle management, including state transitions and event handling.","isRedistributable":true}
