LoggerbyInfoOneWayWithContext is the proxy function for the method defined in the tars file, with the context
(tarsCtx context.Context, info *LogInfo, buffer []string, opts ...map[string]string)
| 299 | |
| 300 | // LoggerbyInfoOneWayWithContext is the proxy function for the method defined in the tars file, with the context |
| 301 | func (obj *Log) LoggerbyInfoOneWayWithContext(tarsCtx context.Context, info *LogInfo, buffer []string, opts ...map[string]string) (err error) { |
| 302 | var ( |
| 303 | length int32 |
| 304 | have bool |
| 305 | ty byte |
| 306 | ) |
| 307 | buf := codec.NewBuffer() |
| 308 | err = info.WriteBlock(buf, 1) |
| 309 | if err != nil { |
| 310 | return err |
| 311 | } |
| 312 | |
| 313 | err = buf.WriteHead(codec.LIST, 2) |
| 314 | if err != nil { |
| 315 | return err |
| 316 | } |
| 317 | err = buf.WriteInt32(int32(len(buffer)), 0) |
| 318 | if err != nil { |
| 319 | return err |
| 320 | } |
| 321 | for _, v := range buffer { |
| 322 | err = buf.WriteString(v, 0) |
| 323 | if err != nil { |
| 324 | return err |
| 325 | } |
| 326 | } |
| 327 | |
| 328 | var statusMap map[string]string |
| 329 | var contextMap map[string]string |
| 330 | if len(opts) == 1 { |
| 331 | contextMap = opts[0] |
| 332 | } else if len(opts) == 2 { |
| 333 | contextMap = opts[0] |
| 334 | statusMap = opts[1] |
| 335 | } |
| 336 | |
| 337 | tarsResp := new(requestf.ResponsePacket) |
| 338 | err = obj.servant.TarsInvoke(tarsCtx, 1, "loggerbyInfo", buf.ToBytes(), statusMap, contextMap, tarsResp) |
| 339 | if err != nil { |
| 340 | return err |
| 341 | } |
| 342 | |
| 343 | _ = length |
| 344 | _ = have |
| 345 | _ = ty |
| 346 | return nil |
| 347 | } |
| 348 | |
| 349 | // Dispatch is used to call the server side implement for the method defined in the tars file. withContext shows using context or not. |
| 350 | func (obj *Log) Dispatch(tarsCtx context.Context, val interface{}, tarsReq *requestf.RequestPacket, tarsResp *requestf.ResponsePacket, withContext bool) (err error) { |
nothing calls this directly
no test coverage detected