// DefaultDependentServices return the dependent services (as an array of ServiceRelationship) // for the specified project and service. It looks for : links, volumesFrom, net and ipc configuration. // It uses default project implementation and append some docker specific ones. func DefaultDependentServices(p *project.Project, s project.Service) []project.ServiceRelationship { result := project.DefaultDependentServices(p, s) result = appendNs(p, result, s.Config().NetworkMode, project.RelTypeNetNamespace) result = appendNs(p, result, s.Config().Ipc, project.RelTypeIpcNamespace) return result }
func (s *Sidekick) DependentServices() []project.ServiceRelationship { dependentServices := project.DefaultDependentServices(s.context.Project, s) for i, dependentService := range dependentServices { if dependentService.Type == project.RelTypeLink { dependentServices[i].Optional = true } } return dependentServices }
func (r *RancherService) DependentServices() []project.ServiceRelationship { result := []project.ServiceRelationship{} for _, rel := range project.DefaultDependentServices(r.context.Project, r) { if rel.Type == project.REL_TYPE_LINK { rel.Optional = true result = append(result, rel) } } return result }
func (s *Service) DependentServices() []project.ServiceRelationship { return project.DefaultDependentServices(s.context.Project, s) }