Architecture

Processes, packages, and data flow in Pola PCE.

Packages

PackageRole
cmd/poladThe daemon: loads configuration and starts the PCEP listener, gRPC server, and GoBGP monitor.
cmd/polaThe CLI client of the gRPC API.
api/pola/v1Protocol Buffers definitions and generated code for PCEService.
pkg/serverPCEP listener, one session per peer address, and the PCEService implementation.
pkg/packet/pcepPCEP message, object, and TLV encoding and decoding. See PCEP Library.
pkg/tableTED, SR Policy and segment models, SID validation, and underlay planes.
pkg/cspfShortest-path computation over the TED.
pkg/loggerStructured logging.
internal/gobgpReads BGP-LS from GoBGP and converts it into TED elements.
internal/configParses and validates polad.yaml.

Data flow

                                                      pola CLI / gRPC clients
                                                                 |
                                                                 v
                    +-- PCInitiate / PCUpd ----------------- APIServer
                    |                                            ^
                    v                                            |
PCC <--PCEP--> Session (one per peer)                            | reads current TED
                    ^                                            |
                    | reads current TED                          |
                    |                                            |
                    +---------------------------------------- Server (holds current TED)
                                                                 ^
                                      syncTEDLoop replaces the current TED with a new LsTED
                                                                 |
GoBGP --(ListPath, triggered by watch)--> internal/gobgp --> []TEDElem
  • Each accepted TCP connection creates a Session. A duplicate connection from the same peer address is rejected with PCErr 9/1.
  • Each TED update replaces the current TED with a new LsTED rather than modifying the existing one. Sessions read the current TED and its readiness on each use. See TED and CSPF.
  • SR Policy state is held in memory per session and is not persisted.
  • The gRPC handlers validate requests and pass them to the session, which sends PCInitiate or PCUpd. The handlers return once the message is written.
Last modified November 20, 2026: docs: modernize documentation site (74dd3de)