(ctx context.Context, tag string, reset bool)
| 126 | } |
| 127 | |
| 128 | func (x *XrayHandler) GetOutboundStats(ctx context.Context, tag string, reset bool) (*common.StatResponse, error) { |
| 129 | if tag == "" { |
| 130 | return nil, errors.New("tag required") |
| 131 | } |
| 132 | resp, err := x.QueryStats(ctx, fmt.Sprintf("outbound>>>%s>>>", tag), reset) |
| 133 | if err != nil { |
| 134 | return nil, err |
| 135 | } |
| 136 | |
| 137 | return buildStatResponse(resp.GetStat()), nil |
| 138 | } |
| 139 | |
| 140 | func buildStatResponse(queryStats []*command.Stat) *common.StatResponse { |
| 141 | stats := &common.StatResponse{} |
no test coverage detected