Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: CLB Excel导入-创建四层监听器 --story=119589495 #1074

Open
wants to merge 7 commits into
base: feat-loadbalancer
Choose a base branch
from

Conversation

KooKouse
Copy link
Contributor

No description provided.

@KooKouse KooKouse changed the title GitHub/feat excel listener layer4 feat: CLB Excel导入-创建四层监听器 --story=119589495 Sep 25, 2024
@KooKouse KooKouse force-pushed the github/feat-excel-listener-layer4 branch from 5482164 to 437b3e9 Compare September 25, 2024 09:57
@KooKouse KooKouse force-pushed the github/feat-excel-listener-layer4 branch from 60752c6 to 5756fb6 Compare October 8, 2024 08:42
@KooKouse KooKouse force-pushed the github/feat-excel-listener-layer4 branch from 5756fb6 to 066ad74 Compare October 8, 2024 10:08
@KooKouse KooKouse force-pushed the github/feat-excel-listener-layer4 branch from f18e080 to c4b0712 Compare October 9, 2024 07:17
@KooKouse KooKouse force-pushed the github/feat-excel-listener-layer4 branch from b33e8f2 to ceac23a Compare October 10, 2024 01:16
return c.details, nil
}

const createLayer4ListenerExcelTableLen = 7
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是8吧?下面104行data[7]是第8个

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

默认输入的长度为7
加上用户备注的长度为8

77行这里处理了数据填写不全的情况,避免出现数组越界的问题

default:
return fmt.Errorf("HealthCheck: invalid input: %s", data[6])
}
if len(data) > createLayer4ListenerExcelTableLen {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

现在不会走到这,77行已经小于的情况报错了

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是大于的判断,如果用户填写了 用户备注,则会把它记录进去。

return err
}
if rule == nil {
logs.Errorf("loadbalancer(%s) listener(%s) exist, but url rule not found",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

日志需要加上rid,而且不建议在日志开头使用变量,“loadbalancer(%s) listener(%s) exist”,不利于排查问题时的日志检索呢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants