29 lines
592 B
Go
29 lines
592 B
Go
|
package client
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
|
||
|
"git.loafle.net/commons_go/logging"
|
||
|
cunu "git.loafle.net/commons_go/util/net/url"
|
||
|
cwfc "git.loafle.net/commons_go/websocket_fasthttp/client"
|
||
|
|
||
|
"git.loafle.net/overflow/overflow_probes/config"
|
||
|
)
|
||
|
|
||
|
func NewSocketBuilder(entryPath string) *SocketBuilders {
|
||
|
sb := &SocketBuilders{}
|
||
|
url, err := cunu.Join(config.Config.Central.URL, entryPath)
|
||
|
if nil != err {
|
||
|
logging.Logger().Error(fmt.Sprintf("Auth: Cannot create SocketBuilder %v", err))
|
||
|
return nil
|
||
|
}
|
||
|
sb.URL = url
|
||
|
sb.TLSConfig = nil
|
||
|
|
||
|
return sb
|
||
|
}
|
||
|
|
||
|
type SocketBuilders struct {
|
||
|
cwfc.SocketBuilders
|
||
|
}
|