2020-08-21 15:01:59 +00:00
|
|
|
package main
|
|
|
|
|
2020-08-22 11:03:45 +00:00
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"sync"
|
|
|
|
)
|
|
|
|
|
2020-08-21 15:01:59 +00:00
|
|
|
type cfg struct {
|
2020-08-22 11:03:45 +00:00
|
|
|
ctx context.Context
|
|
|
|
|
|
|
|
wg *sync.WaitGroup
|
|
|
|
|
2020-08-21 15:01:59 +00:00
|
|
|
grpcAddr string
|
|
|
|
}
|
|
|
|
|
|
|
|
func defaultCfg() *cfg {
|
|
|
|
return &cfg{
|
2020-08-22 11:03:45 +00:00
|
|
|
ctx: context.Background(),
|
|
|
|
wg: new(sync.WaitGroup),
|
|
|
|
grpcAddr: "127.0.0.1:50501",
|
2020-08-21 15:01:59 +00:00
|
|
|
}
|
|
|
|
}
|