feat: add New

This commit is contained in:
lynx
2023-07-27 23:26:05 +08:00
parent 92f8493648
commit 7aee0eddcb

View File

@@ -25,6 +25,14 @@ type Engine struct {
errChan chan error
}
func New(opt *Option) (*Engine, error) {
var (
e = new(Engine)
)
return e, nil
}
func (e *Engine) Start() error {
ctx, cancel := context.WithCancel(context.Background())
e.ctx = ctx