Peer RPCs for bucket notifications (#2877)

* Implements a Peer RPC router that sends info to all Minio servers in the cluster.
* Bucket notifications are propagated to all nodes via this RPC router.
* Bucket listener configuration is persisted to separate object layer
  file (`listener.json`) and peer RPCs are used to communicate changes
  throughout the cluster.
* When events are generated, RPC calls to send them to other servers
  where bucket listeners may be connected is implemented.
* Some bucket notification tests are now disabled as they cannot work in
  the new design.
* Minor fix in `funcFromPC` to use `path.Join`
This commit is contained in:
Aditya Manthramurthy
2016-10-12 01:03:50 -07:00
committed by Harshavardhana
parent a5921b5743
commit 6199aa0707
24 changed files with 1365 additions and 1113 deletions

View File

@@ -57,42 +57,6 @@ func TestCheckDuplicateConfigs(t *testing.T) {
t.Errorf("Test %d: Expected %d, got %d", i+1, testCase.expectedErrCode, errCode)
}
}
// Test cases for SNS topic config.
topicTestCases := []struct {
tConfigs []topicConfig
expectedErrCode APIErrorCode
}{
// Error out for duplicate configs.
{
tConfigs: []topicConfig{
{
TopicARN: "arn:minio:sns:us-east-1:1:listen",
},
{
TopicARN: "arn:minio:sns:us-east-1:1:listen",
},
},
expectedErrCode: ErrOverlappingConfigs,
},
// Valid config.
{
tConfigs: []topicConfig{
{
TopicARN: "arn:minio:sns:us-east-1:1:listen",
},
},
expectedErrCode: ErrNone,
},
}
// ... validate for duplicate topic configs.
for i, testCase := range topicTestCases {
errCode := checkDuplicateTopicConfigs(testCase.tConfigs)
if errCode != testCase.expectedErrCode {
t.Errorf("Test %d: Expected %d, got %d", i+1, testCase.expectedErrCode, errCode)
}
}
}
// Tests for validating filter rules.