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

是否能兼容grpc 1.42之前的版本 #41

Open
Fliv opened this issue Jul 13, 2022 · 0 comments
Open

是否能兼容grpc 1.42之前的版本 #41

Fliv opened this issue Jul 13, 2022 · 0 comments

Comments

@Fliv
Copy link

Fliv commented Jul 13, 2022

dongtai agent在0.3.3版本加入了grpc(github.com/HXSecurity/DongTai-agent-go/run/grpc)支持,引入的grpc版本是1.45,而grpc在1.42版本改了一个函数(attributes.New)的传参格式:

  • 之前版本的调用方式是:func New(kvs ...interface{}) *Attributes
  • 1.42之后是:func New(key, value interface{}) *Attributes

我们框架使用的grpc1.40,在引入dongtai agent(0.3.3之后版本)之后go mod会自动更新grpc版本到1.45,导致运行时候报错:

too many arguments in call to attributes.New
	have (string, string, string)
	want (interface{}, interface{}) 

框架代码没法改动,想问下有没有什么兼容的方式

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

No branches or pull requests

1 participant