コード例 #1
0
ファイル: utils.go プロジェクト: vdemeester/rancher-compose
// 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
}
コード例 #2
0
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
}
コード例 #3
0
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
}
コード例 #4
0
ファイル: service.go プロジェクト: nickschuch/up
func (s *Service) DependentServices() []project.ServiceRelationship {
	return project.DefaultDependentServices(s.context.Project, s)
}