Documentation
¶
Overview ¶
sproxyd project sproxyd.go
sproxyd project sproxyd.go
Index ¶
- Constants
- Variables
- func Deleteobject(sproxyRequest *HttpRequest) (*http.Response, error)
- func DoRequest(hspool hostpool.HostPool, client *http.Client, req *http.Request, ...) (*http.Response, error)
- func DoRequestTest(hspool hostpool.HostPool, client *http.Client, req *http.Request, ...) (*http.Response, error)
- func GetMetadata(sproxydRequest *HttpRequest) (*http.Response, error)
- func Getobject(sproxydRequest *HttpRequest) (*http.Response, error)
- func PutObj(sproxydRequest *HttpRequest, update bool, object []byte) (*http.Response, error)
- func PutObject(hspool hostpool.HostPool, client *http.Client, path string, object []byte, ...) (*http.Response, error)
- func Putobject(sproxydRequest *HttpRequest, object []byte) (*http.Response, error)
- func SetNewProxydHost()
- func SetNewProxydHost1(urls string, driver string)
- func SetNewTargetProxydHost()
- func SetNewTargetProxydHost1(urls string, driver string)
- func UpdMetadata(client *http.Client, path string, updHeader map[string]string) (*http.Response, error)
- func UpdObject(hspool hostpool.HostPool, client *http.Client, path string, object []byte, ...) (*http.Response, error)
- func Updmetadata(sproxydRequest *HttpRequest) (*http.Response, error)
- func Updobject(sproxydRequest *HttpRequest, object []byte) (*http.Response, error)
- type HttpRequest
- type HttpResponse
Constants ¶
View Source
const ( Proxy = "proxy" TIME_OUT = 30 // second COPY_TIMEOUT = 20 // second WRITE_TIMEOUT = 20 // second READ_TIMEOUT = 20 //second CONNECT_TIMEOUT = 1000 // ms KEEP_ALIVE = 20 //sec RETRY = 5 WAITTIME = 100 )
Variables ¶
View Source
var ( Url = "" /* 191-byte string literal not displayed */ TargetUrl = "" /* 149-byte string literal not displayed */ Debug bool /* debug mode */ Test bool /* test mode */ HP hostpool.HostPool /* source hosts pool */ TargetHP hostpool.HostPool /* destination hostpool */ Driver = "bpchord" /* default source sproxyd driver */ TargetDriver = "bpchord" /* destination sproxy driver */ DummyHost = "http://0.0.0.0:81/" /* Used by doRequest.go to build the url with hostpool */ DummyHost2 = "http://0.0.0.0:82/" /* Used by doRequest.go to build the url with hostpool */ Timeout = time.Duration(TIME_OUT) /* GET/PUT timeout */ CopyTimeout = time.Duration(COPY_TIMEOUT * time.Second) /* Copy PNsend 5sec*/ WriteTimeout = time.Duration(WRITE_TIMEOUT * time.Second) /* send time out */ ReadTimeout = time.Duration(READ_TIMEOUT * time.Second) /* receive timeout */ ConnectionTimeout = time.Duration(CONNECT_TIMEOUT * time.Millisecond) /* connection timeout */ ConnectionKeepAlive = time.Duration(KEEP_ALIVE * time.Second) Waittime = time.Duration(WAITTIME * time.Millisecond) /* wait between 2 retries */ DoRetry = RETRY /* number of low level sproxyd Retry if errors */ Host = []string{} Env = "prod" TargetHost = []string{} TargetEnv = "osa" Num200, Num404, Num412 = 0, 0, 0 Transport = &http.Transport{ DialContext: (&net.Dialer{ Timeout: ConnectionTimeout, KeepAlive: ConnectionKeepAlive, }).DialContext, TLSHandshakeTimeout: 10 * time.Second, ForceAttemptHTTP2: true, MaxIdleConns: 100, IdleConnTimeout: 90 * time.Second, ExpectContinueTimeout: 1 * time.Second, } )
Functions ¶
func Deleteobject ¶
func Deleteobject(sproxyRequest *HttpRequest) (*http.Response, error)
func DoRequestTest ¶
func GetMetadata ¶
func GetMetadata(sproxydRequest *HttpRequest) (*http.Response, error)
func SetNewProxydHost ¶
func SetNewProxydHost()
func SetNewProxydHost1 ¶
func SetNewTargetProxydHost ¶
func SetNewTargetProxydHost()
func SetNewTargetProxydHost1 ¶
func UpdMetadata ¶
func Updmetadata ¶
func Updmetadata(sproxydRequest *HttpRequest) (*http.Response, error)
Types ¶
Click to show internal directories.
Click to hide internal directories.