Documentation ¶
Index ¶
- Constants
- Variables
- func DialWS(urlStr string, requestHeader http.Header) (*websocket.Conn, *http.Response, error)
- func IsExpectedWSCloseError(err error) bool
- func NewPipeFromEnds(local, remote io.ReadWriter, c Client, id string, pipeType string, key string, ...) (pipeutil.Pipe, error)
- type Client
- type Token
- type WsReceivePacket
Constants ¶
View Source
const ( BaseUrl = "%s://%s/websocket?group=from_agent:%s&secret_key=devops_ws&key=%s&clusterId=%s&processor=%s&token=%s&version=%s" BaseUrlForDownloadLog = "%s://%s/websocket?group=from_agent:%s&secret_key=devops_ws&key=%s&clusterId=%s&processor=%s&token=%s&version=%s&instanceId=%s" )
View Source
const ( // Time allowed to write a message to the peer. WriteWait = 10 * time.Second )
Variables ¶
Functions ¶
func IsExpectedWSCloseError ¶
Types ¶
type Client ¶
type Client interface { Loop(stopCh <-chan struct{}, done *sync.WaitGroup) PipeConnection(pipeID string, key string, token string, pipe pipeutil.Pipe) error PipeClose(pipeID string, pipe pipeutil.Pipe) error URL() *url.URL HandleDownloadLog(key, token, instanceId string, logReadCloser io.ReadCloser) }
Click to show internal directories.
Click to hide internal directories.