Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
*sync.Mutex
// ChildrenByParent holds a map of child channels
ChildrenByParent map[string]map[string]chan struct{}
// ParentByChild helps us delete efficiently, by telling us which parent map the child is in
ParentByChild map[string]string
}
func (*Store) DeleteAndCloseChild ¶
DeleteAndClose closes the child's channel and deletes it this approach ensures the channel cannot be closed twice
func (*Store) DeleteAndCloseParent ¶
DeleteParent deletes the parent, and all its children, closing the children's channels
func (*Store) DeleteChild ¶
Delete deletes the child, without closing the channel
func (*Store) DeleteParent ¶
DeleteParent deletes the parent, and all its children, without closing the children's channels
Click to show internal directories.
Click to hide internal directories.