Skip to content

Commit

Permalink
update to latest sdk (#14)
Browse files Browse the repository at this point in the history
Signed-off-by: Denis Tingaikin <denis.tingajkin@xored.com>
  • Loading branch information
denis-tingaikin authored Feb 24, 2021
1 parent 9d1b08a commit 56566ef
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 15 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ go 1.15
require (
github.com/antonfisher/nested-logrus-formatter v1.3.0
github.com/edwarnicke/debug v1.0.0
github.com/edwarnicke/grpcfd v0.0.0-20201107002751-f220aed0c5c8
github.com/edwarnicke/grpcfd v0.0.0-20210219150442-10fb469a6976
github.com/edwarnicke/signalctx v0.0.0-20201105214533-3a35840b3011
github.com/edwarnicke/vpphelper v0.0.0-20201229173204-87a3b197f1e1
github.com/google/uuid v1.1.2
github.com/kelseyhightower/envconfig v1.4.0
github.com/networkservicemesh/api v0.0.0-20210218170701-1a72f1cba074
github.com/networkservicemesh/sdk v0.0.0-20210220122417-bab01203bb73
github.com/networkservicemesh/sdk v0.0.0-20210224081403-0d4993b39509
github.com/networkservicemesh/sdk-vpp v0.0.0-20210220122805-99076822b6e1
github.com/sirupsen/logrus v1.7.0
github.com/spiffe/go-spiffe/v2 v2.0.0-beta.4
Expand Down
8 changes: 6 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ github.com/DataDog/datadog-go v2.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3
github.com/Djarvur/go-err113 v0.0.0-20200511133814-5174e21577d5/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs=
github.com/HdrHistogram/hdrhistogram-go v1.0.0 h1:jivTvI9tBw5B8wW9Qd0uoQ2qaajb29y4TPhYTgh8Lb0=
github.com/HdrHistogram/hdrhistogram-go v1.0.0/go.mod h1:YzE1EgsuAz8q9lfGdlxBZo2Ma655+PfKp2mlzcAqIFw=
github.com/HdrHistogram/hdrhistogram-go v1.0.1 h1:GX8GAYDuhlFQnI2fRDHQhTlkHMz8bEn0jTI6LJU0mpw=
github.com/HdrHistogram/hdrhistogram-go v1.0.1/go.mod h1:BWJ+nMSHY3L41Zj7CA3uXnloDp7xxV0YvstAE7nKTaM=
github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/OneOfOne/xxhash v1.2.3 h1:wS8NNaIgtzapuArKIAjsyXtEN/IUjQkbw90xszUdS40=
Expand Down Expand Up @@ -76,8 +78,8 @@ github.com/edwarnicke/exechelper v1.0.2/go.mod h1:/T271jtNX/ND4De6pa2aRy2+8sNtyC
github.com/edwarnicke/govpp v0.0.0-20201111163523-106f68b6ba26 h1:DBIEXF3iaF3RU337Yx+2oLKnW8xrQQUNDN7HMBIaH68=
github.com/edwarnicke/govpp v0.0.0-20201111163523-106f68b6ba26/go.mod h1:wQua0G5mhpwGNG4HuudYCikLZviQI8g7CngtH9fJFCo=
github.com/edwarnicke/grpcfd v0.0.0-20200920223154-d5b6e1f19bd0/go.mod h1:rHihB9YvNMixz8rS+ZbwosI2kj65VLkeyYAI2M+/cGA=
github.com/edwarnicke/grpcfd v0.0.0-20201107002751-f220aed0c5c8 h1:q3GKkF8KIhwhfVa4NDzSpzuNRc7KlGjGpCEqgsGu1dU=
github.com/edwarnicke/grpcfd v0.0.0-20201107002751-f220aed0c5c8/go.mod h1:rHihB9YvNMixz8rS+ZbwosI2kj65VLkeyYAI2M+/cGA=
github.com/edwarnicke/grpcfd v0.0.0-20210219150442-10fb469a6976 h1:qYvyZmwMS7wdlMlf/r8jPeBUIkjuPO/Ns9T7g1p7c2A=
github.com/edwarnicke/grpcfd v0.0.0-20210219150442-10fb469a6976/go.mod h1:rHihB9YvNMixz8rS+ZbwosI2kj65VLkeyYAI2M+/cGA=
github.com/edwarnicke/log v1.0.0 h1:T6uRNCmR99GTt/CpRr2Gz8eGW8fm0HMThDNGdNxPaGk=
github.com/edwarnicke/log v1.0.0/go.mod h1:eWsQQlQ0IU5wHlJvyXFH3dS8s2g9GzN7JnXodo6yaIY=
github.com/edwarnicke/serialize v0.0.0-20200705214914-ebc43080eecf/go.mod h1:XvbCO/QGsl3X8RzjBMoRpkm54FIAZH5ChK2j+aox7pw=
Expand Down Expand Up @@ -309,6 +311,8 @@ github.com/networkservicemesh/api v0.0.0-20210218170701-1a72f1cba074 h1:lMU+bavS
github.com/networkservicemesh/api v0.0.0-20210218170701-1a72f1cba074/go.mod h1:qvxdY1Zt4QTtiG+uH1XmjpegeHjlt5Jj4A8iK55iJPI=
github.com/networkservicemesh/sdk v0.0.0-20210220122417-bab01203bb73 h1:m7UW86tzJrJkmZPtgvGDgpXsU2LX3DmzYGLymC34Q+s=
github.com/networkservicemesh/sdk v0.0.0-20210220122417-bab01203bb73/go.mod h1:cK8mHGgBoxNO7Y3pwozi2a+NdALq+3H0wWc1J/TqJQg=
github.com/networkservicemesh/sdk v0.0.0-20210224081403-0d4993b39509 h1:DlsNyuZsbH+2NcBe5jzR/hIXf8VpqqElwwITtRp+Mqg=
github.com/networkservicemesh/sdk v0.0.0-20210224081403-0d4993b39509/go.mod h1:IrL3IsUBr/iQrtLQEtmBRFKoIKjYZEW+Z7ZFDt9TbRc=
github.com/networkservicemesh/sdk-vpp v0.0.0-20210220122805-99076822b6e1 h1:lQngqe9VJRLgrBqym77BTbBJzMFxLCcdmC73AeibKVQ=
github.com/networkservicemesh/sdk-vpp v0.0.0-20210220122805-99076822b6e1/go.mod h1:WuhTx3QVQK7QwpuqqpHheDzo5aeseY2g0e3WTdyGTz4=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
Expand Down
29 changes: 18 additions & 11 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ import (
"github.com/networkservicemesh/sdk/pkg/tools/nsurl"
"github.com/networkservicemesh/sdk/pkg/tools/opentracing"
"github.com/networkservicemesh/sdk/pkg/tools/spiffejwt"
"github.com/networkservicemesh/sdk/pkg/tools/token"
)

// Config - configuration for cmd-forwarder-vpp
Expand Down Expand Up @@ -141,14 +142,20 @@ func main() {
dialCtx,
grpcutils.URLToTarget(&config.ConnectTo),
append(opentracing.WithTracingDial(),
grpc.WithDefaultCallOptions(grpc.WaitForReady(true)),
grpc.WithDefaultCallOptions(
grpc.WaitForReady(true),
grpc.PerRPCCredentials(token.NewPerRPCCredentials(spiffejwt.TokenGeneratorFunc(source, config.MaxTokenLifetime))),
),
grpc.WithTransportCredentials(
grpcfd.TransportCredentials(
credentials.NewTLS(
tlsconfig.MTLSClientConfig(source, source, tlsconfig.AuthorizeAny()),
),
),
))...,
),
grpcfd.WithChainStreamInterceptor(),
grpcfd.WithChainUnaryInterceptor(),
)...,
)
if err != nil {
logrus.Fatalf("error getting clientCC: %+v", err)
Expand All @@ -160,16 +167,16 @@ func main() {

c := client.NewClient(
ctx,
config.Name,
nil,
spiffejwt.TokenGeneratorFunc(source, config.MaxTokenLifetime),
clientCC,
metadata.NewClient(),
up.NewClient(ctx, vppConn),
connectioncontext.NewClient(vppConn),
memif.NewClient(vppConn),
sendfd.NewClient(),
recvfd.NewClient(),
client.WithName(config.Name),
client.WithAdditionalFunctionality(
metadata.NewClient(),
up.NewClient(ctx, vppConn),
connectioncontext.NewClient(vppConn),
memif.NewClient(vppConn),
sendfd.NewClient(),
recvfd.NewClient(),
),
)

var connects []*networkservice.Connection
Expand Down

0 comments on commit 56566ef

Please sign in to comment.