// JoinOptionPriority function returns an option setter for priority option to
// be passed to the endpoint.Join() method.
JoinOptionPriority function returns an option setter for priority option to
be passed to the endpoint.Join() method.
// JoinOptionPriority function returns an option setter for priority option to // be passed to the endpoint . Join () method .
func JoinOptionPriority(ep Endpoint, prio int) EndpointOption {
	return func(ep *endpoint) {
		c := ep.network.getController()
		c.Lock()
		sb, ok := c.sandboxes[ep.sandboxID]
		c.Unlock()
		if !ok {
			log.Errorf("Could not set endpoint priority value during Join to endpoint %s: No sandbox id present in endpoint", ep.id)
			return
		}
		sb.epPriority[ep.id] = prio
	}
}
func JoinOptionPriority ( ep Endpoint , prio int ) EndpointOption { return func ( ep * endpoint ) { c := ep . network . getController ( ) c . Lock ( ) sb , ok := c . sandboxes [ ep . sandboxID ] c . Unlock ( ) if ! ok { log . Errorf ( " " , ep . id ) return } sb . epPriority [ ep . id ] = prio } }
JoinOptionPriority function returns an option setter for priority option to
be passed to the endpoint.Join() method.
JoinOptionPriority function returns an option setter for priority option to be passed to the endpoint . Join () method .
// ep lock already acquired