khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2018-present Open Networking Foundation |
| 3 | |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | package core |
| 17 | |
| 18 | import ( |
| 19 | "context" |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 20 | "github.com/opencord/voltha-go/rw_core/config" |
Scott Baker | cb7c88a | 2019-10-16 18:32:48 -0700 | [diff] [blame] | 21 | "github.com/opencord/voltha-lib-go/pkg/db/kvstore" |
| 22 | "github.com/opencord/voltha-lib-go/pkg/db/model" |
| 23 | grpcserver "github.com/opencord/voltha-lib-go/pkg/grpc" |
| 24 | "github.com/opencord/voltha-lib-go/pkg/kafka" |
| 25 | "github.com/opencord/voltha-lib-go/pkg/log" |
| 26 | "github.com/opencord/voltha-lib-go/pkg/probe" |
khenaidoo | 2c6a099 | 2019-04-29 13:46:56 -0400 | [diff] [blame] | 27 | "github.com/opencord/voltha-protos/go/voltha" |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 28 | "google.golang.org/grpc" |
khenaidoo | b324421 | 2019-08-27 14:32:27 -0400 | [diff] [blame] | 29 | "google.golang.org/grpc/codes" |
| 30 | "google.golang.org/grpc/status" |
| 31 | "time" |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 32 | ) |
| 33 | |
| 34 | type Core struct { |
| 35 | instanceId string |
| 36 | deviceMgr *DeviceManager |
| 37 | logicalDeviceMgr *LogicalDeviceManager |
| 38 | grpcServer *grpcserver.GrpcServer |
Richard Jankowski | dbab94a | 2018-12-06 16:20:25 -0500 | [diff] [blame] | 39 | grpcNBIAPIHandler *APIHandler |
khenaidoo | 2c6a099 | 2019-04-29 13:46:56 -0400 | [diff] [blame] | 40 | adapterMgr *AdapterManager |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 41 | config *config.RWCoreFlags |
khenaidoo | 43c8212 | 2018-11-22 18:38:28 -0500 | [diff] [blame] | 42 | kmp *kafka.InterContainerProxy |
khenaidoo | 92e62c5 | 2018-10-03 14:02:54 -0400 | [diff] [blame] | 43 | clusterDataRoot model.Root |
| 44 | localDataRoot model.Root |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 45 | clusterDataProxy *model.Proxy |
| 46 | localDataProxy *model.Proxy |
| 47 | exitChannel chan int |
Richard Jankowski | e4d7766 | 2018-10-17 13:53:21 -0400 | [diff] [blame] | 48 | kvClient kvstore.Client |
khenaidoo | 43c8212 | 2018-11-22 18:38:28 -0500 | [diff] [blame] | 49 | kafkaClient kafka.Client |
khenaidoo | 2c6a099 | 2019-04-29 13:46:56 -0400 | [diff] [blame] | 50 | deviceOwnership *DeviceOwnership |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 51 | } |
| 52 | |
| 53 | func init() { |
| 54 | log.AddPackage(log.JSON, log.WarnLevel, nil) |
| 55 | } |
| 56 | |
khenaidoo | 43c8212 | 2018-11-22 18:38:28 -0500 | [diff] [blame] | 57 | func NewCore(id string, cf *config.RWCoreFlags, kvClient kvstore.Client, kafkaClient kafka.Client) *Core { |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 58 | var core Core |
| 59 | core.instanceId = id |
| 60 | core.exitChannel = make(chan int, 1) |
| 61 | core.config = cf |
Richard Jankowski | e4d7766 | 2018-10-17 13:53:21 -0400 | [diff] [blame] | 62 | core.kvClient = kvClient |
khenaidoo | 43c8212 | 2018-11-22 18:38:28 -0500 | [diff] [blame] | 63 | core.kafkaClient = kafkaClient |
Richard Jankowski | e4d7766 | 2018-10-17 13:53:21 -0400 | [diff] [blame] | 64 | |
| 65 | // Setup the KV store |
khenaidoo | 7ccedd5 | 2018-12-14 16:48:54 -0500 | [diff] [blame] | 66 | backend := model.Backend{ |
| 67 | Client: kvClient, |
| 68 | StoreType: cf.KVStoreType, |
| 69 | Host: cf.KVStoreHost, |
| 70 | Port: cf.KVStorePort, |
| 71 | Timeout: cf.KVStoreTimeout, |
khenaidoo | 9cdc1a6 | 2019-01-24 21:57:40 -0500 | [diff] [blame] | 72 | PathPrefix: cf.KVStoreDataPrefix} |
khenaidoo | 7ccedd5 | 2018-12-14 16:48:54 -0500 | [diff] [blame] | 73 | core.clusterDataRoot = model.NewRoot(&voltha.Voltha{}, &backend) |
| 74 | core.localDataRoot = model.NewRoot(&voltha.CoreInstance{}, &backend) |
Stephane Barbarie | ef6650d | 2019-07-18 12:15:09 -0400 | [diff] [blame] | 75 | core.clusterDataProxy = core.clusterDataRoot.CreateProxy(context.Background(), "/", false) |
| 76 | core.localDataProxy = core.localDataRoot.CreateProxy(context.Background(), "/", false) |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 77 | return &core |
| 78 | } |
| 79 | |
| 80 | func (core *Core) Start(ctx context.Context) { |
David K. Bainbridge | b4a9ab0 | 2019-09-20 15:12:16 -0700 | [diff] [blame] | 81 | |
| 82 | // If the context has a probe then fetch it and register our services |
| 83 | var p *probe.Probe |
| 84 | if value := ctx.Value(probe.ProbeContextKey); value != nil { |
| 85 | if _, ok := value.(*probe.Probe); ok { |
| 86 | p = value.(*probe.Probe) |
| 87 | p.RegisterService( |
| 88 | "message-bus", |
| 89 | "kv-store", |
| 90 | "device-manager", |
| 91 | "logical-device-manager", |
| 92 | "adapter-manager", |
| 93 | "grpc-service", |
| 94 | ) |
| 95 | } |
| 96 | } |
| 97 | |
khenaidoo | b324421 | 2019-08-27 14:32:27 -0400 | [diff] [blame] | 98 | log.Info("starting-core-services", log.Fields{"coreId": core.instanceId}) |
| 99 | |
| 100 | // Wait until connection to KV Store is up |
| 101 | if err := core.waitUntilKVStoreReachableOrMaxTries(ctx, core.config.MaxConnectionRetries, core.config.ConnectionRetryInterval); err != nil { |
| 102 | log.Fatal("Unable-to-connect-to-KV-store") |
| 103 | } |
David K. Bainbridge | b4a9ab0 | 2019-09-20 15:12:16 -0700 | [diff] [blame] | 104 | if p != nil { |
| 105 | p.UpdateStatus("kv-store", probe.ServiceStatusRunning) |
| 106 | } |
khenaidoo | b324421 | 2019-08-27 14:32:27 -0400 | [diff] [blame] | 107 | |
| 108 | if err := core.waitUntilKafkaMessagingProxyIsUpOrMaxTries(ctx, core.config.MaxConnectionRetries, core.config.ConnectionRetryInterval); err != nil { |
khenaidoo | 9cdc1a6 | 2019-01-24 21:57:40 -0500 | [diff] [blame] | 109 | log.Fatal("Failure-starting-kafkaMessagingProxy") |
| 110 | } |
David K. Bainbridge | b4a9ab0 | 2019-09-20 15:12:16 -0700 | [diff] [blame] | 111 | if p != nil { |
| 112 | p.UpdateStatus("message-bus", probe.ServiceStatusRunning) |
| 113 | } |
khenaidoo | b324421 | 2019-08-27 14:32:27 -0400 | [diff] [blame] | 114 | |
khenaidoo | 631fe54 | 2019-05-31 15:44:43 -0400 | [diff] [blame] | 115 | log.Debugw("values", log.Fields{"kmp": core.kmp}) |
Richard Jankowski | 199fd86 | 2019-03-18 14:49:51 -0400 | [diff] [blame] | 116 | core.deviceMgr = newDeviceManager(core) |
khenaidoo | ba6b6c4 | 2019-08-02 09:11:56 -0400 | [diff] [blame] | 117 | core.adapterMgr = newAdapterManager(core.clusterDataProxy, core.instanceId, core.deviceMgr) |
| 118 | core.deviceMgr.adapterMgr = core.adapterMgr |
khenaidoo | 2c6a099 | 2019-04-29 13:46:56 -0400 | [diff] [blame] | 119 | core.logicalDeviceMgr = newLogicalDeviceManager(core, core.deviceMgr, core.kmp, core.clusterDataProxy, core.config.DefaultCoreTimeout) |
khenaidoo | 54e0ddf | 2019-02-27 16:21:33 -0500 | [diff] [blame] | 120 | |
| 121 | if err := core.registerAdapterRequestHandlers(ctx, core.instanceId, core.deviceMgr, core.logicalDeviceMgr, core.adapterMgr, core.clusterDataProxy, core.localDataProxy); err != nil { |
khenaidoo | 9cdc1a6 | 2019-01-24 21:57:40 -0500 | [diff] [blame] | 122 | log.Fatal("Failure-registering-adapterRequestHandler") |
| 123 | } |
khenaidoo | b324421 | 2019-08-27 14:32:27 -0400 | [diff] [blame] | 124 | |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 125 | go core.startDeviceManager(ctx) |
| 126 | go core.startLogicalDeviceManager(ctx) |
| 127 | go core.startGRPCService(ctx) |
khenaidoo | 21d5115 | 2019-02-01 13:48:37 -0500 | [diff] [blame] | 128 | go core.startAdapterManager(ctx) |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 129 | |
khenaidoo | 1ce37ad | 2019-03-24 22:07:24 -0400 | [diff] [blame] | 130 | // Setup device ownership context |
| 131 | core.deviceOwnership = NewDeviceOwnership(core.instanceId, core.kvClient, core.deviceMgr, core.logicalDeviceMgr, |
| 132 | "service/voltha/owns_device", 10) |
| 133 | |
khenaidoo | b324421 | 2019-08-27 14:32:27 -0400 | [diff] [blame] | 134 | log.Info("core-services-started") |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 135 | } |
| 136 | |
| 137 | func (core *Core) Stop(ctx context.Context) { |
khenaidoo | 1937407 | 2018-12-11 11:05:15 -0500 | [diff] [blame] | 138 | log.Info("stopping-adaptercore") |
David Bainbridge | f794fc5 | 2019-10-03 22:37:12 +0000 | [diff] [blame] | 139 | if core.exitChannel != nil { |
| 140 | core.exitChannel <- 1 |
| 141 | } |
khenaidoo | 43c8212 | 2018-11-22 18:38:28 -0500 | [diff] [blame] | 142 | // Stop all the started services |
David Bainbridge | f794fc5 | 2019-10-03 22:37:12 +0000 | [diff] [blame] | 143 | if core.grpcServer != nil { |
| 144 | core.grpcServer.Stop() |
| 145 | } |
| 146 | if core.logicalDeviceMgr != nil { |
| 147 | core.logicalDeviceMgr.stop(ctx) |
| 148 | } |
| 149 | if core.deviceMgr != nil { |
| 150 | core.deviceMgr.stop(ctx) |
| 151 | } |
| 152 | if core.kmp != nil { |
| 153 | core.kmp.Stop() |
| 154 | } |
khenaidoo | 1937407 | 2018-12-11 11:05:15 -0500 | [diff] [blame] | 155 | log.Info("adaptercore-stopped") |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 156 | } |
| 157 | |
khenaidoo | 631fe54 | 2019-05-31 15:44:43 -0400 | [diff] [blame] | 158 | //startGRPCService creates the grpc service handlers, registers it to the grpc server and starts the server |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 159 | func (core *Core) startGRPCService(ctx context.Context) { |
| 160 | // create an insecure gserver server |
| 161 | core.grpcServer = grpcserver.NewGrpcServer(core.config.GrpcHost, core.config.GrpcPort, nil, false) |
| 162 | log.Info("grpc-server-created") |
| 163 | |
khenaidoo | 54e0ddf | 2019-02-27 16:21:33 -0500 | [diff] [blame] | 164 | core.grpcNBIAPIHandler = NewAPIHandler(core) |
Richard Jankowski | 46464e9 | 2019-03-05 11:53:55 -0500 | [diff] [blame] | 165 | log.Infow("grpc-handler", log.Fields{"core_binding_key": core.config.CoreBindingKey}) |
Richard Jankowski | dbab94a | 2018-12-06 16:20:25 -0500 | [diff] [blame] | 166 | core.logicalDeviceMgr.setGrpcNbiHandler(core.grpcNBIAPIHandler) |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 167 | // Create a function to register the core GRPC service with the GRPC server |
| 168 | f := func(gs *grpc.Server) { |
| 169 | voltha.RegisterVolthaServiceServer( |
| 170 | gs, |
Richard Jankowski | dbab94a | 2018-12-06 16:20:25 -0500 | [diff] [blame] | 171 | core.grpcNBIAPIHandler, |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 172 | ) |
| 173 | } |
| 174 | |
| 175 | core.grpcServer.AddService(f) |
| 176 | log.Info("grpc-service-added") |
| 177 | |
David K. Bainbridge | b4a9ab0 | 2019-09-20 15:12:16 -0700 | [diff] [blame] | 178 | /* |
| 179 | * Start the GRPC server |
| 180 | * |
| 181 | * This is a bit sub-optimal here as the grpcServer.Start call does not return (blocks) |
| 182 | * until something fails, but we want to send a "start" status update. As written this |
| 183 | * means that we are actually sending the "start" status update before the server is |
| 184 | * started, which means it is possible that the status is "running" before it actually is. |
| 185 | * |
| 186 | * This means that there is a small window in which the core could return its status as |
| 187 | * ready, when it really isn't. |
| 188 | */ |
| 189 | probe.UpdateStatusFromContext(ctx, "grpc-service", probe.ServiceStatusRunning) |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 190 | log.Info("grpc-server-started") |
David K. Bainbridge | b4a9ab0 | 2019-09-20 15:12:16 -0700 | [diff] [blame] | 191 | core.grpcServer.Start(context.Background()) |
| 192 | probe.UpdateStatusFromContext(ctx, "grpc-service", probe.ServiceStatusStopped) |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 193 | } |
| 194 | |
khenaidoo | b324421 | 2019-08-27 14:32:27 -0400 | [diff] [blame] | 195 | func (core *Core) waitUntilKafkaMessagingProxyIsUpOrMaxTries(ctx context.Context, maxRetries int, retryInterval int) error { |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 196 | log.Infow("starting-kafka-messaging-proxy", log.Fields{"host": core.config.KafkaAdapterHost, |
| 197 | "port": core.config.KafkaAdapterPort, "topic": core.config.CoreTopic}) |
| 198 | var err error |
khenaidoo | 43c8212 | 2018-11-22 18:38:28 -0500 | [diff] [blame] | 199 | if core.kmp, err = kafka.NewInterContainerProxy( |
| 200 | kafka.InterContainerHost(core.config.KafkaAdapterHost), |
| 201 | kafka.InterContainerPort(core.config.KafkaAdapterPort), |
| 202 | kafka.MsgClient(core.kafkaClient), |
khenaidoo | 7923270 | 2018-12-04 11:00:41 -0500 | [diff] [blame] | 203 | kafka.DefaultTopic(&kafka.Topic{Name: core.config.CoreTopic}), |
| 204 | kafka.DeviceDiscoveryTopic(&kafka.Topic{Name: core.config.AffinityRouterTopic})); err != nil { |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 205 | log.Errorw("fail-to-create-kafka-proxy", log.Fields{"error": err}) |
| 206 | return err |
| 207 | } |
khenaidoo | b324421 | 2019-08-27 14:32:27 -0400 | [diff] [blame] | 208 | count := 0 |
| 209 | for { |
| 210 | if err = core.kmp.Start(); err != nil { |
| 211 | log.Infow("error-starting-kafka-messaging-proxy", log.Fields{"error": err}) |
| 212 | if maxRetries != -1 { |
| 213 | if count >= maxRetries { |
| 214 | return err |
| 215 | } |
| 216 | } |
| 217 | count += 1 |
| 218 | log.Infow("retry-starting-kafka-messaging-proxy", log.Fields{"retryCount": count, "maxRetries": maxRetries, "retryInterval": retryInterval}) |
| 219 | // Take a nap before retrying |
| 220 | time.Sleep(time.Duration(retryInterval) * time.Second) |
| 221 | } else { |
| 222 | break |
| 223 | } |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 224 | } |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 225 | log.Info("kafka-messaging-proxy-created") |
| 226 | return nil |
| 227 | } |
| 228 | |
khenaidoo | b324421 | 2019-08-27 14:32:27 -0400 | [diff] [blame] | 229 | // waitUntilKVStoreReachableOrMaxTries will wait until it can connect to a KV store or until maxtries has been reached |
| 230 | func (core *Core) waitUntilKVStoreReachableOrMaxTries(ctx context.Context, maxRetries int, retryInterval int) error { |
| 231 | log.Infow("verifying-KV-store-connectivity", log.Fields{"host": core.config.KVStoreHost, |
| 232 | "port": core.config.KVStorePort, "retries": maxRetries, "retryInterval": retryInterval}) |
| 233 | // Get timeout in seconds with 1 second set as minimum |
| 234 | timeout := int(core.config.DefaultCoreTimeout / 1000) |
| 235 | if timeout < 1 { |
| 236 | timeout = 1 |
| 237 | } |
| 238 | count := 0 |
| 239 | for { |
| 240 | if !core.kvClient.IsConnectionUp(timeout) { |
| 241 | log.Info("KV-store-unreachable") |
| 242 | if maxRetries != -1 { |
| 243 | if count >= maxRetries { |
| 244 | return status.Error(codes.Unavailable, "kv store unreachable") |
| 245 | } |
| 246 | } |
| 247 | count += 1 |
| 248 | // Take a nap before retrying |
| 249 | time.Sleep(time.Duration(retryInterval) * time.Second) |
| 250 | log.Infow("retry-KV-store-connectivity", log.Fields{"retryCount": count, "maxRetries": maxRetries, "retryInterval": retryInterval}) |
| 251 | |
| 252 | } else { |
| 253 | break |
| 254 | } |
| 255 | } |
| 256 | log.Info("KV-store-reachable") |
| 257 | return nil |
| 258 | } |
| 259 | |
khenaidoo | 54e0ddf | 2019-02-27 16:21:33 -0500 | [diff] [blame] | 260 | func (core *Core) registerAdapterRequestHandlers(ctx context.Context, coreInstanceId string, dMgr *DeviceManager, |
khenaidoo | 297cd25 | 2019-02-07 22:10:23 -0500 | [diff] [blame] | 261 | ldMgr *LogicalDeviceManager, aMgr *AdapterManager, cdProxy *model.Proxy, ldProxy *model.Proxy, |
khenaidoo | 54e0ddf | 2019-02-27 16:21:33 -0500 | [diff] [blame] | 262 | ) error { |
Richard Jankowski | 199fd86 | 2019-03-18 14:49:51 -0400 | [diff] [blame] | 263 | requestProxy := NewAdapterRequestHandlerProxy(core, coreInstanceId, dMgr, ldMgr, aMgr, cdProxy, ldProxy, |
khenaidoo | 297cd25 | 2019-02-07 22:10:23 -0500 | [diff] [blame] | 264 | core.config.InCompetingMode, core.config.LongRunningRequestTimeout, core.config.DefaultRequestTimeout) |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 265 | |
khenaidoo | 54e0ddf | 2019-02-27 16:21:33 -0500 | [diff] [blame] | 266 | // Register the broadcast topic to handle any core-bound broadcast requests |
| 267 | if err := core.kmp.SubscribeWithRequestHandlerInterface(kafka.Topic{Name: core.config.CoreTopic}, requestProxy); err != nil { |
| 268 | log.Fatalw("Failed-registering-broadcast-handler", log.Fields{"topic": core.config.CoreTopic}) |
| 269 | return err |
| 270 | } |
| 271 | |
Kent Hagerman | a6d0c36 | 2019-07-30 12:50:21 -0400 | [diff] [blame] | 272 | // Register the core-pair topic to handle core-bound requests destined to the core pair |
| 273 | if err := core.kmp.SubscribeWithDefaultRequestHandler(kafka.Topic{Name: core.config.CorePairTopic}, kafka.OffsetNewest); err != nil { |
| 274 | log.Fatalw("Failed-registering-pair-handler", log.Fields{"topic": core.config.CorePairTopic}) |
| 275 | return err |
| 276 | } |
| 277 | |
khenaidoo | 54e0ddf | 2019-02-27 16:21:33 -0500 | [diff] [blame] | 278 | log.Info("request-handler-registered") |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 279 | return nil |
| 280 | } |
| 281 | |
| 282 | func (core *Core) startDeviceManager(ctx context.Context) { |
khenaidoo | 21d5115 | 2019-02-01 13:48:37 -0500 | [diff] [blame] | 283 | log.Info("DeviceManager-Starting...") |
khenaidoo | 4d4802d | 2018-10-04 21:59:49 -0400 | [diff] [blame] | 284 | core.deviceMgr.start(ctx, core.logicalDeviceMgr) |
khenaidoo | 21d5115 | 2019-02-01 13:48:37 -0500 | [diff] [blame] | 285 | log.Info("DeviceManager-Started") |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 286 | } |
| 287 | |
| 288 | func (core *Core) startLogicalDeviceManager(ctx context.Context) { |
khenaidoo | 21d5115 | 2019-02-01 13:48:37 -0500 | [diff] [blame] | 289 | log.Info("Logical-DeviceManager-Starting...") |
khenaidoo | 4d4802d | 2018-10-04 21:59:49 -0400 | [diff] [blame] | 290 | core.logicalDeviceMgr.start(ctx) |
khenaidoo | 21d5115 | 2019-02-01 13:48:37 -0500 | [diff] [blame] | 291 | log.Info("Logical-DeviceManager-Started") |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 292 | } |
khenaidoo | 21d5115 | 2019-02-01 13:48:37 -0500 | [diff] [blame] | 293 | |
| 294 | func (core *Core) startAdapterManager(ctx context.Context) { |
| 295 | log.Info("Adapter-Manager-Starting...") |
| 296 | core.adapterMgr.start(ctx) |
| 297 | log.Info("Adapter-Manager-Started") |
William Kurkian | daa6bb2 | 2019-03-07 12:26:28 -0500 | [diff] [blame] | 298 | } |