package central import ( "net/http" oocmp "git.loafle.net/overflow/overflow_commons_go/modules/probe" oopccc "git.loafle.net/overflow/overflow_probes/commons/central/client" "git.loafle.net/overflow/overflow_probes/config" ) func NewSocketBuilder(entryPath string) *SocketBuilders { sb := &SocketBuilders{} sb.SocketBuilders = oopccc.NewSocketBuilder(oocmp.HTTPEntry_Probe) if nil == sb.SocketBuilders { return nil } return sb } type SocketBuilders struct { *oopccc.SocketBuilders } func (sb *SocketBuilders) GetRequestHeader() http.Header { header := http.Header{} header.Set(oocmp.HTTPRequestHeaderKey_Probe_Method, oocmp.HTTPRequestHeaderValue_Probe_Method_Connect) header.Set(oocmp.HTTPRequestHeaderKey_Probe_ProbeKey, *config.Config.Probe.Key) return header } func (sb *SocketBuilders) Validate() { sb.SocketBuilders.Validate() }