overflow_probes/commons/central/client/socket_builders.go

31 lines
645 B
Go
Raw Permalink Normal View History

2017-12-01 13:01:46 +00:00
package client
import (
"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 {
2018-03-21 10:22:13 +00:00
logging.Logger().Errorf("Probe: Cannot create SocketBuilder %v", err)
2017-12-01 13:01:46 +00:00
return nil
}
sb.URL = url
sb.TLSConfig = nil
return sb
}
type SocketBuilders struct {
cwfc.SocketBuilders
}
2017-12-08 08:31:45 +00:00
func (sb *SocketBuilders) Validate() {
sb.SocketBuilders.Validate()
}