2020-01-13 17:44:59 +00:00
|
|
|
package statemachine
|
2020-01-06 21:01:49 +00:00
|
|
|
|
|
|
|
import "context"
|
|
|
|
|
|
|
|
type Context struct {
|
|
|
|
ctx context.Context
|
|
|
|
send func(evt interface{}) error
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ctx *Context) Context() context.Context {
|
|
|
|
return ctx.ctx
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ctx *Context) Send(evt interface{}) error {
|
|
|
|
return ctx.send(evt)
|
|
|
|
}
|