digraph G { size="7.5,10" labeljust="l" fontname=Helvetica; node [fontname=Helvetica] edge [fontname=Helvetica,fontsize=10] subgraph cluster0 { label="Datastore layer: Syncer goroutine"; Syncer [shape=box] Syncer -> SyncerCallbacks [label="typed KVs"] SyncerCallbacks [label=<
Syncer callbacks API |
Interface to frontend. OnStatusUpdated(status SyncStatus) OnUpdates(updates []KVPair) |
SyncerCallbacksDecoupler |
Decouples SyncerCallbacks via channel. |
ValidationFilter struct |
Runs validation on values. |
AsyncCalcGraph struct |
Puts updates on channel |
AsyncCalcGraph struct |
Converts channel back to method calls. Flushes event buffer after each dispatch. |
Dispatcher |
Fans out updates by type |
Local endpoint dispatcher |
Filters out non-local endpoints. |
Config batcher |
Combines individual config keys into consistent snapshots. |
Active rules calculator |
Calculates which policies/profiles are active on this host. |
Rule scanner |
Scans rules, extracts selectors/named ports. Calculates IP set IDs. |
Policy resolver |
Calculates the active policies for each active endpoint. |
IP set member index |
Combines profile labels with endpoint labels; indexes labels against selectors; calculates the IP/port memberships of IP sets; handles de-dupe of members. |
Pipeline callbacks API |
Interface to frontend. OnIPSetAdded(setID string, ipSetType proto.IPSetUpdate_IPSetType) OnIPSetMemberAdded(setID string, ip labelindex.IPSetMember) OnIPSetMemberRemoved(setID string, ip labelindex.IPSetMember) OnIPSetRemoved(setID string) OnPolicyActive(model.PolicyKey, *proto.Rules) OnPolicyInactive(model.PolicyKey) OnProfileActive(model.ProfileRulesKey, *proto.Rules) OnProfileInactive(model.ProfileRulesKey) OnEndpointTierUpdate(endpointKey model.Key, OnConfigUpdate(globalConfig, hostConfig map[string]string) endpoint interface{}, filteredTiers []endpoint.TierInfo) |
Event sequencer |
Batches/coalesces IP set updates; converts to protobuf structs; does dependency sequencing. |
Dataplane connection |
Marshals messages to/from Dataplane. |