"Fossies" - the Fresh Open Source Software Archive

Member "mattermost-server-6.0.0/vendor/github.com/hashicorp/memberlist/alive_delegate.go" (8 Oct 2021, 591 Bytes) of package /linux/www/mattermost-server-6.0.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Go source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 package memberlist
    2 
    3 // AliveDelegate is used to involve a client in processing
    4 // a node "alive" message. When a node joins, either through
    5 // a UDP gossip or TCP push/pull, we update the state of
    6 // that node via an alive message. This can be used to filter
    7 // a node out and prevent it from being considered a peer
    8 // using application specific logic.
    9 type AliveDelegate interface {
   10     // NotifyAlive is invoked when a message about a live
   11     // node is received from the network.  Returning a non-nil
   12     // error prevents the node from being considered a peer.
   13     NotifyAlive(peer *Node) error
   14 }