API reference
The links below open the Go reference for v2.0.1. Import SDK packages under github.com/zhh2001/p4runtime-go-controller/v2.
| Package | Purpose |
|---|---|
| client | Connections, arbitration, pipeline RPCs, reads, writes and stream callbacks. |
| pipeline | Loading P4Info and device configuration, resource lookup and copied definitions. |
| tableentry | Direct-action table entry and key builders. |
| codec | Integer and address encoding helpers. |
| packetio | PacketIn and PacketOut with named metadata. |
| digest | Named subscriptions and digest acknowledgements. |
| counter | Indirect counter reads and writes. |
| meter | Indirect meter reads, configuration and reset. |
| register | Register reads and validated P4Data writes. |
| pre | Multicast groups and clone sessions. |
| errors | Error sentinels and per-update write results. |
| metrics | Reserved package for planned metrics support. It has no collector API. |
Start with the quickstart for a complete program. Resource guides cover pipeline ownership, counters, meters, registers and packet replication.