Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mutex ¶
type Mutex interface { // Lock the mutex for the given key. Caller is responsible for calling Unlock // for the same key Lock(ctx context.Context, key string) // Unlock the mutex for the given key. Caller must have called Lock for the same key first Unlock(ctx context.Context, key string) // RLock the mutex for the given key. Caller is responsible for calling RUnlock RLock(ctx context.Context, key string) // RUnlock the mutex for the given key. Caller must have called RLock for the same key first RUnlock(ctx context.Context, key string) }
Mutex is a simple key/value store for arbitrary mutexes. It can be used to serialize changes across arbitrary collaborators that share knowledge of the keys they must serialize on.
The initial use case is to let aws_security_group_rule resources serialize their access to individual security groups based on SG ID.
Click to show internal directories.
Click to hide internal directories.