[VOL-4514] Addressing device reconciliation failure
This commit consists of augmention the current GetHeathStatus()
API on the grpc server with the grpc client information. This
provides the grpc server with more insights of the grpc client
connection status. This is useful for a server to know whether it
is more likely to receive a response following a request from a
remote server, represented by the grpc client(s). For now this is
used by the openonu adapter to figure out when it can send an
OMCI request to the openolt adapter following a restart of the
onu adapter.
Change-Id: I0c117c0002b83606b95d7269e6f53d21941e4ba5
diff --git a/VERSION b/VERSION
index ac14c3d..61fcc87 100755
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5.1.1
+5.1.2
diff --git a/go.mod b/go.mod
index bb5a0dc..b70b935 100755
--- a/go.mod
+++ b/go.mod
@@ -4,6 +4,6 @@
require (
github.com/golang/protobuf v1.5.2
- google.golang.org/genproto v0.0.0-20211101144312-62acf1d99145
- google.golang.org/grpc v1.41.0
+ google.golang.org/genproto v0.0.0-20211207154714-918901c715cf
+ google.golang.org/grpc v1.42.0
)
diff --git a/go.sum b/go.sum
index 050beb7..34b9655 100644
--- a/go.sum
+++ b/go.sum
@@ -9,8 +9,11 @@
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
+github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
+github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
+github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
@@ -101,8 +104,8 @@
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
-google.golang.org/genproto v0.0.0-20211101144312-62acf1d99145 h1:vum3nDKdleYb+aePXKFEDT2+ghuH00EgYp9B7Q7EZZE=
-google.golang.org/genproto v0.0.0-20211101144312-62acf1d99145/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
+google.golang.org/genproto v0.0.0-20211207154714-918901c715cf h1:PSEM+IQFb9xdsj2CGhfqUTfsZvF8DScCVP1QZb2IiTQ=
+google.golang.org/genproto v0.0.0-20211207154714-918901c715cf/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
@@ -110,8 +113,8 @@
google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
-google.golang.org/grpc v1.41.0 h1:f+PlOh7QV4iIJkPrx5NQ7qaNGFQ3OTse67yaDHfju4E=
-google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k=
+google.golang.org/grpc v1.42.0 h1:XT2/MFpuPFsEX2fWh3YQtHkZ+WYZFQRfaUgLZYj/p6A=
+google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
diff --git a/go/adapter_service/adapter_service.pb.go b/go/adapter_service/adapter_service.pb.go
index bcf60ac..e8aa01c 100644
--- a/go/adapter_service/adapter_service.pb.go
+++ b/go/adapter_service/adapter_service.pb.go
@@ -36,60 +36,60 @@
}
var fileDescriptor_038e6ec340f67698 = []byte{
- // 839 bytes of a gzipped FileDescriptorProto
+ // 846 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0x6f, 0x6f, 0xdb, 0x36,
0x10, 0xc6, 0xb1, 0x0d, 0xd8, 0x8b, 0x4b, 0x6c, 0x27, 0x6c, 0x96, 0x0e, 0x0a, 0x56, 0x74, 0xed,
- 0xeb, 0xca, 0x40, 0x8b, 0xb6, 0x1b, 0x86, 0x61, 0xf3, 0xbf, 0xba, 0xde, 0x5a, 0x38, 0xb0, 0xe6,
+ 0xeb, 0xca, 0x40, 0x8b, 0xb6, 0x1b, 0x8a, 0x01, 0xf3, 0xbf, 0xba, 0xde, 0x5a, 0x38, 0xb0, 0xe6,
0x62, 0xd8, 0x9b, 0x80, 0x96, 0xcf, 0x32, 0x51, 0x8a, 0xd4, 0xc8, 0x93, 0xd3, 0x7e, 0x83, 0x7d,
- 0x84, 0x7d, 0xdc, 0x42, 0x12, 0xe5, 0x58, 0xaa, 0xdd, 0xd6, 0x49, 0xde, 0x59, 0xf7, 0xf0, 0xf9,
+ 0x80, 0x7d, 0xe0, 0x42, 0x12, 0xe5, 0x58, 0xaa, 0xdd, 0xd6, 0x49, 0xde, 0x59, 0xf7, 0xf0, 0xf9,
0xf1, 0x78, 0x47, 0x93, 0x84, 0x87, 0x2b, 0x2d, 0x69, 0xc9, 0x2f, 0x12, 0xa3, 0x49, 0xdb, 0x36,
0x9f, 0xf3, 0x84, 0xd0, 0x5c, 0x58, 0x34, 0x2b, 0x11, 0xa2, 0x9f, 0x87, 0x59, 0xab, 0x16, 0xf6,
- 0xce, 0x22, 0xad, 0x23, 0x89, 0xed, 0x5c, 0x9e, 0xa5, 0x8b, 0x36, 0xc6, 0x09, 0xbd, 0x2f, 0x46,
+ 0xce, 0x22, 0xad, 0x23, 0x89, 0xed, 0x5c, 0x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8, 0xf8, 0x0d, 0x5a, 0x53, 0x75, 0x7d, 0xfb, 0x2b, 0x38,
+ 0x18, 0x22, 0x0d, 0xde, 0xd3, 0x5b, 0x2e, 0x53, 0x64, 0xf7, 0xab, 0xab, 0xd8, 0x90, 0xca, 0x35,
+ 0xdc, 0xf5, 0xd7, 0x8f, 0x21, 0x7f, 0x82, 0x94, 0x1a, 0x95, 0xcb, 0x96, 0x0d, 0xe1, 0x20, 0xd8,
+ 0x4d, 0x0a, 0x3e, 0x25, 0xed, 0x4a, 0x69, 0x0a, 0xcd, 0x21, 0x52, 0x20, 0x54, 0x24, 0xb1, 0x64,
+ 0x5d, 0xcd, 0x59, 0xc4, 0x87, 0x58, 0xb0, 0xca, 0xbf, 0xe5, 0xcf, 0x9f, 0x19, 0xe1, 0x3a, 0x36,
+ 0xcd, 0xae, 0xe6, 0x2f, 0x60, 0x83, 0x2f, 0x62, 0x83, 0x1a, 0xb6, 0x4b, 0xf0, 0x50, 0x9b, 0xc8,
+ 0xd7, 0x09, 0xaa, 0x50, 0x9b, 0xb9, 0xef, 0x9e, 0x7b, 0xb5, 0x77, 0x6c, 0xf7, 0xe4, 0x6d, 0x1e,
+ 0xaf, 0x3e, 0xe0, 0xfe, 0x79, 0x1e, 0x09, 0x5a, 0xa6, 0xb3, 0x6c, 0x5b, 0xb4, 0x4b, 0x82, 0x7b,
+ 0x30, 0x3e, 0x2a, 0x9f, 0x8f, 0x4f, 0xdb, 0x91, 0xae, 0xbf, 0x96, 0x67, 0xdf, 0xe7, 0xea, 0x93,
+ 0x8f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x0a, 0x51, 0x44, 0xf1, 0x55, 0x0b, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -106,7 +106,7 @@
type AdapterServiceClient interface {
// GetHealthStatus is used by an AdapterService client to verify connectivity
// to the gRPC server hosting the AdapterService service
- GetHealthStatus(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*health.HealthStatus, error)
+ GetHealthStatus(ctx context.Context, in *common.Connection, opts ...grpc.CallOption) (*health.HealthStatus, error)
// Device
AdoptDevice(ctx context.Context, in *voltha.Device, opts ...grpc.CallOption) (*empty.Empty, error)
ReconcileDevice(ctx context.Context, in *voltha.Device, opts ...grpc.CallOption) (*empty.Empty, error)
@@ -161,7 +161,7 @@
return &adapterServiceClient{cc}
}
-func (c *adapterServiceClient) GetHealthStatus(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*health.HealthStatus, error) {
+func (c *adapterServiceClient) GetHealthStatus(ctx context.Context, in *common.Connection, opts ...grpc.CallOption) (*health.HealthStatus, error) {
out := new(health.HealthStatus)
err := c.cc.Invoke(ctx, "/adapter_service.AdapterService/GetHealthStatus", in, out, opts...)
if err != nil {
@@ -485,7 +485,7 @@
type AdapterServiceServer interface {
// GetHealthStatus is used by an AdapterService client to verify connectivity
// to the gRPC server hosting the AdapterService service
- GetHealthStatus(context.Context, *empty.Empty) (*health.HealthStatus, error)
+ GetHealthStatus(context.Context, *common.Connection) (*health.HealthStatus, error)
// Device
AdoptDevice(context.Context, *voltha.Device) (*empty.Empty, error)
ReconcileDevice(context.Context, *voltha.Device) (*empty.Empty, error)
@@ -536,7 +536,7 @@
type UnimplementedAdapterServiceServer struct {
}
-func (*UnimplementedAdapterServiceServer) GetHealthStatus(ctx context.Context, req *empty.Empty) (*health.HealthStatus, error) {
+func (*UnimplementedAdapterServiceServer) GetHealthStatus(ctx context.Context, req *common.Connection) (*health.HealthStatus, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetHealthStatus not implemented")
}
func (*UnimplementedAdapterServiceServer) AdoptDevice(ctx context.Context, req *voltha.Device) (*empty.Empty, error) {
@@ -647,7 +647,7 @@
}
func _AdapterService_GetHealthStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(empty.Empty)
+ in := new(common.Connection)
if err := dec(in); err != nil {
return nil, err
}
@@ -659,7 +659,7 @@
FullMethod: "/adapter_service.AdapterService/GetHealthStatus",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(AdapterServiceServer).GetHealthStatus(ctx, req.(*empty.Empty))
+ return srv.(AdapterServiceServer).GetHealthStatus(ctx, req.(*common.Connection))
}
return interceptor(ctx, in, info, handler)
}
diff --git a/go/common/common.pb.go b/go/common/common.pb.go
index 952a43c..87d3dca 100644
--- a/go/common/common.pb.go
+++ b/go/common/common.pb.go
@@ -80,7 +80,7 @@
}
func (AdminState_Types) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_c2e3fd231961e826, []int{2, 0}
+ return fileDescriptor_c2e3fd231961e826, []int{3, 0}
}
// Operational Status
@@ -132,7 +132,7 @@
}
func (OperStatus_Types) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_c2e3fd231961e826, []int{3, 0}
+ return fileDescriptor_c2e3fd231961e826, []int{4, 0}
}
// Connectivity Status
@@ -164,7 +164,7 @@
}
func (ConnectStatus_Types) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_c2e3fd231961e826, []int{4, 0}
+ return fileDescriptor_c2e3fd231961e826, []int{5, 0}
}
type OperationResp_OperationReturnCode int32
@@ -195,7 +195,7 @@
}
func (OperationResp_OperationReturnCode) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_c2e3fd231961e826, []int{5, 0}
+ return fileDescriptor_c2e3fd231961e826, []int{6, 0}
}
// Convey a resource identifier
@@ -278,6 +278,65 @@
return nil
}
+type Connection struct {
+ // endpoint is the endpoint sending the request
+ Endpoint string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
+ // contextInfo represents additional contextual information
+ ContextInfo string `protobuf:"bytes,2,opt,name=contextInfo,proto3" json:"contextInfo,omitempty"`
+ // keep_alive_interval is used to indicate to the remote endpoint how often it
+ // will get a keep alive notification
+ KeepAliveInterval int64 `protobuf:"varint,3,opt,name=keep_alive_interval,json=keepAliveInterval,proto3" json:"keep_alive_interval,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Connection) Reset() { *m = Connection{} }
+func (m *Connection) String() string { return proto.CompactTextString(m) }
+func (*Connection) ProtoMessage() {}
+func (*Connection) Descriptor() ([]byte, []int) {
+ return fileDescriptor_c2e3fd231961e826, []int{2}
+}
+
+func (m *Connection) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Connection.Unmarshal(m, b)
+}
+func (m *Connection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Connection.Marshal(b, m, deterministic)
+}
+func (m *Connection) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Connection.Merge(m, src)
+}
+func (m *Connection) XXX_Size() int {
+ return xxx_messageInfo_Connection.Size(m)
+}
+func (m *Connection) XXX_DiscardUnknown() {
+ xxx_messageInfo_Connection.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Connection proto.InternalMessageInfo
+
+func (m *Connection) GetEndpoint() string {
+ if m != nil {
+ return m.Endpoint
+ }
+ return ""
+}
+
+func (m *Connection) GetContextInfo() string {
+ if m != nil {
+ return m.ContextInfo
+ }
+ return ""
+}
+
+func (m *Connection) GetKeepAliveInterval() int64 {
+ if m != nil {
+ return m.KeepAliveInterval
+ }
+ return 0
+}
+
type AdminState struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -288,7 +347,7 @@
func (m *AdminState) String() string { return proto.CompactTextString(m) }
func (*AdminState) ProtoMessage() {}
func (*AdminState) Descriptor() ([]byte, []int) {
- return fileDescriptor_c2e3fd231961e826, []int{2}
+ return fileDescriptor_c2e3fd231961e826, []int{3}
}
func (m *AdminState) XXX_Unmarshal(b []byte) error {
@@ -319,7 +378,7 @@
func (m *OperStatus) String() string { return proto.CompactTextString(m) }
func (*OperStatus) ProtoMessage() {}
func (*OperStatus) Descriptor() ([]byte, []int) {
- return fileDescriptor_c2e3fd231961e826, []int{3}
+ return fileDescriptor_c2e3fd231961e826, []int{4}
}
func (m *OperStatus) XXX_Unmarshal(b []byte) error {
@@ -350,7 +409,7 @@
func (m *ConnectStatus) String() string { return proto.CompactTextString(m) }
func (*ConnectStatus) ProtoMessage() {}
func (*ConnectStatus) Descriptor() ([]byte, []int) {
- return fileDescriptor_c2e3fd231961e826, []int{4}
+ return fileDescriptor_c2e3fd231961e826, []int{5}
}
func (m *ConnectStatus) XXX_Unmarshal(b []byte) error {
@@ -385,7 +444,7 @@
func (m *OperationResp) String() string { return proto.CompactTextString(m) }
func (*OperationResp) ProtoMessage() {}
func (*OperationResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_c2e3fd231961e826, []int{5}
+ return fileDescriptor_c2e3fd231961e826, []int{6}
}
func (m *OperationResp) XXX_Unmarshal(b []byte) error {
@@ -428,6 +487,7 @@
proto.RegisterEnum("common.OperationResp_OperationReturnCode", OperationResp_OperationReturnCode_name, OperationResp_OperationReturnCode_value)
proto.RegisterType((*ID)(nil), "common.ID")
proto.RegisterType((*IDs)(nil), "common.IDs")
+ proto.RegisterType((*Connection)(nil), "common.Connection")
proto.RegisterType((*AdminState)(nil), "common.AdminState")
proto.RegisterType((*OperStatus)(nil), "common.OperStatus")
proto.RegisterType((*ConnectStatus)(nil), "common.ConnectStatus")
@@ -437,37 +497,41 @@
func init() { proto.RegisterFile("voltha_protos/common.proto", fileDescriptor_c2e3fd231961e826) }
var fileDescriptor_c2e3fd231961e826 = []byte{
- // 506 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0xcd, 0x6e, 0xda, 0x30,
- 0x1c, 0x6f, 0x42, 0x4b, 0xd7, 0x3f, 0x25, 0x64, 0xee, 0x3a, 0xb1, 0x69, 0x07, 0x94, 0x4b, 0xbb,
- 0x49, 0x03, 0xa9, 0xdb,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x4b, 0xeb, 0x21, 0xc4,
- 0x5c, 0x77, 0xf3, 0x01, 0xce, 0xb7, 0x74, 0x4c, 0xc3, 0x38, 0x08, 0x18, 0x8f, 0xea, 0xcd, 0xee,
- 0x48, 0x84, 0x26, 0x01, 0x67, 0x43, 0xae, 0x83, 0x35, 0xbe, 0x7c, 0x82, 0xd3, 0x48, 0x54, 0xea,
- 0x56, 0x66, 0xe2, 0x46, 0xac, 0x2a, 0x7d, 0x04, 0x69, 0x99, 0x27, 0x4a, 0x54, 0xca, 0x3e, 0xb8,
- 0xc6, 0x70, 0x26, 0x17, 0xd3, 0xbe, 0x2c, 0x45, 0x31, 0x91, 0x8b, 0xac, 0xbf, 0xbe, 0xe4, 0xfb,
- 0xfe, 0x34, 0x57, 0xb3, 0xe5, 0x83, 0x9e, 0xc7, 0xe0, 0x45, 0x1b, 0xac, 0xb5, 0xaf, 0x9b, 0x2b,
- 0x7f, 0xfe, 0x31, 0x98, 0xca, 0xcd, 0xad, 0x3f, 0x34, 0x6b, 0xf2, 0xdb, 0xff, 0x00, 0x00, 0x00,
- 0xff, 0xff, 0x6b, 0x71, 0x98, 0xbd, 0x0a, 0x03, 0x00, 0x00,
+ // 570 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x53, 0x5d, 0x4f, 0xdb, 0x30,
+ 0x14, 0x25, 0x09, 0x14, 0xb8, 0x85, 0x12, 0xcc, 0x98, 0x3a, 0xb4, 0x87, 0x2a, 0x2f, 0xb0, 0x49,
+ 0x6b, 0x25, 0xb6, 0x3d, 0xee, 0x21, 0x24, 0x5e, 0x67, 0x01, 0x4e, 0xe5, 0xa4, 0x20, 0xf1, 0x12,
+ 0x85, 0xc6, 0x03, 0x6b, 0xad, 0x1d, 0x25, 0xa6, 0x1a, 0x7b, 0xdc, 0x3f, 0xd8, 0x5f, 0xdd, 0x2f,
+ 0x98, 0x9c, 0x86, 0x15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, 0x4d, 0x53, 0xb1, 0xf4,
+ 0xba, 0xb3, 0xa4, 0x8d, 0xdd, 0xde, 0x23, 0x1c, 0xac, 0xc8, 0x62, 0x2c, 0x88, 0x46, 0x98, 0xf9,
+ 0x09, 0x89, 0x68, 0x1a, 0x8f, 0x83, 0x00, 0xc7, 0xb1, 0xbb, 0xf6, 0x92, 0x36, 0x4b, 0x18, 0x33,
+ 0x33, 0xcd, 0x1b, 0x38, 0x5c, 0xd2, 0x63, 0x1a, 0x8f, 0x47, 0xa3, 0x88, 0x25, 0xb5, 0xb3, 0x2f,
+ 0x24, 0x42, 0xd3, 0x11, 0x8b, 0x86, 0xcc, 0x24, 0x73, 0xde, 0xbf, 0x85, 0x9d, 0x84, 0x57, 0xfa,
+ 0x52, 0xe5, 0xfc, 0x9c, 0x3f, 0x56, 0xe6, 0x11, 0x64, 0x85, 0x48, 0x35, 0xaf, 0xb4, 0xbb, 0x76,
+ 0x86, 0xe1, 0x40, 0x95, 0x77, 0x7d, 0x55, 0x70, 0x39, 0x51, 0x65, 0xde, 0x5f, 0x5c, 0xd1, 0x4d,
+ 0xff, 0x4e, 0xe8, 0xfb, 0x87, 0x5b, 0xb3, 0x8f, 0xc1, 0x93, 0x36, 0x58, 0x68, 0x1f, 0x9a, 0x0b,
+ 0x9b, 0x7f, 0x1e, 0xdc, 0xa9, 0xe6, 0xce, 0x6e, 0x5b, 0x35, 0xf9, 0xf1, 0x5f, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0x62, 0x34, 0x9d, 0xbf, 0x86, 0x03, 0x00, 0x00,
}
diff --git a/go/core_service/core_services.pb.go b/go/core_service/core_services.pb.go
index 41ab077..5816ad2 100644
--- a/go/core_service/core_services.pb.go
+++ b/go/core_service/core_services.pb.go
@@ -32,46 +32,46 @@
func init() { proto.RegisterFile("voltha_protos/core_services.proto", fileDescriptor_979c43850713f141) }
var fileDescriptor_979c43850713f141 = []byte{
- // 612 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8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d, 0x43,
+ 0x7f, 0x7e, 0x38, 0x96, 0xe6, 0x79, 0xe0, 0xae, 0x82, 0x1c, 0x47, 0xb0, 0x79, 0x81, 0xa9, 0xe0,
+ 0x69, 0x59, 0x61, 0xd0, 0x83, 0x10, 0xf8, 0x0c, 0x5e, 0xfa, 0xd6, 0xfd, 0x28, 0x75, 0x71, 0x2e,
+ 0xc5, 0xef, 0xfb, 0x41, 0x96, 0x49, 0x54, 0x8a, 0x6c, 0xfb, 0xee, 0x51, 0x37, 0xf9, 0x60, 0x13,
+ 0xfb, 0xf0, 0x74, 0x84, 0xda, 0x1c, 0x53, 0xf8, 0x44, 0x3b, 0x57, 0xf7, 0xd5, 0x3e, 0x72, 0x89,
+ 0xfc, 0xbf, 0xdc, 0x5d, 0x02, 0xeb, 0x86, 0x62, 0x3c, 0x61, 0x39, 0x26, 0xe2, 0x17, 0xaf, 0x04,
+ 0xcb, 0xc8, 0x66, 0xab, 0xea, 0x85, 0x43, 0x2c, 0xc7, 0xb7, 0xb0, 0x2b, 0x64, 0x4e, 0xc5, 0x14,
+ 0x79, 0x2a, 0x64, 0x46, 0xcd, 0x37, 0x41, 0xdd, 0x2f, 0xeb, 0x78, 0xed, 0x7b, 0x13, 0x74, 0xbe,
+ 0x88, 0x9f, 0x07, 0x79, 0xa9, 0x8b, 0xbb, 0xeb, 0xda, 0xfa, 0xb8, 0xc5, 0xc6, 0x06, 0xfb, 0xd6,
+ 0x7e, 0x31, 0xb3, 0xf7, 0x71, 0x2e, 0xbc, 0x0f, 0xf1, 0xfa, 0x49, 0x93, 0xda, 0xff, 0x1b, 0x00,
+ 0x00, 0xff, 0xff, 0xe7, 0xe2, 0x9c, 0x32, 0x35, 0x07, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -87,7 +87,7 @@
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type CoreServiceClient interface {
// in coreProxy interface
- GetHealthStatus(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*health.HealthStatus, error)
+ GetHealthStatus(ctx context.Context, in *common.Connection, opts ...grpc.CallOption) (*health.HealthStatus, error)
RegisterAdapter(ctx context.Context, in *core_adapter.AdapterRegistration, opts ...grpc.CallOption) (*empty.Empty, error)
DeviceUpdate(ctx context.Context, in *voltha.Device, opts ...grpc.CallOption) (*empty.Empty, error)
PortCreated(ctx context.Context, in *voltha.Port, opts ...grpc.CallOption) (*empty.Empty, error)
@@ -122,7 +122,7 @@
return &coreServiceClient{cc}
}
-func (c *coreServiceClient) GetHealthStatus(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*health.HealthStatus, error) {
+func (c *coreServiceClient) GetHealthStatus(ctx context.Context, in *common.Connection, opts ...grpc.CallOption) (*health.HealthStatus, error) {
out := new(health.HealthStatus)
err := c.cc.Invoke(ctx, "/core_service.CoreService/GetHealthStatus", in, out, opts...)
if err != nil {
@@ -341,7 +341,7 @@
// CoreServiceServer is the server API for CoreService service.
type CoreServiceServer interface {
// in coreProxy interface
- GetHealthStatus(context.Context, *empty.Empty) (*health.HealthStatus, error)
+ GetHealthStatus(context.Context, *common.Connection) (*health.HealthStatus, error)
RegisterAdapter(context.Context, *core_adapter.AdapterRegistration) (*empty.Empty, error)
DeviceUpdate(context.Context, *voltha.Device) (*empty.Empty, error)
PortCreated(context.Context, *voltha.Port) (*empty.Empty, error)
@@ -372,7 +372,7 @@
type UnimplementedCoreServiceServer struct {
}
-func (*UnimplementedCoreServiceServer) GetHealthStatus(ctx context.Context, req *empty.Empty) (*health.HealthStatus, error) {
+func (*UnimplementedCoreServiceServer) GetHealthStatus(ctx context.Context, req *common.Connection) (*health.HealthStatus, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetHealthStatus not implemented")
}
func (*UnimplementedCoreServiceServer) RegisterAdapter(ctx context.Context, req *core_adapter.AdapterRegistration) (*empty.Empty, error) {
@@ -450,7 +450,7 @@
}
func _CoreService_GetHealthStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(empty.Empty)
+ in := new(common.Connection)
if err := dec(in); err != nil {
return nil, err
}
@@ -462,7 +462,7 @@
FullMethod: "/core_service.CoreService/GetHealthStatus",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CoreServiceServer).GetHealthStatus(ctx, req.(*empty.Empty))
+ return srv.(CoreServiceServer).GetHealthStatus(ctx, req.(*common.Connection))
}
return interceptor(ctx, in, info, handler)
}
diff --git a/go/olt_inter_adapter_service/olt_inter_adapter_service.pb.go b/go/olt_inter_adapter_service/olt_inter_adapter_service.pb.go
index 569dfda..d958a65 100644
--- a/go/olt_inter_adapter_service/olt_inter_adapter_service.pb.go
+++ b/go/olt_inter_adapter_service/olt_inter_adapter_service.pb.go
@@ -8,6 +8,7 @@
fmt "fmt"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
+ common "github.com/opencord/voltha-protos/v5/go/common"
health "github.com/opencord/voltha-protos/v5/go/health"
inter_adapter "github.com/opencord/voltha-protos/v5/go/inter_adapter"
grpc "google.golang.org/grpc"
@@ -32,26 +33,27 @@
}
var fileDescriptor_3ddb40a5aae0f6e1 = []byte{
- // 299 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xbd, 0x4e, 0xc3, 0x30,
- 0x10, 0xc7, 0x05, 0x03, 0x83, 0x17, 0x90, 0x85, 0x2a, 0x61, 0x58, 0x18, 0x19, 0x6a, 0x23, 0x10,
- 0x33, 0x6a, 0x05, 0x94, 0x0e, 0xa8, 0x15, 0x45, 0x0c, 0x2c, 0x95, 0xeb, 0x5e, 0x9d, 0x48, 0x6e,
- 0x2e, 0xd8, 0x97, 0x40, 0xdf, 0x82, 0x91, 0xc7, 0x45, 0x89, 0x93, 0x21, 0xa8, 0x99, 0x3c,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 0x0c, 0xfa, 0xb5, 0x8c, 0x6b, 0x94, 0xbd, 0x87, 0x1a, 0x5f, 0xbc, 0xd7, 0xc4,
- 0xfe, 0x7d, 0x7e, 0x8c, 0x6c, 0x4a, 0x49, 0xb1, 0x92, 0x06, 0xb7, 0xaa, 0xf5, 0x54, 0xd1, 0x73,
- 0xd8, 0x9c, 0xa6, 0xbc, 0x53, 0x16, 0xfb, 0xbf, 0xca, 0xea, 0xa8, 0xe6, 0x6e, 0xff, 0x02, 0x00,
- 0x00, 0xff, 0xff, 0x96, 0x1f, 0x38, 0xd3, 0x5c, 0x02, 0x00, 0x00,
+ // 316 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xbf, 0x4e, 0xc3, 0x30,
+ 0x10, 0x87, 0x05, 0x03, 0x43, 0x16, 0x90, 0x85, 0x2a, 0x11, 0x58, 0x18, 0x19, 0xea, 0x20, 0x10,
+ 0x13, 0x53, 0xcb, 0x9f, 0xd2, 0x01, 0xb5, 0xa2, 0x88, 0x81, 0xa5, 0x72, 0xdd, 0xab, 0x63, 0xc9,
+ 0xf1, 0x05, 0xfb, 0x52, 0xe8, 0x5b, 0x30, 0xf0, 0xc0, 0x28, 0xb1, 0x3b, 0xa4, 0x6a, 0xa6, 0x28,
+ 0xba, 0xef, 0xf7, 0xf9, 0xee, 0xec, 0xa4, 0xbf, 0x46, 0x43, 0xb9, 0x98, 0x97, 0x0e, 0x09, 0x7d,
+ 0x86, 0x86, 0xe6, 0xda, 0x12, 0xb8, 0xb9, 0x58, 0x8a, 0xb2, 0xfe, 0x7a, 0x70, 0x6b, 0x2d, 0x81,
+ 0x37, 0x00, 0x3b, 0xeb, 0x04, 0xd2, 0xb4, 0x6d, 0x92, 0x58, 0x14, 0x68, 0x43, 0x2c, 0x3d, 0x57,
+ 0x88, 0xca, 0x40, 0xd6, 0xfc, 0x2d, 0xaa, 0x55, 0x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0x8e, 0x1a, 0xee, 0xf6, 0x3f,
+ 0x00, 0x00, 0xff, 0xff, 0x7c, 0x06, 0x94, 0x70, 0x74, 0x02, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -68,7 +70,7 @@
type OltInterAdapterServiceClient interface {
// GetHealthStatus is used by an OltInterAdapterService client to verify connectivity
// to the gRPC server hosting the OltInterAdapterService service
- GetHealthStatus(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*health.HealthStatus, error)
+ GetHealthStatus(ctx context.Context, in *common.Connection, opts ...grpc.CallOption) (*health.HealthStatus, error)
ProxyOmciRequest(ctx context.Context, in *inter_adapter.OmciMessage, opts ...grpc.CallOption) (*empty.Empty, error)
GetTechProfileInstance(ctx context.Context, in *inter_adapter.TechProfileInstanceRequestMessage, opts ...grpc.CallOption) (*inter_adapter.TechProfileDownloadMessage, error)
}
@@ -81,7 +83,7 @@
return &oltInterAdapterServiceClient{cc}
}
-func (c *oltInterAdapterServiceClient) GetHealthStatus(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*health.HealthStatus, error) {
+func (c *oltInterAdapterServiceClient) GetHealthStatus(ctx context.Context, in *common.Connection, opts ...grpc.CallOption) (*health.HealthStatus, error) {
out := new(health.HealthStatus)
err := c.cc.Invoke(ctx, "/olt_inter_adapter_service.OltInterAdapterService/GetHealthStatus", in, out, opts...)
if err != nil {
@@ -112,7 +114,7 @@
type OltInterAdapterServiceServer interface {
// GetHealthStatus is used by an OltInterAdapterService client to verify connectivity
// to the gRPC server hosting the OltInterAdapterService service
- GetHealthStatus(context.Context, *empty.Empty) (*health.HealthStatus, error)
+ GetHealthStatus(context.Context, *common.Connection) (*health.HealthStatus, error)
ProxyOmciRequest(context.Context, *inter_adapter.OmciMessage) (*empty.Empty, error)
GetTechProfileInstance(context.Context, *inter_adapter.TechProfileInstanceRequestMessage) (*inter_adapter.TechProfileDownloadMessage, error)
}
@@ -121,7 +123,7 @@
type UnimplementedOltInterAdapterServiceServer struct {
}
-func (*UnimplementedOltInterAdapterServiceServer) GetHealthStatus(ctx context.Context, req *empty.Empty) (*health.HealthStatus, error) {
+func (*UnimplementedOltInterAdapterServiceServer) GetHealthStatus(ctx context.Context, req *common.Connection) (*health.HealthStatus, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetHealthStatus not implemented")
}
func (*UnimplementedOltInterAdapterServiceServer) ProxyOmciRequest(ctx context.Context, req *inter_adapter.OmciMessage) (*empty.Empty, error) {
@@ -136,7 +138,7 @@
}
func _OltInterAdapterService_GetHealthStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(empty.Empty)
+ in := new(common.Connection)
if err := dec(in); err != nil {
return nil, err
}
@@ -148,7 +150,7 @@
FullMethod: "/olt_inter_adapter_service.OltInterAdapterService/GetHealthStatus",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(OltInterAdapterServiceServer).GetHealthStatus(ctx, req.(*empty.Empty))
+ return srv.(OltInterAdapterServiceServer).GetHealthStatus(ctx, req.(*common.Connection))
}
return interceptor(ctx, in, info, handler)
}
diff --git a/go/onu_inter_adapter_service/onu_inter_adapter_service.pb.go b/go/onu_inter_adapter_service/onu_inter_adapter_service.pb.go
index eaf7ca8..a2cf537 100644
--- a/go/onu_inter_adapter_service/onu_inter_adapter_service.pb.go
+++ b/go/onu_inter_adapter_service/onu_inter_adapter_service.pb.go
@@ -8,6 +8,7 @@
fmt "fmt"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
+ common "github.com/opencord/voltha-protos/v5/go/common"
health "github.com/opencord/voltha-protos/v5/go/health"
inter_adapter "github.com/opencord/voltha-protos/v5/go/inter_adapter"
grpc "google.golang.org/grpc"
@@ -32,29 +33,29 @@
}
var fileDescriptor_f951f30caeee9ccd = []byte{
- // 337 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00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d2, 0x68, 0xf8, 0xb5, 0xf0, 0xe3, 0x79,
- 0xd3, 0x17, 0x28, 0x0a, 0x19, 0x43, 0x50, 0x73, 0x83, 0x0f, 0xd8, 0xc9, 0x24, 0x53, 0x7a, 0x4f,
- 0x17, 0x1c, 0xea, 0x32, 0xa5, 0x9b, 0x2c, 0x6f, 0xec, 0x6c, 0x80, 0x1f, 0x26, 0x45, 0x19, 0xcd,
- 0x41, 0x25, 0x53, 0x8b, 0x2b, 0x9d, 0x02, 0xbf, 0x39, 0x50, 0xed, 0xcd, 0x76, 0x78, 0x93, 0x79,
- 0xcc, 0x5a, 0x03, 0x48, 0x81, 0x60, 0x08, 0xd9, 0x14, 0x2d, 0xfd, 0xfa, 0xad, 0x37, 0x6d, 0xb2,
- 0x8d, 0xd8, 0x7f, 0xc7, 0xcf, 0x1f, 0xd1, 0x10, 0xef, 0x1c, 0x75, 0xcd, 0x15, 0x9a, 0x26, 0x53,
- 0xff, 0xeb, 0x0f, 0xeb, 0xa2, 0x8d, 0x05, 0xe6, 0x60, 0x14, 0xda, 0x48, 0xb8, 0x36, 0x88, 0xda,
- 0xbe, 0xf5, 0xaf, 0x5e, 0x2b, 0xe2, 0x78, 0x2d, 0xde, 0x7b, 0xb1, 0xa6, 0xa4, 0x5c, 0x0a, 0x85,
- 0x59, 0xb8, 0x73, 0x86, 0xce, 0xd9, 0xdd, 0x36, 0x6c, 0x7d, 0x1f, 0xc6, 0x58, 0xdf, 0xf8, 0xe5,
- 0xbf, 0x8a, 0xbb, 0xfb, 0x09, 0x00, 0x00, 0xff, 0xff, 0x75, 0x2b, 0xd4, 0xd6, 0x23, 0x03, 0x00,
- 0x00,
+ // 351 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0x4f, 0x4b, 0xf3, 0x40,
+ 0x10, 0xc6, 0x79, 0x79, 0xc1, 0xc3, 0x4a, 0x15, 0x56, 0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xc2, 0x9e,
+ 0x2a, 0xb6, 0xa7, 0x8a, 0xe7, 0xf2, 0x54, 0x3e, 0x64, 0x67, 0xd3, 0x44, 0xe9, 0x1d, 0x9d, 0xb7,
+ 0xaf, 0x4b, 0x94, 0x6e, 0xb2, 0xbc, 0xb3, 0x8b, 0x21, 0x7e, 0x9a, 0x18, 0x65, 0xb0, 0x00, 0x15,
+ 0xcd, 0x32, 0x5c, 0xeb, 0x18, 0xf8, 0xdd, 0x9e, 0x6a, 0x27, 0xdb, 0xe2, 0x4d, 0xe6, 0x09, 0x6b,
+ 0x0d, 0x21, 0x06, 0x82, 0x11, 0x24, 0x33, 0xcc, 0xe8, 0xcf, 0xb5, 0x4e, 0xda, 0x64, 0x1b, 0xb3,
+ 0x53, 0xcb, 0x2f, 0x06, 0x68, 0x88, 0x77, 0x0e, 0xba, 0x16, 0x0a, 0x4d, 0x93, 0xa9, 0xff, 0xfd,
+ 0x8f, 0x75, 0x31, 0x0b, 0x05, 0xa6, 0x60, 0x14, 0x66, 0x81, 0xb0, 0x4d, 0x10, 0x47, 0x7b, 0xd8,
+ 0xbf, 0x79, 0xab, 0x88, 0xc3, 0x95, 0xf8, 0xe8, 0x85, 0x9a, 0xa2, 0x62, 0x55, 0xb6, 0xc0, 0xdf,
+ 0x3a, 0x7d, 0xeb, 0xec, 0xd6, 0xed, 0xda, 0x3c, 0xfa, 0x21, 0x1e, 0x7f, 0x09, 0xab, 0x93, 0x8a,
+ 0x7b, 0xf8, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x5f, 0x10, 0x75, 0x34, 0x3b, 0x03, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -71,7 +72,7 @@
type OnuInterAdapterServiceClient interface {
// GetHealthStatus is used by an OnuInterAdapterService client to verify connectivity
// to the gRPC server hosting the OnuInterAdapterService service
- GetHealthStatus(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*health.HealthStatus, error)
+ GetHealthStatus(ctx context.Context, in *common.Connection, opts ...grpc.CallOption) (*health.HealthStatus, error)
OnuIndication(ctx context.Context, in *inter_adapter.OnuIndicationMessage, opts ...grpc.CallOption) (*empty.Empty, error)
OmciIndication(ctx context.Context, in *inter_adapter.OmciMessage, opts ...grpc.CallOption) (*empty.Empty, error)
DownloadTechProfile(ctx context.Context, in *inter_adapter.TechProfileDownloadMessage, opts ...grpc.CallOption) (*empty.Empty, error)
@@ -87,7 +88,7 @@
return &onuInterAdapterServiceClient{cc}
}
-func (c *onuInterAdapterServiceClient) GetHealthStatus(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*health.HealthStatus, error) {
+func (c *onuInterAdapterServiceClient) GetHealthStatus(ctx context.Context, in *common.Connection, opts ...grpc.CallOption) (*health.HealthStatus, error) {
out := new(health.HealthStatus)
err := c.cc.Invoke(ctx, "/onu_inter_adapter_service.OnuInterAdapterService/GetHealthStatus", in, out, opts...)
if err != nil {
@@ -145,7 +146,7 @@
type OnuInterAdapterServiceServer interface {
// GetHealthStatus is used by an OnuInterAdapterService client to verify connectivity
// to the gRPC server hosting the OnuInterAdapterService service
- GetHealthStatus(context.Context, *empty.Empty) (*health.HealthStatus, error)
+ GetHealthStatus(context.Context, *common.Connection) (*health.HealthStatus, error)
OnuIndication(context.Context, *inter_adapter.OnuIndicationMessage) (*empty.Empty, error)
OmciIndication(context.Context, *inter_adapter.OmciMessage) (*empty.Empty, error)
DownloadTechProfile(context.Context, *inter_adapter.TechProfileDownloadMessage) (*empty.Empty, error)
@@ -157,7 +158,7 @@
type UnimplementedOnuInterAdapterServiceServer struct {
}
-func (*UnimplementedOnuInterAdapterServiceServer) GetHealthStatus(ctx context.Context, req *empty.Empty) (*health.HealthStatus, error) {
+func (*UnimplementedOnuInterAdapterServiceServer) GetHealthStatus(ctx context.Context, req *common.Connection) (*health.HealthStatus, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetHealthStatus not implemented")
}
func (*UnimplementedOnuInterAdapterServiceServer) OnuIndication(ctx context.Context, req *inter_adapter.OnuIndicationMessage) (*empty.Empty, error) {
@@ -181,7 +182,7 @@
}
func _OnuInterAdapterService_GetHealthStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(empty.Empty)
+ in := new(common.Connection)
if err := dec(in); err != nil {
return nil, err
}
@@ -193,7 +194,7 @@
FullMethod: "/onu_inter_adapter_service.OnuInterAdapterService/GetHealthStatus",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(OnuInterAdapterServiceServer).GetHealthStatus(ctx, req.(*empty.Empty))
+ return srv.(OnuInterAdapterServiceServer).GetHealthStatus(ctx, req.(*common.Connection))
}
return interceptor(ctx, in, info, handler)
}
diff --git a/go/voltha/voltha.pb.go b/go/voltha/voltha.pb.go
index 44e2567..217a597 100644
--- a/go/voltha/voltha.pb.go
+++ b/go/voltha/voltha.pb.go
@@ -37,6 +37,9 @@
// IDs from public import voltha_protos/common.proto
type IDs = common.IDs
+// Connection from public import voltha_protos/common.proto
+type Connection = common.Connection
+
// AdminState from public import voltha_protos/common.proto
type AdminState = common.AdminState
diff --git a/protos/voltha_protos/adapter_service.proto b/protos/voltha_protos/adapter_service.proto
index 5ff553e..cfd5f29 100755
--- a/protos/voltha_protos/adapter_service.proto
+++ b/protos/voltha_protos/adapter_service.proto
@@ -20,7 +20,7 @@
service AdapterService {
// GetHealthStatus is used by an AdapterService client to verify connectivity
// to the gRPC server hosting the AdapterService service
- rpc GetHealthStatus(google.protobuf.Empty) returns (health.HealthStatus);
+ rpc GetHealthStatus(common.Connection) returns (health.HealthStatus);
// Device
rpc AdoptDevice(device.Device) returns(google.protobuf.Empty);
diff --git a/protos/voltha_protos/common.proto b/protos/voltha_protos/common.proto
index 9efbdd9..f7efff6 100755
--- a/protos/voltha_protos/common.proto
+++ b/protos/voltha_protos/common.proto
@@ -20,6 +20,18 @@
api_test=0;
}
+message Connection {
+ // endpoint is the endpoint sending the request
+ string endpoint = 1;
+
+ // contextInfo represents additional contextual information
+ string contextInfo = 2;
+
+ // keep_alive_interval is used to indicate to the remote endpoint how often it
+ // will get a keep alive notification
+ int64 keep_alive_interval = 3;
+}
+
message AdminState {
// Administrative State
enum Types {
diff --git a/protos/voltha_protos/core_services.proto b/protos/voltha_protos/core_services.proto
index b6c16da..f0929f4 100755
--- a/protos/voltha_protos/core_services.proto
+++ b/protos/voltha_protos/core_services.proto
@@ -16,7 +16,7 @@
// sole purpose of serving requests/updates from the Voltha adapters.
service CoreService {
// in coreProxy interface
- rpc GetHealthStatus(google.protobuf.Empty) returns (health.HealthStatus);
+ rpc GetHealthStatus(common.Connection) returns (health.HealthStatus);
rpc RegisterAdapter (core_adapter.AdapterRegistration) returns (google.protobuf.Empty);
rpc DeviceUpdate (device.Device) returns (google.protobuf.Empty);
rpc PortCreated (device.Port) returns (google.protobuf.Empty);
diff --git a/protos/voltha_protos/olt_inter_adapter_service.proto b/protos/voltha_protos/olt_inter_adapter_service.proto
index 5d4773f..f33def4 100755
--- a/protos/voltha_protos/olt_inter_adapter_service.proto
+++ b/protos/voltha_protos/olt_inter_adapter_service.proto
@@ -6,6 +6,7 @@
package olt_inter_adapter_service;
+import "voltha_protos/common.proto";
import "google/protobuf/empty.proto";
import "voltha_protos/inter_adapter.proto";
import "voltha_protos/health.proto";
@@ -13,7 +14,7 @@
service OltInterAdapterService {
// GetHealthStatus is used by an OltInterAdapterService client to verify connectivity
// to the gRPC server hosting the OltInterAdapterService service
- rpc GetHealthStatus(google.protobuf.Empty) returns (health.HealthStatus);
+ rpc GetHealthStatus(common.Connection) returns (health.HealthStatus);
rpc ProxyOmciRequest(inter_adapter.OmciMessage) returns (google.protobuf.Empty);
rpc GetTechProfileInstance(inter_adapter.TechProfileInstanceRequestMessage) returns (inter_adapter.TechProfileDownloadMessage);
diff --git a/protos/voltha_protos/onu_inter_adapter_service.proto b/protos/voltha_protos/onu_inter_adapter_service.proto
index ee4dff7..1b9243a 100755
--- a/protos/voltha_protos/onu_inter_adapter_service.proto
+++ b/protos/voltha_protos/onu_inter_adapter_service.proto
@@ -6,6 +6,7 @@
package onu_inter_adapter_service;
+import "voltha_protos/common.proto";
import "google/protobuf/empty.proto";
import "voltha_protos/inter_adapter.proto";
import "voltha_protos/health.proto";
@@ -13,7 +14,7 @@
service OnuInterAdapterService {
// GetHealthStatus is used by an OnuInterAdapterService client to verify connectivity
// to the gRPC server hosting the OnuInterAdapterService service
- rpc GetHealthStatus(google.protobuf.Empty) returns (health.HealthStatus);
+ rpc GetHealthStatus(common.Connection) returns (health.HealthStatus);
rpc OnuIndication(inter_adapter.OnuIndicationMessage) returns (google.protobuf.Empty);
rpc OmciIndication(inter_adapter.OmciMessage) returns (google.protobuf.Empty);
diff --git a/vendor/google.golang.org/grpc/attributes/attributes.go b/vendor/google.golang.org/grpc/attributes/attributes.go
index 3220d87..6ff2792 100644
--- a/vendor/google.golang.org/grpc/attributes/attributes.go
+++ b/vendor/google.golang.org/grpc/attributes/attributes.go
@@ -25,55 +25,75 @@
// later release.
package attributes
-import "fmt"
-
// Attributes is an immutable struct for storing and retrieving generic
// key/value pairs. Keys must be hashable, and users should define their own
-// types for keys.
+// types for keys. Values should not be modified after they are added to an
+// Attributes or if they were received from one. If values implement 'Equal(o
+// interface{}) bool', it will be called by (*Attributes).Equal to determine
+// whether two values with the same key should be considered equal.
type Attributes struct {
m map[interface{}]interface{}
}
-// New returns a new Attributes containing all key/value pairs in kvs. If the
-// same key appears multiple times, the last value overwrites all previous
-// values for that key. Panics if len(kvs) is not even.
-func New(kvs ...interface{}) *Attributes {
- if len(kvs)%2 != 0 {
- panic(fmt.Sprintf("attributes.New called with unexpected input: len(kvs) = %v", len(kvs)))
- }
- a := &Attributes{m: make(map[interface{}]interface{}, len(kvs)/2)}
- for i := 0; i < len(kvs)/2; i++ {
- a.m[kvs[i*2]] = kvs[i*2+1]
- }
- return a
+// New returns a new Attributes containing the key/value pair.
+func New(key, value interface{}) *Attributes {
+ return &Attributes{m: map[interface{}]interface{}{key: value}}
}
-// WithValues returns a new Attributes containing all key/value pairs in a and
-// kvs. Panics if len(kvs) is not even. If the same key appears multiple
-// times, the last value overwrites all previous values for that key. To
-// remove an existing key, use a nil value.
-func (a *Attributes) WithValues(kvs ...interface{}) *Attributes {
+// WithValue returns a new Attributes containing the previous keys and values
+// and the new key/value pair. If the same key appears multiple times, the
+// last value overwrites all previous values for that key. To remove an
+// existing key, use a nil value. value should not be modified later.
+func (a *Attributes) WithValue(key, value interface{}) *Attributes {
if a == nil {
- return New(kvs...)
+ return New(key, value)
}
- if len(kvs)%2 != 0 {
- panic(fmt.Sprintf("attributes.New called with unexpected input: len(kvs) = %v", len(kvs)))
- }
- n := &Attributes{m: make(map[interface{}]interface{}, len(a.m)+len(kvs)/2)}
+ n := &Attributes{m: make(map[interface{}]interface{}, len(a.m)+1)}
for k, v := range a.m {
n.m[k] = v
}
- for i := 0; i < len(kvs)/2; i++ {
- n.m[kvs[i*2]] = kvs[i*2+1]
- }
+ n.m[key] = value
return n
}
// Value returns the value associated with these attributes for key, or nil if
-// no value is associated with key.
+// no value is associated with key. The returned value should not be modified.
func (a *Attributes) Value(key interface{}) interface{} {
if a == nil {
return nil
}
return a.m[key]
}
+
+// Equal returns whether a and o are equivalent. If 'Equal(o interface{})
+// bool' is implemented for a value in the attributes, it is called to
+// determine if the value matches the one stored in the other attributes. If
+// Equal is not implemented, standard equality is used to determine if the two
+// values are equal.
+func (a *Attributes) Equal(o *Attributes) bool {
+ if a == nil && o == nil {
+ return true
+ }
+ if a == nil || o == nil {
+ return false
+ }
+ if len(a.m) != len(o.m) {
+ return false
+ }
+ for k, v := range a.m {
+ ov, ok := o.m[k]
+ if !ok {
+ // o missing element of a
+ return false
+ }
+ if eq, ok := v.(interface{ Equal(o interface{}) bool }); ok {
+ if !eq.Equal(ov) {
+ return false
+ }
+ } else if v != ov {
+ // Fallback to a standard equality check if Value is unimplemented.
+ return false
+ }
+ }
+ return true
+}
diff --git a/vendor/google.golang.org/grpc/balancer/base/balancer.go b/vendor/google.golang.org/grpc/balancer/base/balancer.go
index 8dd5042..a67074a 100644
--- a/vendor/google.golang.org/grpc/balancer/base/balancer.go
+++ b/vendor/google.golang.org/grpc/balancer/base/balancer.go
@@ -22,7 +22,6 @@
"errors"
"fmt"
- "google.golang.org/grpc/attributes"
"google.golang.org/grpc/balancer"
"google.golang.org/grpc/connectivity"
"google.golang.org/grpc/grpclog"
@@ -42,7 +41,7 @@
cc: cc,
pickerBuilder: bb.pickerBuilder,
- subConns: make(map[resolver.Address]subConnInfo),
+ subConns: resolver.NewAddressMap(),
scStates: make(map[balancer.SubConn]connectivity.State),
csEvltr: &balancer.ConnectivityStateEvaluator{},
config: bb.config,
@@ -58,11 +57,6 @@
return bb.name
}
-type subConnInfo struct {
- subConn balancer.SubConn
- attrs *attributes.Attributes
-}
-
type baseBalancer struct {
cc balancer.ClientConn
pickerBuilder PickerBuilder
@@ -70,7 +64,7 @@
csEvltr *balancer.ConnectivityStateEvaluator
state connectivity.State
- subConns map[resolver.Address]subConnInfo // `attributes` is stripped from the keys of this map (the addresses)
+ subConns *resolver.AddressMap
scStates map[balancer.SubConn]connectivity.State
picker balancer.Picker
config Config
@@ -81,7 +75,7 @@
func (b *baseBalancer) ResolverError(err error) {
b.resolverErr = err
- if len(b.subConns) == 0 {
+ if b.subConns.Len() == 0 {
b.state = connectivity.TransientFailure
}
@@ -105,53 +99,29 @@
// Successful resolution; clear resolver error and ensure we return nil.
b.resolverErr = nil
// addrsSet is the set converted from addrs, it's used for quick lookup of an address.
- addrsSet := make(map[resolver.Address]struct{})
+ addrsSet := resolver.NewAddressMap()
for _, a := range s.ResolverState.Addresses {
- // Strip attributes from addresses before using them as map keys. So
- // that when two addresses only differ in attributes pointers (but with
- // the same attribute content), they are considered the same address.
- //
- // Note that this doesn't handle the case where the attribute content is
- // different. So if users want to set different attributes to create
- // duplicate connections to the same backend, it doesn't work. This is
- // fine for now, because duplicate is done by setting Metadata today.
- //
- // TODO: read attributes to handle duplicate connections.
- aNoAttrs := a
- aNoAttrs.Attributes = nil
- addrsSet[aNoAttrs] = struct{}{}
- if scInfo, ok := b.subConns[aNoAttrs]; !ok {
+ addrsSet.Set(a, nil)
+ if _, ok := b.subConns.Get(a); !ok {
// a is a new address (not existing in b.subConns).
- //
- // When creating SubConn, the original address with attributes is
- // passed through. So that connection configurations in attributes
- // (like creds) will be used.
sc, err := b.cc.NewSubConn([]resolver.Address{a}, balancer.NewSubConnOptions{HealthCheckEnabled: b.config.HealthCheck})
if err != nil {
logger.Warningf("base.baseBalancer: failed to create new SubConn: %v", err)
continue
}
- b.subConns[aNoAttrs] = subConnInfo{subConn: sc, attrs: a.Attributes}
+ b.subConns.Set(a, sc)
b.scStates[sc] = connectivity.Idle
b.csEvltr.RecordTransition(connectivity.Shutdown, connectivity.Idle)
sc.Connect()
- } else {
- // Always update the subconn's address in case the attributes
- // changed.
- //
- // The SubConn does a reflect.DeepEqual of the new and old
- // addresses. So this is a noop if the current address is the same
- // as the old one (including attributes).
- scInfo.attrs = a.Attributes
- b.subConns[aNoAttrs] = scInfo
- b.cc.UpdateAddresses(scInfo.subConn, []resolver.Address{a})
}
}
- for a, scInfo := range b.subConns {
+ for _, a := range b.subConns.Keys() {
+ sci, _ := b.subConns.Get(a)
+ sc := sci.(balancer.SubConn)
// a was removed by resolver.
- if _, ok := addrsSet[a]; !ok {
- b.cc.RemoveSubConn(scInfo.subConn)
- delete(b.subConns, a)
+ if _, ok := addrsSet.Get(a); !ok {
+ b.cc.RemoveSubConn(sc)
+ b.subConns.Delete(a)
// Keep the state of this sc in b.scStates until sc's state becomes Shutdown.
// The entry will be deleted in UpdateSubConnState.
}
@@ -193,10 +163,11 @@
readySCs := make(map[balancer.SubConn]SubConnInfo)
// Filter out all ready SCs from full subConn map.
- for addr, scInfo := range b.subConns {
- if st, ok := b.scStates[scInfo.subConn]; ok && st == connectivity.Ready {
- addr.Attributes = scInfo.attrs
- readySCs[scInfo.subConn] = SubConnInfo{Address: addr}
+ for _, addr := range b.subConns.Keys() {
+ sci, _ := b.subConns.Get(addr)
+ sc := sci.(balancer.SubConn)
+ if st, ok := b.scStates[sc]; ok && st == connectivity.Ready {
+ readySCs[sc] = SubConnInfo{Address: addr}
}
}
b.picker = b.pickerBuilder.Build(PickerBuildInfo{ReadySCs: readySCs})
diff --git a/vendor/google.golang.org/grpc/balancer/grpclb/state/state.go b/vendor/google.golang.org/grpc/balancer/grpclb/state/state.go
index a24264a..4ecfa1c 100644
--- a/vendor/google.golang.org/grpc/balancer/grpclb/state/state.go
+++ b/vendor/google.golang.org/grpc/balancer/grpclb/state/state.go
@@ -39,7 +39,7 @@
// Set returns a copy of the provided state with attributes containing s. s's
// data should not be mutated after calling Set.
func Set(state resolver.State, s *State) resolver.State {
- state.Attributes = state.Attributes.WithValues(key, s)
+ state.Attributes = state.Attributes.WithValue(key, s)
return state
}
diff --git a/vendor/google.golang.org/grpc/clientconn.go b/vendor/google.golang.org/grpc/clientconn.go
index 34cc4c9..5a9e7d7 100644
--- a/vendor/google.golang.org/grpc/clientconn.go
+++ b/vendor/google.golang.org/grpc/clientconn.go
@@ -23,6 +23,7 @@
"errors"
"fmt"
"math"
+ "net/url"
"reflect"
"strings"
"sync"
@@ -37,7 +38,6 @@
"google.golang.org/grpc/internal/backoff"
"google.golang.org/grpc/internal/channelz"
"google.golang.org/grpc/internal/grpcsync"
- "google.golang.org/grpc/internal/grpcutil"
iresolver "google.golang.org/grpc/internal/resolver"
"google.golang.org/grpc/internal/transport"
"google.golang.org/grpc/keepalive"
@@ -248,38 +248,15 @@
}
// Determine the resolver to use.
- cc.parsedTarget = grpcutil.ParseTarget(cc.target, cc.dopts.copts.Dialer != nil)
- channelz.Infof(logger, cc.channelzID, "parsed scheme: %q", cc.parsedTarget.Scheme)
- resolverBuilder := cc.getResolver(cc.parsedTarget.Scheme)
- if resolverBuilder == nil {
- // If resolver builder is still nil, the parsed target's scheme is
- // not registered. Fallback to default resolver and set Endpoint to
- // the original target.
- channelz.Infof(logger, cc.channelzID, "scheme %q not registered, fallback to default scheme", cc.parsedTarget.Scheme)
- cc.parsedTarget = resolver.Target{
- Scheme: resolver.GetDefaultScheme(),
- Endpoint: target,
- }
- resolverBuilder = cc.getResolver(cc.parsedTarget.Scheme)
- if resolverBuilder == nil {
- return nil, fmt.Errorf("could not get resolver for default scheme: %q", cc.parsedTarget.Scheme)
- }
+ resolverBuilder, err := cc.parseTargetAndFindResolver()
+ if err != nil {
+ return nil, err
}
-
- creds := cc.dopts.copts.TransportCredentials
- if creds != nil && creds.Info().ServerName != "" {
- cc.authority = creds.Info().ServerName
- } else if cc.dopts.insecure && cc.dopts.authority != "" {
- cc.authority = cc.dopts.authority
- } else if strings.HasPrefix(cc.target, "unix:") || strings.HasPrefix(cc.target, "unix-abstract:") {
- cc.authority = "localhost"
- } else if strings.HasPrefix(cc.parsedTarget.Endpoint, ":") {
- cc.authority = "localhost" + cc.parsedTarget.Endpoint
- } else {
- // Use endpoint from "scheme://authority/endpoint" as the default
- // authority for ClientConn.
- cc.authority = cc.parsedTarget.Endpoint
+ cc.authority, err = determineAuthority(cc.parsedTarget.Endpoint, cc.target, cc.dopts)
+ if err != nil {
+ return nil, err
}
+ channelz.Infof(logger, cc.channelzID, "Channel authority set to %q", cc.authority)
if cc.dopts.scChan != nil && !scSet {
// Blocking wait for the initial service config.
@@ -902,10 +879,7 @@
// ac.state is Ready, try to find the connected address.
var curAddrFound bool
for _, a := range addrs {
- // a.ServerName takes precedent over ClientConn authority, if present.
- if a.ServerName == "" {
- a.ServerName = ac.cc.authority
- }
+ a.ServerName = ac.cc.getServerName(a)
if reflect.DeepEqual(ac.curAddr, a) {
curAddrFound = true
break
@@ -919,6 +893,26 @@
return curAddrFound
}
+// getServerName determines the serverName to be used in the connection
+// handshake. The default value for the serverName is the authority on the
+// ClientConn, which either comes from the user's dial target or through an
+// authority override specified using the WithAuthority dial option. Name
+// resolvers can specify a per-address override for the serverName through the
+// resolver.Address.ServerName field which is used only if the WithAuthority
+// dial option was not used. The rationale is that per-address authority
+// overrides specified by the name resolver can represent a security risk, while
+// an override specified by the user is more dependable since they probably know
+// what they are doing.
+func (cc *ClientConn) getServerName(addr resolver.Address) string {
+ if cc.dopts.authority != "" {
+ return cc.dopts.authority
+ }
+ if addr.ServerName != "" {
+ return addr.ServerName
+ }
+ return cc.authority
+}
+
func getMethodConfig(sc *ServiceConfig, method string) MethodConfig {
if sc == nil {
return MethodConfig{}
@@ -1275,11 +1269,7 @@
prefaceReceived := grpcsync.NewEvent()
connClosed := grpcsync.NewEvent()
- // addr.ServerName takes precedent over ClientConn authority, if present.
- if addr.ServerName == "" {
- addr.ServerName = ac.cc.authority
- }
-
+ addr.ServerName = ac.cc.getServerName(addr)
hctx, hcancel := context.WithCancel(ac.ctx)
hcStarted := false // protected by ac.mu
@@ -1621,3 +1611,114 @@
defer cc.lceMu.Unlock()
return cc.lastConnectionError
}
+
+func (cc *ClientConn) parseTargetAndFindResolver() (resolver.Builder, error) {
+ channelz.Infof(logger, cc.channelzID, "original dial target is: %q", cc.target)
+
+ var rb resolver.Builder
+ parsedTarget, err := parseTarget(cc.target)
+ if err != nil {
+ channelz.Infof(logger, cc.channelzID, "dial target %q parse failed: %v", cc.target, err)
+ } else {
+ channelz.Infof(logger, cc.channelzID, "parsed dial target is: %+v", parsedTarget)
+ rb = cc.getResolver(parsedTarget.Scheme)
+ if rb != nil {
+ cc.parsedTarget = parsedTarget
+ return rb, nil
+ }
+ }
+
+ // We are here because the user's dial target did not contain a scheme or
+ // specified an unregistered scheme. We should fallback to the default
+ // scheme, except when a custom dialer is specified in which case, we should
+ // always use passthrough scheme.
+ defScheme := resolver.GetDefaultScheme()
+ channelz.Infof(logger, cc.channelzID, "fallback to scheme %q", defScheme)
+ canonicalTarget := defScheme + ":///" + cc.target
+
+ parsedTarget, err = parseTarget(canonicalTarget)
+ if err != nil {
+ channelz.Infof(logger, cc.channelzID, "dial target %q parse failed: %v", canonicalTarget, err)
+ return nil, err
+ }
+ channelz.Infof(logger, cc.channelzID, "parsed dial target is: %+v", parsedTarget)
+ rb = cc.getResolver(parsedTarget.Scheme)
+ if rb == nil {
+ return nil, fmt.Errorf("could not get resolver for default scheme: %q", parsedTarget.Scheme)
+ }
+ cc.parsedTarget = parsedTarget
+ return rb, nil
+}
+
+// parseTarget uses RFC 3986 semantics to parse the given target into a
+// resolver.Target struct containing scheme, authority and endpoint. Query
+// params are stripped from the endpoint.
+func parseTarget(target string) (resolver.Target, error) {
+ u, err := url.Parse(target)
+ if err != nil {
+ return resolver.Target{}, err
+ }
+ // For targets of the form "[scheme]://[authority]/endpoint, the endpoint
+ // value returned from url.Parse() contains a leading "/". Although this is
+ // in accordance with RFC 3986, we do not want to break existing resolver
+ // implementations which expect the endpoint without the leading "/". So, we
+ // end up stripping the leading "/" here. But this will result in an
+ // incorrect parsing for something like "unix:///path/to/socket". Since we
+ // own the "unix" resolver, we can workaround in the unix resolver by using
+ // the `URL` field instead of the `Endpoint` field.
+ endpoint := u.Path
+ if endpoint == "" {
+ endpoint = u.Opaque
+ }
+ endpoint = strings.TrimPrefix(endpoint, "/")
+ return resolver.Target{
+ Scheme: u.Scheme,
+ Authority: u.Host,
+ Endpoint: endpoint,
+ URL: *u,
+ }, nil
+}
+
+// Determine channel authority. The order of precedence is as follows:
+// - user specified authority override using `WithAuthority` dial option
+// - creds' notion of server name for the authentication handshake
+// - endpoint from dial target of the form "scheme://[authority]/endpoint"
+func determineAuthority(endpoint, target string, dopts dialOptions) (string, error) {
+ // Historically, we had two options for users to specify the serverName or
+ // authority for a channel. One was through the transport credentials
+ // (either in its constructor, or through the OverrideServerName() method).
+ // The other option (for cases where WithInsecure() dial option was used)
+ // was to use the WithAuthority() dial option.
+ //
+ // A few things have changed since:
+ // - `insecure` package with an implementation of the `TransportCredentials`
+ // interface for the insecure case
+ // - WithAuthority() dial option support for secure credentials
+ authorityFromCreds := ""
+ if creds := dopts.copts.TransportCredentials; creds != nil && creds.Info().ServerName != "" {
+ authorityFromCreds = creds.Info().ServerName
+ }
+ authorityFromDialOption := dopts.authority
+ if (authorityFromCreds != "" && authorityFromDialOption != "") && authorityFromCreds != authorityFromDialOption {
+ return "", fmt.Errorf("ClientConn's authority from transport creds %q and dial option %q don't match", authorityFromCreds, authorityFromDialOption)
+ }
+
+ switch {
+ case authorityFromDialOption != "":
+ return authorityFromDialOption, nil
+ case authorityFromCreds != "":
+ return authorityFromCreds, nil
+ case strings.HasPrefix(target, "unix:") || strings.HasPrefix(target, "unix-abstract:"):
+ // TODO: remove when the unix resolver implements optional interface to
+ // return channel authority.
+ return "localhost", nil
+ case strings.HasPrefix(endpoint, ":"):
+ return "localhost" + endpoint, nil
+ default:
+ // TODO: Define an optional interface on the resolver builder to return
+ // the channel authority given the user's dial target. For resolvers
+ // which don't implement this interface, we will use the endpoint from
+ // "scheme://authority/endpoint" as the default authority.
+ return endpoint, nil
+ }
+}
diff --git a/vendor/google.golang.org/grpc/credentials/credentials.go b/vendor/google.golang.org/grpc/credentials/credentials.go
index 7eee7e4..a671107 100644
--- a/vendor/google.golang.org/grpc/credentials/credentials.go
+++ b/vendor/google.golang.org/grpc/credentials/credentials.go
@@ -140,6 +140,11 @@
// Additionally, ClientHandshakeInfo data will be available via the context
// passed to this call.
//
+ // The second argument to this method is the `:authority` header value used
+ // while creating new streams on this connection after authentication
+ // succeeds. Implementations must use this as the server name during the
+ // authentication handshake.
+ //
// If the returned net.Conn is closed, it MUST close the net.Conn provided.
ClientHandshake(context.Context, string, net.Conn) (net.Conn, AuthInfo, error)
// ServerHandshake does the authentication handshake for servers. It returns
@@ -153,9 +158,13 @@
Info() ProtocolInfo
// Clone makes a copy of this TransportCredentials.
Clone() TransportCredentials
- // OverrideServerName overrides the server name used to verify the hostname on the returned certificates from the server.
- // gRPC internals also use it to override the virtual hosting name if it is set.
- // It must be called before dialing. Currently, this is only used by grpclb.
+ // OverrideServerName specifies the value used for the following:
+ // - verifying the hostname on the returned certificates
+ // - as SNI in the client's handshake to support virtual hosting
+ // - as the value for `:authority` header at stream creation time
+ //
+ // Deprecated: use grpc.WithAuthority instead. Will be supported
+ // throughout 1.x.
OverrideServerName(string) error
}
diff --git a/vendor/google.golang.org/grpc/dialoptions.go b/vendor/google.golang.org/grpc/dialoptions.go
index 7a49723..40d8ba6 100644
--- a/vendor/google.golang.org/grpc/dialoptions.go
+++ b/vendor/google.golang.org/grpc/dialoptions.go
@@ -482,8 +482,7 @@
}
// WithAuthority returns a DialOption that specifies the value to be used as the
-// :authority pseudo-header. This value only works with WithInsecure and has no
-// effect if TransportCredentials are present.
+// :authority pseudo-header and as the server name in authentication handshake.
func WithAuthority(a string) DialOption {
return newFuncDialOption(func(o *dialOptions) {
o.authority = a
@@ -519,14 +518,16 @@
// WithDefaultServiceConfig returns a DialOption that configures the default
// service config, which will be used in cases where:
//
-// 1. WithDisableServiceConfig is also used.
-// 2. Resolver does not return a service config or if the resolver returns an
-// invalid service config.
+// 1. WithDisableServiceConfig is also used, or
//
-// Experimental
+// 2. The name resolver does not provide a service config or provides an
+// invalid service config.
//
-// Notice: This API is EXPERIMENTAL and may be changed or removed in a
-// later release.
+// The parameter s is the JSON representation of the default service config.
+// For more information about service configs, see:
+// https://github.com/grpc/grpc/blob/master/doc/service_config.md
+// For a simple example of usage, see:
+// examples/features/load_balancing/client/main.go
func WithDefaultServiceConfig(s string) DialOption {
return newFuncDialOption(func(o *dialOptions) {
o.defaultServiceConfigRawJSON = &s
@@ -538,14 +539,8 @@
// will happen automatically if no data is written to the wire or if the RPC is
// unprocessed by the remote server.
//
-// Retry support is currently disabled by default, but will be enabled by
-// default in the future. Until then, it may be enabled by setting the
-// environment variable "GRPC_GO_RETRY" to "on".
-//
-// Experimental
-//
-// Notice: This API is EXPERIMENTAL and may be changed or removed in a
-// later release.
+// Retry support is currently enabled by default, but may be disabled by
+// setting the environment variable "GRPC_GO_RETRY" to "off".
func WithDisableRetry() DialOption {
return newFuncDialOption(func(o *dialOptions) {
o.disableRetry = true
diff --git a/vendor/google.golang.org/grpc/go.mod b/vendor/google.golang.org/grpc/go.mod
index 022cc98..fcffdce 100644
--- a/vendor/google.golang.org/grpc/go.mod
+++ b/vendor/google.golang.org/grpc/go.mod
@@ -4,7 +4,8 @@
require (
github.com/cespare/xxhash/v2 v2.1.1
- github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403
+ github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4
+ github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1
github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
github.com/golang/protobuf v1.4.3
diff --git a/vendor/google.golang.org/grpc/go.sum b/vendor/google.golang.org/grpc/go.sum
index 6e7ae0d..8b542e0 100644
--- a/vendor/google.golang.org/grpc/go.sum
+++ b/vendor/google.golang.org/grpc/go.sum
@@ -9,10 +9,13 @@
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
-github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403 h1:cqQfy1jclcSy/FwLjemeg3SR1yaINm74aQyupQ0Bl8M=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
-github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158 h1:CevA8fI91PAnP8vpnXuB8ZYAZ5wqY86nAbxfgK8tWO4=
+github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4 h1:hzAQntlaYRkVSFEfj9OTWlVV1H155FMD8BTKktLv0QI=
+github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
+github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
+github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1 h1:zH8ljVhhq7yC0MIeUL/IviMtY8hx2mK8cN9wEYb8ggw=
+github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
diff --git a/vendor/google.golang.org/grpc/grpclog/loggerv2.go b/vendor/google.golang.org/grpc/grpclog/loggerv2.go
index 4ee3317..34098bb 100644
--- a/vendor/google.golang.org/grpc/grpclog/loggerv2.go
+++ b/vendor/google.golang.org/grpc/grpclog/loggerv2.go
@@ -19,11 +19,14 @@
package grpclog
import (
+ "encoding/json"
+ "fmt"
"io"
"io/ioutil"
"log"
"os"
"strconv"
+ "strings"
"google.golang.org/grpc/internal/grpclog"
)
@@ -95,8 +98,9 @@
// loggerT is the default logger used by grpclog.
type loggerT struct {
- m []*log.Logger
- v int
+ m []*log.Logger
+ v int
+ jsonFormat bool
}
// NewLoggerV2 creates a loggerV2 with the provided writers.
@@ -105,19 +109,32 @@
// Warning logs will be written to warningW and infoW.
// Info logs will be written to infoW.
func NewLoggerV2(infoW, warningW, errorW io.Writer) LoggerV2 {
- return NewLoggerV2WithVerbosity(infoW, warningW, errorW, 0)
+ return newLoggerV2WithConfig(infoW, warningW, errorW, loggerV2Config{})
}
// NewLoggerV2WithVerbosity creates a loggerV2 with the provided writers and
// verbosity level.
func NewLoggerV2WithVerbosity(infoW, warningW, errorW io.Writer, v int) LoggerV2 {
+ return newLoggerV2WithConfig(infoW, warningW, errorW, loggerV2Config{verbose: v})
+}
+
+type loggerV2Config struct {
+ verbose int
+ jsonFormat bool
+}
+
+func newLoggerV2WithConfig(infoW, warningW, errorW io.Writer, c loggerV2Config) LoggerV2 {
var m []*log.Logger
- m = append(m, log.New(infoW, severityName[infoLog]+": ", log.LstdFlags))
- m = append(m, log.New(io.MultiWriter(infoW, warningW), severityName[warningLog]+": ", log.LstdFlags))
+ flag := log.LstdFlags
+ if c.jsonFormat {
+ flag = 0
+ }
+ m = append(m, log.New(infoW, "", flag))
+ m = append(m, log.New(io.MultiWriter(infoW, warningW), "", flag))
ew := io.MultiWriter(infoW, warningW, errorW) // ew will be used for error and fatal.
- m = append(m, log.New(ew, severityName[errorLog]+": ", log.LstdFlags))
- m = append(m, log.New(ew, severityName[fatalLog]+": ", log.LstdFlags))
- return &loggerT{m: m, v: v}
+ m = append(m, log.New(ew, "", flag))
+ m = append(m, log.New(ew, "", flag))
+ return &loggerT{m: m, v: c.verbose, jsonFormat: c.jsonFormat}
}
// newLoggerV2 creates a loggerV2 to be used as default logger.
@@ -142,58 +159,79 @@
if vl, err := strconv.Atoi(vLevel); err == nil {
v = vl
}
- return NewLoggerV2WithVerbosity(infoW, warningW, errorW, v)
+
+ jsonFormat := strings.EqualFold(os.Getenv("GRPC_GO_LOG_FORMATTER"), "json")
+
+ return newLoggerV2WithConfig(infoW, warningW, errorW, loggerV2Config{
+ verbose: v,
+ jsonFormat: jsonFormat,
+ })
+}
+
+func (g *loggerT) output(severity int, s string) {
+ sevStr := severityName[severity]
+ if !g.jsonFormat {
+ g.m[severity].Output(2, fmt.Sprintf("%v: %v", sevStr, s))
+ return
+ }
+ // TODO: we can also include the logging component, but that needs more
+ // (API) changes.
+ b, _ := json.Marshal(map[string]string{
+ "severity": sevStr,
+ "message": s,
+ })
+ g.m[severity].Output(2, string(b))
}
func (g *loggerT) Info(args ...interface{}) {
- g.m[infoLog].Print(args...)
+ g.output(infoLog, fmt.Sprint(args...))
}
func (g *loggerT) Infoln(args ...interface{}) {
- g.m[infoLog].Println(args...)
+ g.output(infoLog, fmt.Sprintln(args...))
}
func (g *loggerT) Infof(format string, args ...interface{}) {
- g.m[infoLog].Printf(format, args...)
+ g.output(infoLog, fmt.Sprintf(format, args...))
}
func (g *loggerT) Warning(args ...interface{}) {
- g.m[warningLog].Print(args...)
+ g.output(warningLog, fmt.Sprint(args...))
}
func (g *loggerT) Warningln(args ...interface{}) {
- g.m[warningLog].Println(args...)
+ g.output(warningLog, fmt.Sprintln(args...))
}
func (g *loggerT) Warningf(format string, args ...interface{}) {
- g.m[warningLog].Printf(format, args...)
+ g.output(warningLog, fmt.Sprintf(format, args...))
}
func (g *loggerT) Error(args ...interface{}) {
- g.m[errorLog].Print(args...)
+ g.output(errorLog, fmt.Sprint(args...))
}
func (g *loggerT) Errorln(args ...interface{}) {
- g.m[errorLog].Println(args...)
+ g.output(errorLog, fmt.Sprintln(args...))
}
func (g *loggerT) Errorf(format string, args ...interface{}) {
- g.m[errorLog].Printf(format, args...)
+ g.output(errorLog, fmt.Sprintf(format, args...))
}
func (g *loggerT) Fatal(args ...interface{}) {
- g.m[fatalLog].Fatal(args...)
- // No need to call os.Exit() again because log.Logger.Fatal() calls os.Exit().
+ g.output(fatalLog, fmt.Sprint(args...))
+ os.Exit(1)
}
func (g *loggerT) Fatalln(args ...interface{}) {
- g.m[fatalLog].Fatalln(args...)
- // No need to call os.Exit() again because log.Logger.Fatal() calls os.Exit().
+ g.output(fatalLog, fmt.Sprintln(args...))
+ os.Exit(1)
}
func (g *loggerT) Fatalf(format string, args ...interface{}) {
- g.m[fatalLog].Fatalf(format, args...)
- // No need to call os.Exit() again because log.Logger.Fatal() calls os.Exit().
+ g.output(fatalLog, fmt.Sprintf(format, args...))
+ os.Exit(1)
}
func (g *loggerT) V(l int) bool {
diff --git a/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go b/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go
index e766ac0..9f25a67 100644
--- a/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go
+++ b/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go
@@ -33,8 +33,9 @@
)
var (
- // Retry is set if retry is explicitly enabled via "GRPC_GO_RETRY=on" or if XDS retry support is enabled.
- Retry = strings.EqualFold(os.Getenv(retryStr), "on") || xdsenv.RetrySupport
+ // Retry is enabled unless explicitly disabled via "GRPC_GO_RETRY=off" or
+ // if XDS retry support is explicitly disabled.
+ Retry = !strings.EqualFold(os.Getenv(retryStr), "off") && xdsenv.RetrySupport
// TXTErrIgnore is set if TXT errors should be ignored ("GRPC_GO_IGNORE_TXT_ERRORS" is not "false").
TXTErrIgnore = !strings.EqualFold(os.Getenv(txtErrIgnoreStr), "false")
)
diff --git a/vendor/google.golang.org/grpc/internal/grpcutil/grpcutil.go b/vendor/google.golang.org/grpc/internal/grpcutil/grpcutil.go
new file mode 100644
index 0000000..e2f948e
--- /dev/null
+++ b/vendor/google.golang.org/grpc/internal/grpcutil/grpcutil.go
@@ -0,0 +1,20 @@
+/*
+ *
+ * Copyright 2021 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// Package grpcutil provides utility functions used across the gRPC codebase.
+package grpcutil
diff --git a/vendor/google.golang.org/grpc/internal/grpcutil/regex.go b/vendor/google.golang.org/grpc/internal/grpcutil/regex.go
new file mode 100644
index 0000000..2810a8b
--- /dev/null
+++ b/vendor/google.golang.org/grpc/internal/grpcutil/regex.go
@@ -0,0 +1,28 @@
+/*
+ *
+ * Copyright 2021 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package grpcutil
+
+import "regexp"
+
+// FullMatchWithRegex returns whether the full string matches the regex provided.
+func FullMatchWithRegex(re *regexp.Regexp, string string) bool {
+ re.Longest()
+ rem := re.FindString(string)
+ return len(rem) == len(string)
+}
diff --git a/vendor/google.golang.org/grpc/internal/grpcutil/target.go b/vendor/google.golang.org/grpc/internal/grpcutil/target.go
deleted file mode 100644
index 8833021..0000000
--- a/vendor/google.golang.org/grpc/internal/grpcutil/target.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- *
- * Copyright 2020 gRPC authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// Package grpcutil provides a bunch of utility functions to be used across the
-// gRPC codebase.
-package grpcutil
-
-import (
- "strings"
-
- "google.golang.org/grpc/resolver"
-)
-
-// split2 returns the values from strings.SplitN(s, sep, 2).
-// If sep is not found, it returns ("", "", false) instead.
-func split2(s, sep string) (string, string, bool) {
- spl := strings.SplitN(s, sep, 2)
- if len(spl) < 2 {
- return "", "", false
- }
- return spl[0], spl[1], true
-}
-
-// ParseTarget splits target into a resolver.Target struct containing scheme,
-// authority and endpoint. skipUnixColonParsing indicates that the parse should
-// not parse "unix:[path]" cases. This should be true in cases where a custom
-// dialer is present, to prevent a behavior change.
-//
-// If target is not a valid scheme://authority/endpoint as specified in
-// https://github.com/grpc/grpc/blob/master/doc/naming.md,
-// it returns {Endpoint: target}.
-func ParseTarget(target string, skipUnixColonParsing bool) (ret resolver.Target) {
- var ok bool
- if strings.HasPrefix(target, "unix-abstract:") {
- if strings.HasPrefix(target, "unix-abstract://") {
- // Maybe, with Authority specified, try to parse it
- var remain string
- ret.Scheme, remain, _ = split2(target, "://")
- ret.Authority, ret.Endpoint, ok = split2(remain, "/")
- if !ok {
- // No Authority, add the "//" back
- ret.Endpoint = "//" + remain
- } else {
- // Found Authority, add the "/" back
- ret.Endpoint = "/" + ret.Endpoint
- }
- } else {
- // Without Authority specified, split target on ":"
- ret.Scheme, ret.Endpoint, _ = split2(target, ":")
- }
- return ret
- }
- ret.Scheme, ret.Endpoint, ok = split2(target, "://")
- if !ok {
- if strings.HasPrefix(target, "unix:") && !skipUnixColonParsing {
- // Handle the "unix:[local/path]" and "unix:[/absolute/path]" cases,
- // because splitting on :// only handles the
- // "unix://[/absolute/path]" case. Only handle if the dialer is nil,
- // to avoid a behavior change with custom dialers.
- return resolver.Target{Scheme: "unix", Endpoint: target[len("unix:"):]}
- }
- return resolver.Target{Endpoint: target}
- }
- ret.Authority, ret.Endpoint, ok = split2(ret.Endpoint, "/")
- if !ok {
- return resolver.Target{Endpoint: target}
- }
- if ret.Scheme == "unix" {
- // Add the "/" back in the unix case, so the unix resolver receives the
- // actual endpoint in the "unix://[/absolute/path]" case.
- ret.Endpoint = "/" + ret.Endpoint
- }
- return ret
-}
diff --git a/vendor/google.golang.org/grpc/internal/metadata/metadata.go b/vendor/google.golang.org/grpc/internal/metadata/metadata.go
index 3022626..b8733db 100644
--- a/vendor/google.golang.org/grpc/internal/metadata/metadata.go
+++ b/vendor/google.golang.org/grpc/internal/metadata/metadata.go
@@ -30,14 +30,38 @@
const mdKey = mdKeyType("grpc.internal.address.metadata")
+type mdValue metadata.MD
+
+func (m mdValue) Equal(o interface{}) bool {
+ om, ok := o.(mdValue)
+ if !ok {
+ return false
+ }
+ if len(m) != len(om) {
+ return false
+ }
+ for k, v := range m {
+ ov := om[k]
+ if len(ov) != len(v) {
+ return false
+ }
+ for i, ve := range v {
+ if ov[i] != ve {
+ return false
+ }
+ }
+ }
+ return true
+}
+
// Get returns the metadata of addr.
func Get(addr resolver.Address) metadata.MD {
attrs := addr.Attributes
if attrs == nil {
return nil
}
- md, _ := attrs.Value(mdKey).(metadata.MD)
- return md
+ md, _ := attrs.Value(mdKey).(mdValue)
+ return metadata.MD(md)
}
// Set sets (overrides) the metadata in addr.
@@ -45,6 +69,6 @@
// When a SubConn is created with this address, the RPCs sent on it will all
// have this metadata.
func Set(addr resolver.Address, md metadata.MD) resolver.Address {
- addr.Attributes = addr.Attributes.WithValues(mdKey, md)
+ addr.Attributes = addr.Attributes.WithValue(mdKey, mdValue(md))
return addr
}
diff --git a/vendor/google.golang.org/grpc/internal/resolver/config_selector.go b/vendor/google.golang.org/grpc/internal/resolver/config_selector.go
index be7e13d..c7a18a9 100644
--- a/vendor/google.golang.org/grpc/internal/resolver/config_selector.go
+++ b/vendor/google.golang.org/grpc/internal/resolver/config_selector.go
@@ -132,7 +132,7 @@
// SetConfigSelector sets the config selector in state and returns the new
// state.
func SetConfigSelector(state resolver.State, cs ConfigSelector) resolver.State {
- state.Attributes = state.Attributes.WithValues(csKey, cs)
+ state.Attributes = state.Attributes.WithValue(csKey, cs)
return state
}
diff --git a/vendor/google.golang.org/grpc/internal/resolver/unix/unix.go b/vendor/google.golang.org/grpc/internal/resolver/unix/unix.go
index 0d5a811..20852e5 100644
--- a/vendor/google.golang.org/grpc/internal/resolver/unix/unix.go
+++ b/vendor/google.golang.org/grpc/internal/resolver/unix/unix.go
@@ -37,7 +37,17 @@
if target.Authority != "" {
return nil, fmt.Errorf("invalid (non-empty) authority: %v", target.Authority)
}
- addr := resolver.Address{Addr: target.Endpoint}
+
+ // gRPC was parsing the dial target manually before PR #4817, and we
+ // switched to using url.Parse() in that PR. To avoid breaking existing
+ // resolver implementations we ended up stripping the leading "/" from the
+ // endpoint. This obviously does not work for the "unix" scheme. Hence we
+ // end up using the parsed URL instead.
+ endpoint := target.URL.Path
+ if endpoint == "" {
+ endpoint = target.URL.Opaque
+ }
+ addr := resolver.Address{Addr: endpoint}
if b.scheme == unixAbstractScheme {
// prepend "\x00" to address for unix-abstract
addr.Addr = "\x00" + addr.Addr
diff --git a/vendor/google.golang.org/grpc/internal/transport/controlbuf.go b/vendor/google.golang.org/grpc/internal/transport/controlbuf.go
index 45532f8..8394d25 100644
--- a/vendor/google.golang.org/grpc/internal/transport/controlbuf.go
+++ b/vendor/google.golang.org/grpc/internal/transport/controlbuf.go
@@ -133,6 +133,7 @@
func (c *cleanupStream) isTransportResponseFrame() bool { return c.rst } // Results in a RST_STREAM
type earlyAbortStream struct {
+ httpStatus uint32
streamID uint32
contentSubtype string
status *status.Status
@@ -771,9 +772,12 @@
if l.side == clientSide {
return errors.New("earlyAbortStream not handled on client")
}
-
+ // In case the caller forgets to set the http status, default to 200.
+ if eas.httpStatus == 0 {
+ eas.httpStatus = 200
+ }
headerFields := []hpack.HeaderField{
- {Name: ":status", Value: "200"},
+ {Name: ":status", Value: strconv.Itoa(int(eas.httpStatus))},
{Name: "content-type", Value: grpcutil.ContentType(eas.contentSubtype)},
{Name: "grpc-status", Value: strconv.Itoa(int(eas.status.Code()))},
{Name: "grpc-message", Value: encodeGrpcMessage(eas.status.Message())},
diff --git a/vendor/google.golang.org/grpc/internal/transport/http2_client.go b/vendor/google.golang.org/grpc/internal/transport/http2_client.go
index 7558630..2521a7d 100644
--- a/vendor/google.golang.org/grpc/internal/transport/http2_client.go
+++ b/vendor/google.golang.org/grpc/internal/transport/http2_client.go
@@ -25,6 +25,7 @@
"math"
"net"
"net/http"
+ "path/filepath"
"strconv"
"strings"
"sync"
@@ -146,13 +147,20 @@
address := addr.Addr
networkType, ok := networktype.Get(addr)
if fn != nil {
+ // Special handling for unix scheme with custom dialer. Back in the day,
+ // we did not have a unix resolver and therefore targets with a unix
+ // scheme would end up using the passthrough resolver. So, user's used a
+ // custom dialer in this case and expected the original dial target to
+ // be passed to the custom dialer. Now, we have a unix resolver. But if
+ // a custom dialer is specified, we want to retain the old behavior in
+ // terms of the address being passed to the custom dialer.
if networkType == "unix" && !strings.HasPrefix(address, "\x00") {
- // For backward compatibility, if the user dialed "unix:///path",
- // the passthrough resolver would be used and the user's custom
- // dialer would see "unix:///path". Since the unix resolver is used
- // and the address is now "/path", prepend "unix://" so the user's
- // custom dialer sees the same address.
- return fn(ctx, "unix://"+address)
+ // Supported unix targets are either "unix://absolute-path" or
+ // "unix:relative-path".
+ if filepath.IsAbs(address) {
+ return fn(ctx, "unix://"+address)
+ }
+ return fn(ctx, "unix:"+address)
}
return fn(ctx, address)
}
@@ -1073,7 +1081,7 @@
}
// The server has closed the stream without sending trailers. Record that
// the read direction is closed, and set the status appropriately.
- if f.FrameHeader.Flags.Has(http2.FlagDataEndStream) {
+ if f.StreamEnded() {
t.closeStream(s, io.EOF, false, http2.ErrCodeNo, status.New(codes.Internal, "server closed the stream without sending trailers"), nil, true)
}
}
@@ -1403,26 +1411,6 @@
}
isHeader := false
- defer func() {
- if t.statsHandler != nil {
- if isHeader {
- inHeader := &stats.InHeader{
- Client: true,
- WireLength: int(frame.Header().Length),
- Header: s.header.Copy(),
- Compression: s.recvCompress,
- }
- t.statsHandler.HandleRPC(s.ctx, inHeader)
- } else {
- inTrailer := &stats.InTrailer{
- Client: true,
- WireLength: int(frame.Header().Length),
- Trailer: s.trailer.Copy(),
- }
- t.statsHandler.HandleRPC(s.ctx, inTrailer)
- }
- }
- }()
// If headerChan hasn't been closed yet
if atomic.CompareAndSwapUint32(&s.headerChanClosed, 0, 1) {
@@ -1444,6 +1432,25 @@
close(s.headerChan)
}
+ if t.statsHandler != nil {
+ if isHeader {
+ inHeader := &stats.InHeader{
+ Client: true,
+ WireLength: int(frame.Header().Length),
+ Header: metadata.MD(mdata).Copy(),
+ Compression: s.recvCompress,
+ }
+ t.statsHandler.HandleRPC(s.ctx, inHeader)
+ } else {
+ inTrailer := &stats.InTrailer{
+ Client: true,
+ WireLength: int(frame.Header().Length),
+ Trailer: metadata.MD(mdata).Copy(),
+ }
+ t.statsHandler.HandleRPC(s.ctx, inTrailer)
+ }
+ }
+
if !endStream {
return
}
diff --git a/vendor/google.golang.org/grpc/internal/transport/http2_server.go b/vendor/google.golang.org/grpc/internal/transport/http2_server.go
index 19c13e0..f2cad9e 100644
--- a/vendor/google.golang.org/grpc/internal/transport/http2_server.go
+++ b/vendor/google.golang.org/grpc/internal/transport/http2_server.go
@@ -129,7 +129,7 @@
// options from config.
//
// It returns a non-nil transport and a nil error on success. On failure, it
-// returns a non-nil transport and a nil-error. For a special case where the
+// returns a nil transport and a non-nil error. For a special case where the
// underlying conn gets closed before the client preface could be read, it
// returns a nil transport and a nil error.
func NewServerTransport(conn net.Conn, config *ServerConfig) (_ ServerTransport, err error) {
@@ -290,10 +290,11 @@
if _, err := io.ReadFull(t.conn, preface); err != nil {
// In deployments where a gRPC server runs behind a cloud load balancer
// which performs regular TCP level health checks, the connection is
- // closed immediately by the latter. Skipping the error here will help
- // reduce log clutter.
+ // closed immediately by the latter. Returning io.EOF here allows the
+ // grpc server implementation to recognize this scenario and suppress
+ // logging to reduce spam.
if err == io.EOF {
- return nil, nil
+ return nil, io.EOF
}
return nil, connectionErrorf(false, err, "transport: http2Server.HandleStreams failed to receive the preface from client: %v", err)
}
@@ -390,6 +391,13 @@
if timeout, err = decodeTimeout(hf.Value); err != nil {
headerError = true
}
+ // "Transports must consider requests containing the Connection header
+ // as malformed." - A41
+ case "connection":
+ if logger.V(logLevel) {
+ logger.Errorf("transport: http2Server.operateHeaders parsed a :connection header which makes a request malformed as per the HTTP/2 spec")
+ }
+ headerError = true
default:
if isReservedHeader(hf.Name) && !isWhitelistedHeader(hf.Name) {
break
@@ -404,6 +412,25 @@
}
}
+ // "If multiple Host headers or multiple :authority headers are present, the
+ // request must be rejected with an HTTP status code 400 as required by Host
+ // validation in RFC 7230 §5.4, gRPC status code INTERNAL, or RST_STREAM
+ // with HTTP/2 error code PROTOCOL_ERROR." - A41. Since this is a HTTP/2
+ // error, this takes precedence over a client not speaking gRPC.
+ if len(mdata[":authority"]) > 1 || len(mdata["host"]) > 1 {
+ errMsg := fmt.Sprintf("num values of :authority: %v, num values of host: %v, both must only have 1 value as per HTTP/2 spec", len(mdata[":authority"]), len(mdata["host"]))
+ if logger.V(logLevel) {
+ logger.Errorf("transport: %v", errMsg)
+ }
+ t.controlBuf.put(&earlyAbortStream{
+ httpStatus: 400,
+ streamID: streamID,
+ contentSubtype: s.contentSubtype,
+ status: status.New(codes.Internal, errMsg),
+ })
+ return false
+ }
+
if !isGRPC || headerError {
t.controlBuf.put(&cleanupStream{
streamID: streamID,
@@ -414,6 +441,19 @@
return false
}
+ // "If :authority is missing, Host must be renamed to :authority." - A41
+ if len(mdata[":authority"]) == 0 {
+ // No-op if host isn't present, no eventual :authority header is a valid
+ // RPC.
+ if host, ok := mdata["host"]; ok {
+ mdata[":authority"] = host
+ delete(mdata, "host")
+ }
+ } else {
+ // "If :authority is present, Host must be discarded" - A41
+ delete(mdata, "host")
+ }
+
if frame.StreamEnded() {
// s is just created by the caller. No lock needed.
s.state = streamReadDone
@@ -494,6 +534,7 @@
stat = status.New(codes.PermissionDenied, err.Error())
}
t.controlBuf.put(&earlyAbortStream{
+ httpStatus: 200,
streamID: s.id,
contentSubtype: s.contentSubtype,
status: stat,
@@ -734,7 +775,7 @@
s.write(recvMsg{buffer: buffer})
}
}
- if f.Header().Flags.Has(http2.FlagDataEndStream) {
+ if f.StreamEnded() {
// Received the end of stream from the client.
s.compareAndSwapState(streamActive, streamReadDone)
s.write(recvMsg{err: io.EOF})
diff --git a/vendor/google.golang.org/grpc/internal/transport/networktype/networktype.go b/vendor/google.golang.org/grpc/internal/transport/networktype/networktype.go
index 7bb53cf..c11b527 100644
--- a/vendor/google.golang.org/grpc/internal/transport/networktype/networktype.go
+++ b/vendor/google.golang.org/grpc/internal/transport/networktype/networktype.go
@@ -31,7 +31,7 @@
// Set returns a copy of the provided address with attributes containing networkType.
func Set(address resolver.Address, networkType string) resolver.Address {
- address.Attributes = address.Attributes.WithValues(key, networkType)
+ address.Attributes = address.Attributes.WithValue(key, networkType)
return address
}
diff --git a/vendor/google.golang.org/grpc/internal/xds/env/env.go b/vendor/google.golang.org/grpc/internal/xds/env/env.go
index b171ac9..87d3c24 100644
--- a/vendor/google.golang.org/grpc/internal/xds/env/env.go
+++ b/vendor/google.golang.org/grpc/internal/xds/env/env.go
@@ -43,7 +43,7 @@
clientSideSecuritySupportEnv = "GRPC_XDS_EXPERIMENTAL_SECURITY_SUPPORT"
aggregateAndDNSSupportEnv = "GRPC_XDS_EXPERIMENTAL_ENABLE_AGGREGATE_AND_LOGICAL_DNS_CLUSTER"
retrySupportEnv = "GRPC_XDS_EXPERIMENTAL_ENABLE_RETRY"
- rbacSupportEnv = "GRPC_XDS_EXPERIMENTAL_ENABLE_RBAC"
+ rbacSupportEnv = "GRPC_XDS_EXPERIMENTAL_RBAC"
c2pResolverSupportEnv = "GRPC_EXPERIMENTAL_GOOGLE_C2P_RESOLVER"
c2pResolverTestOnlyTrafficDirectorURIEnv = "GRPC_TEST_ONLY_GOOGLE_C2P_RESOLVER_TRAFFIC_DIRECTOR_URI"
@@ -83,8 +83,10 @@
// RetrySupport indicates whether xDS retry is enabled.
RetrySupport = !strings.EqualFold(os.Getenv(retrySupportEnv), "false")
- // RBACSupport indicates whether xDS configured RBAC HTTP Filter is enabled.
- RBACSupport = strings.EqualFold(os.Getenv(rbacSupportEnv), "true")
+ // RBACSupport indicates whether xDS configured RBAC HTTP Filter is enabled,
+ // which can be disabled by setting the environment variable
+ // "GRPC_XDS_EXPERIMENTAL_RBAC" to "false".
+ RBACSupport = !strings.EqualFold(os.Getenv(rbacSupportEnv), "false")
// C2PResolverSupport indicates whether support for C2P resolver is enabled.
// This can be enabled by setting the environment variable
diff --git a/vendor/google.golang.org/grpc/internal/xds_handshake_cluster.go b/vendor/google.golang.org/grpc/internal/xds_handshake_cluster.go
index 3677c3f..e8b4927 100644
--- a/vendor/google.golang.org/grpc/internal/xds_handshake_cluster.go
+++ b/vendor/google.golang.org/grpc/internal/xds_handshake_cluster.go
@@ -28,7 +28,7 @@
// SetXDSHandshakeClusterName returns a copy of addr in which the Attributes field
// is updated with the cluster name.
func SetXDSHandshakeClusterName(addr resolver.Address, clusterName string) resolver.Address {
- addr.Attributes = addr.Attributes.WithValues(handshakeClusterNameKey{}, clusterName)
+ addr.Attributes = addr.Attributes.WithValue(handshakeClusterNameKey{}, clusterName)
return addr
}
diff --git a/vendor/google.golang.org/grpc/picker_wrapper.go b/vendor/google.golang.org/grpc/picker_wrapper.go
index 0878ada..e8367cb 100644
--- a/vendor/google.golang.org/grpc/picker_wrapper.go
+++ b/vendor/google.golang.org/grpc/picker_wrapper.go
@@ -144,7 +144,7 @@
acw, ok := pickResult.SubConn.(*acBalancerWrapper)
if !ok {
- logger.Error("subconn returned from pick is not *acBalancerWrapper")
+ logger.Errorf("subconn returned from pick is type %T, not *acBalancerWrapper", pickResult.SubConn)
continue
}
if t := acw.getAddrConn().getReadyTransport(); t != nil {
diff --git a/vendor/google.golang.org/grpc/resolver/map.go b/vendor/google.golang.org/grpc/resolver/map.go
new file mode 100644
index 0000000..e87ecd0
--- /dev/null
+++ b/vendor/google.golang.org/grpc/resolver/map.go
@@ -0,0 +1,109 @@
+/*
+ *
+ * Copyright 2021 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package resolver
+
+type addressMapEntry struct {
+ addr Address
+ value interface{}
+}
+
+// AddressMap is a map of addresses to arbitrary values taking into account
+// Attributes. BalancerAttributes are ignored, as are Metadata and Type.
+// Multiple accesses may not be performed concurrently. Must be created via
+// NewAddressMap; do not construct directly.
+type AddressMap struct {
+ m map[string]addressMapEntryList
+}
+
+type addressMapEntryList []*addressMapEntry
+
+// NewAddressMap creates a new AddressMap.
+func NewAddressMap() *AddressMap {
+ return &AddressMap{m: make(map[string]addressMapEntryList)}
+}
+
+// find returns the index of addr in the addressMapEntry slice, or -1 if not
+// present.
+func (l addressMapEntryList) find(addr Address) int {
+ if len(l) == 0 {
+ return -1
+ }
+ for i, entry := range l {
+ if entry.addr.ServerName == addr.ServerName &&
+ entry.addr.Attributes.Equal(addr.Attributes) {
+ return i
+ }
+ }
+ return -1
+}
+
+// Get returns the value for the address in the map, if present.
+func (a *AddressMap) Get(addr Address) (value interface{}, ok bool) {
+ entryList := a.m[addr.Addr]
+ if entry := entryList.find(addr); entry != -1 {
+ return entryList[entry].value, true
+ }
+ return nil, false
+}
+
+// Set updates or adds the value to the address in the map.
+func (a *AddressMap) Set(addr Address, value interface{}) {
+ entryList := a.m[addr.Addr]
+ if entry := entryList.find(addr); entry != -1 {
+ a.m[addr.Addr][entry].value = value
+ return
+ }
+ a.m[addr.Addr] = append(a.m[addr.Addr], &addressMapEntry{addr: addr, value: value})
+}
+
+// Delete removes addr from the map.
+func (a *AddressMap) Delete(addr Address) {
+ entryList := a.m[addr.Addr]
+ entry := entryList.find(addr)
+ if entry == -1 {
+ return
+ }
+ if len(entryList) == 1 {
+ entryList = nil
+ } else {
+ copy(entryList[entry:], entryList[entry+1:])
+ entryList = entryList[:len(entryList)-1]
+ }
+ a.m[addr.Addr] = entryList
+}
+
+// Len returns the number of entries in the map.
+func (a *AddressMap) Len() int {
+ ret := 0
+ for _, entryList := range a.m {
+ ret += len(entryList)
+ }
+ return ret
+}
+
+// Keys returns a slice of all current map keys.
+func (a *AddressMap) Keys() []Address {
+ ret := make([]Address, 0, a.Len())
+ for _, entryList := range a.m {
+ for _, entry := range entryList {
+ ret = append(ret, entry.addr)
+ }
+ }
+ return ret
+}
diff --git a/vendor/google.golang.org/grpc/resolver/resolver.go b/vendor/google.golang.org/grpc/resolver/resolver.go
index 6a9d234..e28b680 100644
--- a/vendor/google.golang.org/grpc/resolver/resolver.go
+++ b/vendor/google.golang.org/grpc/resolver/resolver.go
@@ -23,6 +23,7 @@
import (
"context"
"net"
+ "net/url"
"google.golang.org/grpc/attributes"
"google.golang.org/grpc/credentials"
@@ -116,9 +117,14 @@
ServerName string
// Attributes contains arbitrary data about this address intended for
- // consumption by the load balancing policy.
+ // consumption by the SubConn.
Attributes *attributes.Attributes
+ // BalancerAttributes contains arbitrary data about this address intended
+ // for consumption by the LB policy. These attribes do not affect SubConn
+ // creation, connection establishment, handshaking, etc.
+ BalancerAttributes *attributes.Attributes
+
// Type is the type of this address.
//
// Deprecated: use Attributes instead.
@@ -131,6 +137,15 @@
Metadata interface{}
}
+// Equal returns whether a and o are identical. Metadata is compared directly,
+// not with any recursive introspection.
+func (a *Address) Equal(o Address) bool {
+ return a.Addr == o.Addr && a.ServerName == o.ServerName &&
+ a.Attributes.Equal(o.Attributes) &&
+ a.BalancerAttributes.Equal(o.BalancerAttributes) &&
+ a.Type == o.Type && a.Metadata == o.Metadata
+}
+
// BuildOptions includes additional information for the builder to create
// the resolver.
type BuildOptions struct {
@@ -204,25 +219,36 @@
// Target represents a target for gRPC, as specified in:
// https://github.com/grpc/grpc/blob/master/doc/naming.md.
-// It is parsed from the target string that gets passed into Dial or DialContext by the user. And
-// grpc passes it to the resolver and the balancer.
+// It is parsed from the target string that gets passed into Dial or DialContext
+// by the user. And gRPC passes it to the resolver and the balancer.
//
-// If the target follows the naming spec, and the parsed scheme is registered with grpc, we will
-// parse the target string according to the spec. e.g. "dns://some_authority/foo.bar" will be parsed
-// into &Target{Scheme: "dns", Authority: "some_authority", Endpoint: "foo.bar"}
+// If the target follows the naming spec, and the parsed scheme is registered
+// with gRPC, we will parse the target string according to the spec. If the
+// target does not contain a scheme or if the parsed scheme is not registered
+// (i.e. no corresponding resolver available to resolve the endpoint), we will
+// apply the default scheme, and will attempt to reparse it.
//
-// If the target does not contain a scheme, we will apply the default scheme, and set the Target to
-// be the full target string. e.g. "foo.bar" will be parsed into
-// &Target{Scheme: resolver.GetDefaultScheme(), Endpoint: "foo.bar"}.
+// Examples:
//
-// If the parsed scheme is not registered (i.e. no corresponding resolver available to resolve the
-// endpoint), we set the Scheme to be the default scheme, and set the Endpoint to be the full target
-// string. e.g. target string "unknown_scheme://authority/endpoint" will be parsed into
-// &Target{Scheme: resolver.GetDefaultScheme(), Endpoint: "unknown_scheme://authority/endpoint"}.
+// - "dns://some_authority/foo.bar"
+// Target{Scheme: "dns", Authority: "some_authority", Endpoint: "foo.bar"}
+// - "foo.bar"
+// Target{Scheme: resolver.GetDefaultScheme(), Endpoint: "foo.bar"}
+// - "unknown_scheme://authority/endpoint"
+// Target{Scheme: resolver.GetDefaultScheme(), Endpoint: "unknown_scheme://authority/endpoint"}
type Target struct {
- Scheme string
+ // Deprecated: use URL.Scheme instead.
+ Scheme string
+ // Deprecated: use URL.Host instead.
Authority string
- Endpoint string
+ // Deprecated: use URL.Path or URL.Opaque instead. The latter is set when
+ // the former is empty.
+ Endpoint string
+ // URL contains the parsed dial target with an optional default scheme added
+ // to it if the original dial target contained no scheme or contained an
+ // unregistered scheme. Any query params specified in the original dial
+ // target can be accessed from here.
+ URL url.URL
}
// Builder creates a resolver that will be used to watch name resolution updates.
diff --git a/vendor/google.golang.org/grpc/server.go b/vendor/google.golang.org/grpc/server.go
index 557f295..eadf9e0 100644
--- a/vendor/google.golang.org/grpc/server.go
+++ b/vendor/google.golang.org/grpc/server.go
@@ -885,13 +885,11 @@
// ErrConnDispatched means that the connection was dispatched away from
// gRPC; those connections should be left open.
if err != credentials.ErrConnDispatched {
- c.Close()
- }
- // Don't log on ErrConnDispatched and io.EOF to prevent log spam.
- if err != credentials.ErrConnDispatched {
+ // Don't log on ErrConnDispatched and io.EOF to prevent log spam.
if err != io.EOF {
channelz.Warning(logger, s.channelzID, "grpc: Server.Serve failed to create ServerTransport: ", err)
}
+ c.Close()
}
return nil
}
@@ -1106,16 +1104,21 @@
func chainUnaryInterceptors(interceptors []UnaryServerInterceptor) UnaryServerInterceptor {
return func(ctx context.Context, req interface{}, info *UnaryServerInfo, handler UnaryHandler) (interface{}, error) {
- var i int
- var next UnaryHandler
- next = func(ctx context.Context, req interface{}) (interface{}, error) {
- if i == len(interceptors)-1 {
- return interceptors[i](ctx, req, info, handler)
- }
- i++
- return interceptors[i-1](ctx, req, info, next)
+ // the struct ensures the variables are allocated together, rather than separately, since we
+ // know they should be garbage collected together. This saves 1 allocation and decreases
+ // time/call by about 10% on the microbenchmark.
+ var state struct {
+ i int
+ next UnaryHandler
}
- return next(ctx, req)
+ state.next = func(ctx context.Context, req interface{}) (interface{}, error) {
+ if state.i == len(interceptors)-1 {
+ return interceptors[state.i](ctx, req, info, handler)
+ }
+ state.i++
+ return interceptors[state.i-1](ctx, req, info, state.next)
+ }
+ return state.next(ctx, req)
}
}
@@ -1391,16 +1394,21 @@
func chainStreamInterceptors(interceptors []StreamServerInterceptor) StreamServerInterceptor {
return func(srv interface{}, ss ServerStream, info *StreamServerInfo, handler StreamHandler) error {
- var i int
- var next StreamHandler
- next = func(srv interface{}, ss ServerStream) error {
- if i == len(interceptors)-1 {
- return interceptors[i](srv, ss, info, handler)
- }
- i++
- return interceptors[i-1](srv, ss, info, next)
+ // the struct ensures the variables are allocated together, rather than separately, since we
+ // know they should be garbage collected together. This saves 1 allocation and decreases
+ // time/call by about 10% on the microbenchmark.
+ var state struct {
+ i int
+ next StreamHandler
}
- return next(srv, ss)
+ state.next = func(srv interface{}, ss ServerStream) error {
+ if state.i == len(interceptors)-1 {
+ return interceptors[state.i](srv, ss, info, handler)
+ }
+ state.i++
+ return interceptors[state.i-1](srv, ss, info, state.next)
+ }
+ return state.next(srv, ss)
}
}
diff --git a/vendor/google.golang.org/grpc/status/status.go b/vendor/google.golang.org/grpc/status/status.go
index 54d1871..af2cffe 100644
--- a/vendor/google.golang.org/grpc/status/status.go
+++ b/vendor/google.golang.org/grpc/status/status.go
@@ -73,11 +73,16 @@
return status.FromProto(s)
}
-// FromError returns a Status representing err if it was produced by this
-// package or has a method `GRPCStatus() *Status`.
-// If err is nil, a Status is returned with codes.OK and no message.
-// Otherwise, ok is false and a Status is returned with codes.Unknown and
-// the original error message.
+// FromError returns a Status representation of err.
+//
+// - If err was produced by this package or implements the method `GRPCStatus()
+// *Status`, the appropriate Status is returned.
+//
+// - If err is nil, a Status is returned with codes.OK and no message.
+//
+// - Otherwise, err is an error not compatible with this package. In this
+// case, a Status is returned with codes.Unknown and err's Error() message,
+// and ok is false.
func FromError(err error) (s *Status, ok bool) {
if err == nil {
return nil, true
diff --git a/vendor/google.golang.org/grpc/version.go b/vendor/google.golang.org/grpc/version.go
index 48594bc..1a5fd58 100644
--- a/vendor/google.golang.org/grpc/version.go
+++ b/vendor/google.golang.org/grpc/version.go
@@ -19,4 +19,4 @@
package grpc
// Version is the current grpc version.
-const Version = "1.41.0"
+const Version = "1.42.0"
diff --git a/vendor/modules.txt b/vendor/modules.txt
index d1aeaff..6923b53 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -21,11 +21,11 @@
golang.org/x/text/transform
golang.org/x/text/unicode/bidi
golang.org/x/text/unicode/norm
-# google.golang.org/genproto v0.0.0-20211101144312-62acf1d99145
+# google.golang.org/genproto v0.0.0-20211207154714-918901c715cf
## explicit
google.golang.org/genproto/googleapis/api/annotations
google.golang.org/genproto/googleapis/rpc/status
-# google.golang.org/grpc v1.41.0
+# google.golang.org/grpc v1.42.0
## explicit
google.golang.org/grpc
google.golang.org/grpc/attributes
diff --git a/voltha.pb b/voltha.pb
index 9a6122d..9c773ff 100644
--- a/voltha.pb
+++ b/voltha.pb
Binary files differ