1 // Copyright (c) 2019 Cisco and/or its affiliates.
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at:
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 // Package govpp provides the entry point to govpp functionality. It provides the API for connecting the govpp core
16 // to VPP either using the default VPP adapter, or using the adapter previously set by SetAdapter function
17 // (useful mostly just for unit/integration tests with mocked VPP adapter).
19 // To create a connection to VPP, use govpp.Connect function:
21 // conn, err := govpp.Connect()
25 // defer conn.Disconnect()
27 // Make sure you close the connection after using it. If the connection is not closed, it will leak resources. Please
28 // note that only one VPP connection is allowed for a single process.
30 // In case you need to mock the connection to VPP (e.g. for testing), use the govpp.SetAdapter function before
31 // calling govpp.Connect.
33 // Once connected to VPP, use the functions from the api package to communicate with it.