本文整理匯總了Golang中github.com/docker/libcompose/project.DefaultDependentServices函數的典型用法代碼示例。如果您正苦於以下問題:Golang DefaultDependentServices函數的具體用法?Golang DefaultDependentServices怎麽用?Golang DefaultDependentServices使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了DefaultDependentServices函數的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: DefaultDependentServices
// 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: DependentServices
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: 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
}
示例4: DependentServices
func (s *Service) DependentServices() []project.ServiceRelationship {
return project.DefaultDependentServices(s.context.Project, s)
}