add skip for check exist method && handler for user methods

This commit is contained in:
DeniskaRediska committed 2020-01-17 13:21:23 +03:00
1 parent 08c4fb9bee
commit 91a14f9f23
14 files changed
+136 -87

No files matched your search

+9 -4
View File
@@ -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() {
}