File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 9
9
[ ![ issues closed] ( https://img.shields.io/github/issues-closed/leonsteinhaeuser/observer )] ( https://img.shields.io/github/issues-closed/leonsteinhaeuser/observer )
10
10
[ ![ license] ( https://img.shields.io/github/license/leonsteinhaeuser/observer )] ( https://img.shields.io/github/license/leonsteinhaeuser/observer )
11
11
12
-
13
12
This library implements the pub/sub pattern in a generic way. It uses Go's generic types to declare the type of the event.
14
13
14
+ ## Differences between v1 and v2
15
+
16
+ The v2 release contains breaking changes. The most important ones are:
17
+
18
+ - The ` Observable ` interface does not provide a ` Clients() int64 ` method anymore.
19
+ - The constructor ` NewObserver() ` has been removed. Instead, use ` new(observer.Observer[T]) ` .
20
+ - The ` Observer ` has become a ` NotifyTimeout ` that can be used to set a timeout for the ` NotifyAll ` method. The default value is ` 5 * time.Second ` .
21
+
15
22
## Usage
16
23
17
24
``` bash
You can’t perform that action at this time.
0 commit comments