DubboCtx,grpcCtx,WebSocketCtx,补充IsCloneable,Clone方法,

This commit is contained in:
chenjiekun
2023-03-01 10:19:27 +08:00
parent cc04dd43a9
commit 8e8b2766e4
4 changed files with 49 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ package http_context
import (
"errors"
"fmt"
eoscContext "github.com/eolinker/eosc/eocontext"
"io"
"net"
"sync"
@@ -79,3 +80,15 @@ func (w *WebsocketContext) Assert(i interface{}) error {
}
return fmt.Errorf("not suport:%s", config.TypeNameOf(i))
}
func (w *WebsocketContext) IsCloneable() bool {
return false
}
func (w *WebsocketContext) Clone() (eoscContext.EoContext, error) {
if !w.IsCloneable() {
return nil, fmt.Errorf("%s %w", "WebsocketContext", eoscContext.ErrEoCtxUnCloneable)
}
//TODO
return nil, nil
}