Documentation ¶
Index ¶
- type BiMultimap
- func (m *BiMultimap) Delete(key Key)
- func (m *BiMultimap) DeleteSelector(key Key)
- func (m *BiMultimap) Exists(key Key) bool
- func (m *BiMultimap) KeepOnly(keys []Key)
- func (m *BiMultimap) KeepOnlySelectors(keys []Key)
- func (m *BiMultimap) Put(key Key, labels map[string]string)
- func (m *BiMultimap) PutSelector(key Key, selector pkglabels.Selector)
- func (m *BiMultimap) ReverseSelect(key Key) (keys []Key, ok bool)
- func (m *BiMultimap) Select(key Key) (keys []Key, ok bool)
- func (m *BiMultimap) SelectorExists(key Key) bool
- type Key
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BiMultimap ¶
type BiMultimap struct {
// contains filtered or unexported fields
}
BiMultimap is an efficient, bi-directional mapping of object keys. Associations are created by putting keys with a selector.
func (*BiMultimap) Delete ¶
func (m *BiMultimap) Delete(key Key)
Delete removes a labeled object and incoming associations.
func (*BiMultimap) DeleteSelector ¶
func (m *BiMultimap) DeleteSelector(key Key)
DeleteSelector deletes a selecting object and associations created by its selector.
func (*BiMultimap) Exists ¶
func (m *BiMultimap) Exists(key Key) bool
Exists returns true if the labeled object is present in the map.
func (*BiMultimap) KeepOnly ¶
func (m *BiMultimap) KeepOnly(keys []Key)
KeepOnly retains only the specified labeled objects and deletes the rest. Like calling Delete for all keys not specified.
func (*BiMultimap) KeepOnlySelectors ¶
func (m *BiMultimap) KeepOnlySelectors(keys []Key)
KeepOnlySelectors retains only the specified selecting objects and deletes the rest. Like calling DeleteSelector for all keys not specified.
func (*BiMultimap) Put ¶
func (m *BiMultimap) Put(key Key, labels map[string]string)
Put inserts or updates an object and the incoming associations based on the object labels.
func (*BiMultimap) PutSelector ¶
func (m *BiMultimap) PutSelector(key Key, selector pkglabels.Selector)
PutSelector inserts or updates an object with a selector. Associations are created or updated based on the selector.
func (*BiMultimap) ReverseSelect ¶
func (m *BiMultimap) ReverseSelect(key Key) (keys []Key, ok bool)
ReverseSelect finds objects selecting the given object. If the given key was found in the map `ok` will be true. Otherwise false.
func (*BiMultimap) Select ¶
func (m *BiMultimap) Select(key Key) (keys []Key, ok bool)
Select finds objects associated with a selecting object. If the given key was found in the map `ok` will be true. Otherwise false.
func (*BiMultimap) SelectorExists ¶
func (m *BiMultimap) SelectorExists(key Key) bool
SelectorExists returns true if the selecting object is present in the map.