You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
549 B
17 lines
549 B
package subscribe |
|
|
|
// Subscription is an interface implemented by subscriptions to a server |
|
// providing updates. |
|
type Subscription interface { |
|
// Updates returns a read-only channel where the updates the client has |
|
// subscribed to will be delivered. |
|
Updates() <-chan interface{} |
|
|
|
// Quit is a channel that will be closed in case the server decides to |
|
// no longer deliver updates to this client. |
|
Quit() <-chan struct{} |
|
|
|
// Cancel should be called in case the client no longer wants to |
|
// subscribe for updates from the server. |
|
Cancel() |
|
}
|
|
|