File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ to manage dependencies. The version of Go should be **1.17** or above.
4343``` sh
4444$ git clone https://github.com/$GITHUB_USER /ronykit
4545$ cd ronykit
46- $ git remote add upstream git@github.com:clubpay/kit .git
46+ $ git remote add upstream git@github.com:clubpay/ronykit .git
4747
4848# Never push to the upstream master
4949git remote set-url --push upstream no_push
Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ func (hc *RESTCtx) Error() error {
163163// StatusCode returns the status code of the response
164164func (hc * RESTCtx ) StatusCode () int { return hc .res .StatusCode () }
165165
166- // GetHeader returns the header value for key in the response
166+ // GetHeader returns the header value for the key in the response
167167func (hc * RESTCtx ) GetHeader (key string ) string {
168168 return string (hc .res .Header .Peek (key ))
169169}
@@ -190,7 +190,7 @@ func (hc *RESTCtx) CopyBody(dst []byte) []byte {
190190 return dst
191191}
192192
193- // Release frees the allocates internal resources to be re-used.
193+ // Release frees the allocated internal resources to be re-used.
194194// You MUST NOT refer to any method of this object after calling this method, if
195195// you call any method after Release has been called, the result is unpredictable.
196196func (hc * RESTCtx ) Release () {
Original file line number Diff line number Diff line change @@ -250,12 +250,19 @@ func (wCtx *WebsocketCtx) NetConn() net.Conn {
250250}
251251
252252type WebsocketRequest struct {
253- Predicate string
253+ // Predicate is the routing key for the message, which will be added to the kit.OutgoingRPCContainer
254+ Predicate string
255+ // MessageType is the type of the message, either websocket.TextMessage or websocket.BinaryMessage
254256 MessageType int
255257 ReqMsg kit.Message
256- ResMsg kit.Message
257- ReqHdr Header
258- Callback RPCMessageHandler
258+ // ResMsg is the message that will be used to unmarshal the response.
259+ // You should pass a pointer to the struct that you want to unmarshal the response into.
260+ ResMsg kit.Message
261+ // ReqHdr is the headers that will be added to the kit.OutgoingRPCContainer
262+ ReqHdr Header
263+ // Callback is the callback that will be called when the response is received.
264+ // This MUST BE non-nil otherwise it panics.
265+ Callback RPCMessageHandler
259266}
260267
261268func (wCtx * WebsocketCtx ) Do (ctx context.Context , req WebsocketRequest ) error {
You can’t perform that action at this time.
0 commit comments