Naveen Sampath | 04696f7 | 2022-06-13 15:19:14 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2020-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 | |
| 17 | // The implementation of the open flow agent (vpagent) uses a GRPC connection |
vinokuma | 926cb3e | 2023-03-29 11:41:06 +0530 | [diff] [blame] | 18 | // to VOLTHA across several implementaton packages including the vpagent and |
Naveen Sampath | 04696f7 | 2022-06-13 15:19:14 +0530 | [diff] [blame] | 19 | // openflow packages. This GRPC connection is shared through packages and type |
| 20 | // instances via injection. |
| 21 | // |
| 22 | // As the vpagent executes within a micro-service environment it is |
| 23 | // possible that the GRPC connection is reset (re-established). When the connection |
| 24 | // is re-established, because injection is used, the new value needs to be |
| 25 | // re-injected across the implementation. |
| 26 | // |
| 27 | // To help simply the re-injection or value change scenario a holder for the |
| 28 | // GRPC connection is established so that the reference to the holder can |
vinokuma | 926cb3e | 2023-03-29 11:41:06 +0530 | [diff] [blame] | 29 | // stay [sic] consistent over the lifetime of the vpagent while the underlying |
Naveen Sampath | 04696f7 | 2022-06-13 15:19:14 +0530 | [diff] [blame] | 30 | // GRPC connection can change without walking the entire runtime structure. |
| 31 | |
| 32 | package holder |