func()

in internal/objectstore/objectstore.go [123:142]


func (o *ObjectStore) mergeInterfaces(objectRef api.ObjectRef) {
	// If we don't have interfaces, we have nothing to do...
	if objectRef.Interfaces == nil {
		return
	}

	// Find or create the interface list for the relevant InstanceID
	var interfaces stringSet
	if list, found := o.idToInterfaces[objectRef.InstanceID]; found {
		interfaces = list
	} else {
		interfaces = make(stringSet)
		o.idToInterfaces[objectRef.InstanceID] = interfaces
	}

	// Add any missing interface to the list.
	for _, iface := range objectRef.Interfaces {
		interfaces[string(iface)] = struct{}{}
	}
}