Skip to content

Commit 6d78968

Browse files
committed
Fabric gossip component - Discovery module
Change-Id: I6e596752871efa4c6ff372ba629e44815fa97ac6 Signed-off-by: Yacov Manevich <[email protected]>
1 parent 9c2ecfc commit 6d78968

File tree

6 files changed

+1315
-0
lines changed

6 files changed

+1315
-0
lines changed

gossip/discovery/consts.go

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
Copyright IBM Corp. 2016 All Rights Reserved.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
package discovery
18+
19+
import "fmt"
20+
21+
var INVALID_MSG_TYPE = fmt.Errorf("Invalid message type")

gossip/discovery/discovery.go

+4
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,8 @@ type DiscoveryService interface {
7575

7676
// GetMembership returns the alive members in the view
7777
GetMembership() []NetworkMember
78+
79+
// InitiateSync makes the instance ask a given number of peers
80+
// for their membership information
81+
InitiateSync(peerNum int)
7882
}

0 commit comments

Comments
 (0)