mirror of
https://github.com/wlynxg/NetHive.git
synced 2025-10-05 23:16:54 +08:00
feat: add New
This commit is contained in:
@@ -25,6 +25,14 @@ type Engine struct {
|
|||||||
errChan chan error
|
errChan chan error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func New(opt *Option) (*Engine, error) {
|
||||||
|
var (
|
||||||
|
e = new(Engine)
|
||||||
|
)
|
||||||
|
|
||||||
|
return e, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (e *Engine) Start() error {
|
func (e *Engine) Start() error {
|
||||||
ctx, cancel := context.WithCancel(context.Background())
|
ctx, cancel := context.WithCancel(context.Background())
|
||||||
e.ctx = ctx
|
e.ctx = ctx
|
||||||
|
Reference in New Issue
Block a user