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

Method maskUUID

tailnet/conn.go:409–412  ·  view source on GitHub ↗

maskUUID returns a new UUID with the first 6 bytes changed to the ServicePrefix

(uid uuid.UUID)

Source from the content-addressed store, hash-verified

407
408// maskUUID returns a new UUID with the first 6 bytes changed to the ServicePrefix
409func (p ServicePrefix) maskUUID(uid uuid.UUID) uuid.UUID {
410 copy(uid[:], p[:])
411 return uid
412}
413
414// RandomAddr returns a random IP address in the service prefix.
415func (p ServicePrefix) RandomAddr() netip.Addr {

Callers 2

RandomAddrMethod · 0.95
AddrFromUUIDMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected