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

Method retrieveBinding

enterprise/tailnet/pgcoord.go:689–701  ·  view source on GitHub ↗

retrieveBinding gets the latest binding for a key.

(bk bKey)

Source from the content-addressed store, hash-verified

687
688// retrieveBinding gets the latest binding for a key.
689func (b *binder) retrieveBinding(bk bKey) binding {
690 b.mu.Lock()
691 defer b.mu.Unlock()
692 bnd, ok := b.latest[bk]
693 if !ok {
694 bnd = binding{
695 bKey: bk,
696 node: nil,
697 kind: proto.CoordinateResponse_PeerUpdate_DISCONNECTED,
698 }
699 }
700 return bnd
701}
702
703func (b *binder) wait() {
704 <-b.close

Callers 1

workerMethod · 0.95

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected