Documentation
¶
Overview ¶
Package planlocks provides a mechanism to manage read-write locks for different plan IDs. This is useful for ensuring that only one goroutine is creating or modifying a plan at a time, while still allowing concurrent read access to plans that are not being modified.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
Group manages read-write locks for different plan IDs.
func New ¶
New creates a new Group for managing plan locks. There is a background goroutine that cleans up unused locks every minute. If the provided context is canceled, the cleanup goroutine will stop and the Group will no longer function.
Click to show internal directories.
Click to hide internal directories.