()
| 126 | } |
| 127 | |
| 128 | func (t *App) initInternalServer() (services.Service, error) { |
| 129 | if !t.cfg.InternalServer.Enable { |
| 130 | return services.NewIdleService(nil, nil), nil |
| 131 | } |
| 132 | |
| 133 | DisableSignalHandling(&t.cfg.InternalServer.Config) |
| 134 | serv, err := server.New(t.cfg.InternalServer.Config) |
| 135 | if err != nil { |
| 136 | return nil, err |
| 137 | } |
| 138 | |
| 139 | servicesToWaitFor := func() []services.Service { |
| 140 | svs := []services.Service(nil) |
| 141 | for m, s := range t.serviceMap { |
| 142 | // Server should not wait for itself or the server |
| 143 | if m != InternalServer && m != Server { |
| 144 | svs = append(svs, s) |
| 145 | } |
| 146 | } |
| 147 | return svs |
| 148 | } |
| 149 | |
| 150 | t.InternalServer = serv |
| 151 | s := NewServerService(t.InternalServer, servicesToWaitFor) |
| 152 | |
| 153 | return s, nil |
| 154 | } |
| 155 | |
| 156 | func (t *App) initLiveStoreRing() (services.Service, error) { |
| 157 | return t.initReadRing(t.cfg.LiveStore.Ring.ToRingConfig(), ringLiveStore, ringLiveStore) |
nothing calls this directly
no test coverage detected