DAY 9
0
Software Development

## Overlapping 範例情境

### 無重疊條件的 MatchProfiles

Director 發出含有以下條件 `tickets``MatchProfiles`

• Profile1: ping 0~49
• Profile2: ping 50~99
• Profile3: ping 100~300
``````p := []*pb.MatchProfile{
{
Name: "Profile1",
Pools: []*pb.Pool{
{
Name: "ping",
DoubleRangeFilters: []*pb.DoubleRangeFilter{
{
DoubleArg: "ping",
Min:       0,
Max:       49,
},
},
},
},
},
{
Name: "Profile2",
Pools: []*pb.Pool{
{
Name: "ping",
DoubleRangeFilters: []*pb.DoubleRangeFilter{
{
DoubleArg: "ping",
Min:       50,
Max:       99,
},
},
},
},
},
{
Name: "Profile3",
Pools: []*pb.Pool{
{
Name: "ping",
DoubleRangeFilters: []*pb.DoubleRangeFilter{
{
DoubleArg: "ping",
Min:       100,
Max:       300,
},
},
},
},
},
}
``````

### 有重疊條件的 MatchProfiles

Director 發出含有以下條件 `tickets``MatchProfiles`

• Profile1: ping 0~49
• Profile2: ping 39~99
• Profile3: ping 79~300
``````p := []*pb.MatchProfile{
{
Name: "Profile1",
Pools: []*pb.Pool{
{
Name: "ping",
DoubleRangeFilters: []*pb.DoubleRangeFilter{
{
DoubleArg: "ping",
Min:       0,
Max:       49,
},
},
},
},
},
{
Name: "Profile2",
Pools: []*pb.Pool{
{
Name: "ping",
DoubleRangeFilters: []*pb.DoubleRangeFilter{
{
DoubleArg: "ping",
Min:       39,
Max:       99,
},
},
},
},
},
{
Name: "Profile3",
Pools: []*pb.Pool{
{
Name: "ping",
DoubleRangeFilters: []*pb.DoubleRangeFilter{
{
DoubleArg: "ping",
Min:       79,
Max:       300,
},
},
},
},
},
}
``````