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

Struct Set

coderd/entitlements/entitlements.go:16–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14)
15
16type Set struct {
17 entitlementsMu sync.RWMutex
18 entitlements codersdk.Entitlements
19 // right2Update works like a semaphore. Reading from the chan gives the right to update the set,
20 // and you send on the chan when you are done. We only allow one simultaneous update, so this
21 // serve to serialize them. You MUST NOT attempt to read from this channel while holding the
22 // entitlementsMu lock. It is permissible to acquire the entitlementsMu lock while holding the
23 // right2Update token.
24 right2Update chan struct{}
25}
26
27func New() *Set {
28 s := &Set{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected