Refactoring
This commit is contained in:
@@ -19,7 +19,7 @@ type Application struct {
|
||||
log *zap.Logger
|
||||
}
|
||||
|
||||
func NewApplication(cfg *Config, log *zap.Logger) (*Application, error) {
|
||||
func NewApplication(cfg Config, log *zap.Logger) (*Application, error) {
|
||||
discoveryOpts := []discovery.Option{
|
||||
discovery.WithBroadcastInterval(cfg.BroadcastInterval),
|
||||
}
|
||||
@@ -62,30 +62,3 @@ func (a *Application) Start(ctx context.Context, wg *sync.WaitGroup) {
|
||||
go a.messenger.StartServer(ctx, wg)
|
||||
go a.messenger.Start(ctx, wg)
|
||||
}
|
||||
|
||||
var _ = `
|
||||
s1-1 | Received 'apq34yod73' from <172.19.0.5>
|
||||
s1-1 | Received 'cbtfl716li' from <172.19.0.3>
|
||||
s1-1 | Received 'n84fg3mx9o' from <172.19.0.2>
|
||||
s1-1 | Received 'zb98146fqz' from <172.19.0.4>
|
||||
|
||||
s2-1 | Received '7h1s9ruilr' from <172.19.0.2>
|
||||
s2-1 | Received 'aij179r0ck' from <172.19.0.3>
|
||||
s2-1 | Received 'm3k0snj7ma' from <172.19.0.6>
|
||||
s2-1 | Received 'tw5726fo7e' from <172.19.0.5>
|
||||
|
||||
s3-1 | Received '32d20marhg' from <172.19.0.6>
|
||||
s3-1 | Received 'ffs9pi6o9j' from <172.19.0.3>
|
||||
s3-1 | Received 'wcso6aashe' from <172.19.0.5>
|
||||
s3-1 | Received 'wfhcy9xbdj' from <172.19.0.4>
|
||||
|
||||
s4-1 | Received '2le3u1ikyg' from <172.19.0.2>
|
||||
s4-1 | Received '5locacst6w' from <172.19.0.4>
|
||||
s4-1 | Received 'cf47nyd2ca' from <172.19.0.6>
|
||||
s4-1 | Received 'guvfhb7wud' from <172.19.0.5>
|
||||
|
||||
s5-1 | Received 'dsr7qt2x5l' from <172.19.0.3>
|
||||
s5-1 | Received 'l67gc5xdt3' from <172.19.0.2>
|
||||
s5-1 | Received 'mof0yp4vxt' from <172.19.0.6>
|
||||
s5-1 | Received 'slc9tw30r4' from <172.19.0.4>
|
||||
`
|
||||
|
||||
Reference in New Issue
Block a user