move implementation to internal/ directory (#828)
This commit is contained in:
committed by
GitHub
parent
b9b9ad10cf
commit
908807bd59
@@ -0,0 +1,36 @@
|
||||
package dataconn
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
const (
|
||||
EndpointPing string = "/v1/ping"
|
||||
EndpointSend string = "/v1/send"
|
||||
EndpointRecv string = "/v1/recv"
|
||||
)
|
||||
|
||||
const (
|
||||
ReqHeader uint32 = 1 + iota
|
||||
ReqStructured
|
||||
ResHeader
|
||||
ResStructured
|
||||
ZFSStream
|
||||
)
|
||||
|
||||
// Note that changing theses constants may break interop with other clients
|
||||
// Aggressive with timing, conservative (future compatible) with buffer sizes
|
||||
const (
|
||||
HeartbeatInterval = 5 * time.Second
|
||||
HeartbeatPeerTimeout = 10 * time.Second
|
||||
RequestHeaderMaxSize = 1 << 15
|
||||
RequestStructuredMaxSize = 1 << 22
|
||||
ResponseHeaderMaxSize = 1 << 15
|
||||
ResponseStructuredMaxSize = 1 << 23
|
||||
)
|
||||
|
||||
// the following are protocol constants
|
||||
const (
|
||||
responseHeaderHandlerOk = "HANDLER OK\n"
|
||||
responseHeaderHandlerErrorPrefix = "HANDLER ERROR:\n"
|
||||
)
|
||||
Reference in New Issue
Block a user