(m map[string]*types.UlimitsConfig)
| 706 | } |
| 707 | |
| 708 | func toUlimits(m map[string]*types.UlimitsConfig) []*container.Ulimit { |
| 709 | var ulimits []*container.Ulimit |
| 710 | for name, u := range m { |
| 711 | soft := u.Single |
| 712 | if u.Soft != 0 { |
| 713 | soft = u.Soft |
| 714 | } |
| 715 | hard := u.Single |
| 716 | if u.Hard != 0 { |
| 717 | hard = u.Hard |
| 718 | } |
| 719 | ulimits = append(ulimits, &container.Ulimit{ |
| 720 | Name: name, |
| 721 | Hard: int64(hard), |
| 722 | Soft: int64(soft), |
| 723 | }) |
| 724 | } |
| 725 | return ulimits |
| 726 | } |
| 727 | |
| 728 | func setReservations(reservations *types.Resource, resources *container.Resources) { |
| 729 | if reservations == nil { |
no outgoing calls
no test coverage detected