Skip to content

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

Description

@Fliv

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{}) 

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions