mirror of
https://github.com/wlynxg/NetHive.git
synced 2025-10-05 06:56:51 +08:00
feat: add New
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user