We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed80355 commit 60feadfCopy full SHA for 60feadf
sentinel/sentinel_coordinator.go
@@ -0,0 +1,31 @@
1
+// File: sentinel.go
2
+package sentinel
3
+
4
+import (
5
+ "context"
6
+ "sync"
7
8
+ "github.com/rs/zerolog"
9
+)
10
11
+type SentinelCoordinator struct {
12
+ Sentinel *Sentinel
13
+ wg *sync.WaitGroup
14
+ Ctx context.Context
15
+ cancel context.CancelFunc
16
+ log zerolog.Logger
17
+}
18
19
+func NewSentinelCoordinator(log zerolog.Logger) *SentinelCoordinator {
20
+ ctx, cancel := context.WithCancel(context.Background())
21
+ wg := &sync.WaitGroup{}
22
+ s := NewSentinel(SentinelConfig{})
23
24
+ return &SentinelCoordinator{
25
+ Sentinel: s,
26
+ wg: wg,
27
+ Ctx: ctx,
28
+ cancel: cancel,
29
+ log: log,
30
+ }
31
0 commit comments