package states
import (
am "github.com/pancsta/asyncmachine-go/pkg/machine"
ssrpc "github.com/pancsta/asyncmachine-go/pkg/rpc/states"
ssam "github.com/pancsta/asyncmachine-go/pkg/states"
)
type WorkerStatesDef struct {
*am .StatesBase
Event string
Value1 string
Value2 string
Value3 string
CallOp string
*ssam .BasicStatesDef
*ssrpc .WorkerStatesDef
}
type WorkerGroupsDef struct {
Values S
}
var WorkerSchema = SchemaMerge (
ssam .BasicSchema ,
ssrpc .WorkerSchema ,
am .Schema {
ws .CallOp : {
Multi : true ,
Require : S {ws .Start },
},
ws .Event : {
Multi : true ,
Require : S {ws .Start },
},
ws .Value1 : {Remove : wg .Values },
ws .Value2 : {Remove : wg .Values },
ws .Value3 : {Remove : wg .Values },
})
var (
ws = am .NewStates (WorkerStatesDef {})
wg = am .NewStateGroups (WorkerGroupsDef {
Values : S {ws .Value1 , ws .Value2 , ws .Value3 },
})
WorkerStates = ws
WorkerGroups = wg
)
The pages are generated with Golds v0.8.2 . (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu .
PR and bug reports are welcome and can be submitted to the issue list .
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds .