github.com/decred/dcrlnd@v0.7.6/subscribe/interface.go (about) 1 package subscribe 2 3 // Subscription is an interface implemented by subscriptions to a server 4 // providing updates. 5 type Subscription interface { 6 // Updates returns a read-only channel where the updates the client has 7 // subscribed to will be delivered. 8 Updates() <-chan interface{} 9 10 // Quit is a channel that will be closed in case the server decides to 11 // no longer deliver updates to this client. 12 Quit() <-chan struct{} 13 14 // Cancel should be called in case the client no longer wants to 15 // subscribe for updates from the server. 16 Cancel() 17 }