Lattice Hub Docs
Principles

Control-plane assembly

The real pole-control-plane runtime structure across bootstrap, API plugins, domain servers, caches, and storage.

pole-control-plane is not a single HTTP CRUD service. Startup enters bootstrap.Start from cmd/start.go, then bootstrap/server.go assembles storage, cache, authorization, namespaces, discovery, governance, configuration, operations, and API servers in dependency order.

Protocol adapters can grow horizontally, but business capabilities reuse shared service.DiscoverServer, goverrule.GoverRuleServer, config.ConfigCenterServer, admin.AdminOperateServer, and cache.CacheManager.

Startup order

bootstrap.StartComponents matters:

  1. Obtain the store from storeapi.GetStore().
  2. cache.Initialize creates CacheManager and registers service, instance, governance, config, user, policy, MCP server, and A2A agent caches.
  3. auth.Initialize prepares user and strategy services required by auth interceptors.
  4. namespace.Initialize builds the namespace service.
  5. StartDiscoverComponents initializes discovery, batch controllers, health checks, and service.Initialize.
  6. StartGoverRuleComponents initializes governance servers.
  7. StartConfigCenterComponents initializes the configuration center.
  8. admin.Initialize assembles operations modules.
  9. cache.Run starts warm-up and periodic refresh.

Business servers and cache objects are fully assembled before refresh loops start, so API servers serve already-initialized shared objects.

control plane startup

API servers are plugin slots

Slots under apis/apiserver register HTTP, discovery gRPC, xDS v3, Nacos, Apollo, and Eureka entry points. bootstrap.StartServers walks apiserver.Config, initializes each slot, and runs listeners in goroutines.

HTTP Run pulls already-initialized domain servers (admin, namespace, service, goverrule, auth, healthcheck). HTTP is transport and routing—not an independent business state owner.

api shared servers

Domain interceptors

Discovery and governance share the same pattern:

  • RegisterServerProxy registers proxy factories.
  • GetChainOrder() returns ["auth", "paramcheck"].
  • InitServer wraps the concrete server in that order.

Authorization and parameter checks stay out of every protocol handler and remain consistent across HTTP, gRPC, and xDS.

interceptor chain

Module boundaries

LayerMain entryResponsibility
Bootstrapbootstrap/server.goDependency-ordered assembly and lifecycle.
Protocolsplugin/apiserver/*HTTP, gRPC, xDS, Nacos, Apollo, Eureka, MCP/A2A adapters.
Discoverypkg/serviceServices, instances, contracts, reporting, discovery responses.
Governancepkg/goverruleNine governance families and releases.
Configurationpkg/configGroups, files, publishing, protocol adapters.
Authorizationapis/access_control/auth, plugin/access_control/authUsers, policies, resource checks.
Cachepkg/cacheIncremental views, active releases, AI registries.
Storageplugin/store/mysqlCRUD, releases, incremental queries, transactions.

Design implications

  • Do not draw the control plane as “one HTTP API in front of a database”.
  • API servers adapt protocols; domain servers own semantics; interceptors enforce cross-cutting rules; CacheManager serves low-latency reads; Store is the source of truth.
  • AI Native registries join the same cache and HTTP assembly path—they are not a side UI.

See also deployment and ports and Control Plane.

On this page