Skip to content

Commit

Permalink
use new genericsync.Maps (#754)
Browse files Browse the repository at this point in the history
Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
  • Loading branch information
NikitaSkrynnik authored Oct 2, 2023
1 parent 57791c4 commit f8ca43c
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 413 deletions.
75 changes: 0 additions & 75 deletions pkg/networkservice/acl/acl_indices_map.gen.go

This file was deleted.

26 changes: 0 additions & 26 deletions pkg/networkservice/acl/gen.go

This file was deleted.

3 changes: 2 additions & 1 deletion pkg/networkservice/acl/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ package acl
import (
"context"

"github.com/edwarnicke/genericsync"
"github.com/golang/protobuf/ptypes/empty"
"github.com/networkservicemesh/govpp/binapi/acl"
"github.com/networkservicemesh/govpp/binapi/acl_types"
Expand All @@ -38,7 +39,7 @@ import (
type aclServer struct {
vppConn api.Connection
aclRules []acl_types.ACLRule
aclIndices aclIndicesMap
aclIndices genericsync.Map[string, []uint32]
}

// NewServer creates a NetworkServiceServer chain element to set the ACL on a vpp interface
Expand Down
3 changes: 2 additions & 1 deletion pkg/networkservice/mechanisms/vlan/mtu/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"google.golang.org/grpc"
"google.golang.org/protobuf/types/known/emptypb"

"github.com/edwarnicke/genericsync"
"github.com/networkservicemesh/sdk/pkg/networkservice/core/next"
"github.com/networkservicemesh/sdk/pkg/networkservice/utils/metadata"
"github.com/networkservicemesh/sdk/pkg/tools/postpone"
Expand All @@ -38,7 +39,7 @@ import (

type mtuClient struct {
vppConn api.Connection
mtu mtuMap
mtu genericsync.Map[string, uint32]
deviceNames map[string]string
}

Expand Down
26 changes: 0 additions & 26 deletions pkg/networkservice/mechanisms/vlan/mtu/gen.go

This file was deleted.

75 changes: 0 additions & 75 deletions pkg/networkservice/mechanisms/vlan/mtu/mtu_map.gen.go

This file was deleted.

5 changes: 3 additions & 2 deletions pkg/networkservice/pinhole/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"fmt"
"sync"

"github.com/edwarnicke/genericsync"
"github.com/golang/protobuf/ptypes/empty"
"github.com/pkg/errors"
"go.fd.io/govpp/api"
Expand All @@ -33,8 +34,8 @@ import (
)

type pinholeClient struct {
vppConn api.Connection
ipPortMap
vppConn api.Connection
ipPortMap genericsync.Map[IPPort, struct{}]

// We need to protect ACL rules applying with a mutex.
// Because adding new entries is based on a dump and applying modified data.
Expand Down
26 changes: 0 additions & 26 deletions pkg/networkservice/pinhole/gen.go

This file was deleted.

5 changes: 3 additions & 2 deletions pkg/networkservice/pinhole/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"fmt"
"sync"

"github.com/edwarnicke/genericsync"
"github.com/golang/protobuf/ptypes/empty"
"github.com/pkg/errors"
"go.fd.io/govpp/api"
Expand All @@ -32,8 +33,8 @@ import (
)

type pinholeServer struct {
vppConn api.Connection
ipPortMap
vppConn api.Connection
ipPortMap genericsync.Map[IPPort, struct{}]

// We need to protect ACL rules applying with a mutex.
// Because adding new entries is based on a dump and applying modified data.
Expand Down
75 changes: 0 additions & 75 deletions pkg/networkservice/pinhole/tunnel_ip_map.gen.go

This file was deleted.

Loading

0 comments on commit f8ca43c

Please sign in to comment.