Skip to content

Commit

Permalink
feat: add traffic routing policies (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
hacdias committed Jul 27, 2020
1 parent b63348a commit 6c78051
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions network/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@ type LinkRule struct {
Subnet net.IPNet
}

// RoutingPolicyType defines a certain routing policy to a network.
type RoutingPolicyType string

const (
AllowAll = RoutingPolicyType("allow_all")
DenyAll = RoutingPolicyType("deny_all")
)

// NetworkConfig specifies how a node's network should be configured.
type Config struct {
// Network is the name of the network to configure
Expand Down Expand Up @@ -111,4 +119,9 @@ type Config struct {
// A zero value falls back to runenv.TestInstanceCount (i.e. all instances
// participating in the test run).
CallbackTarget int `json:"-"`

// RoutingPolicy defines the data routing policy of a certain node. This affects
// external networks other than the network 'Default', e.g., external Internet
// access.
RoutingPolicy RoutingPolicyType
}

0 comments on commit 6c78051

Please sign in to comment.