add skip for check exist method && handler for user methods
This commit is contained in:
1 parent
08c4fb9bee
commit
91a14f9f23
14 files changed
+136
-87
No files matched your search
@@ -41,12 +41,13 @@ var upgrader = websocket.FastHTTPUpgrader{
|
||||
}
|
||||
|
||||
type websocketProxy struct {
|
||||
addrs *RoundRobinAddrs
|
||||
skipAuth bool
|
||||
addrs *RoundRobinAddrs
|
||||
skipAuth bool
|
||||
skipExistCheck bool
|
||||
}
|
||||
|
||||
func NewProxy(skipAuth bool) *websocketProxy {
|
||||
return &websocketProxy{addrs: nil, skipAuth: skipAuth}
|
||||
func NewProxy(skipAuth, skipExistCheck bool) *websocketProxy {
|
||||
return &websocketProxy{addrs: nil, skipAuth: skipAuth, skipExistCheck: skipExistCheck}
|
||||
}
|
||||
|
||||
func (p *websocketProxy) Consumer(addressList []structure.AddressConfiguration) bool {
|
||||
@@ -129,6 +130,10 @@ func (p *websocketProxy) SkipAuth() bool {
|
||||
return p.skipAuth
|
||||
}
|
||||
|
||||
func (p *websocketProxy) SkipExistCheck() bool {
|
||||
return p.skipExistCheck
|
||||
}
|
||||
|
||||
// no-op
|
||||
func (p *websocketProxy) Close() {
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user