MCPcopy Index your code
hub / github.com/coder/coder / pgCoord

Struct pgCoord

enterprise/tailnet/pgcoord.go:99–120  ·  view source on GitHub ↗

pgCoord is a postgres-backed coordinator ┌────────────┐ ┌────────────► handshaker ├────────┐ │ └────────────┘ │ │ ┌──────────┐ │ ├────────────► tunneler ├──────────┤ │ └──────────┘ │ │

Source from the content-addressed store, hash-verified

97// and a *proto.Node. It uses the term "mapping" to mean the act of determining the nodes that the connection
98// needs to receive (i.e. the nodes of all peers it shares a tunnel with).
99type pgCoord struct {
100 ctx context.Context
101 logger slog.Logger
102 pubsub pubsub.Pubsub
103 store database.Store
104
105 bindings chan binding
106 newConnections chan *connIO
107 closeConnections chan *connIO
108 tunnelerCh chan tunnel
109 handshakerCh chan readyForHandshake
110 id uuid.UUID
111
112 cancel context.CancelFunc
113 closeOnce sync.Once
114 closed chan struct{}
115
116 binder *binder
117 tunneler *tunneler
118 handshaker *handshaker
119 querier *querier
120}
121
122var pgCoordSubject = rbac.Subject{
123 ID: uuid.Nil.String(),

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected