code: func (s *Factory) Stacks(allNamespaces bool) (StackClient, error) {
  	version, err := kubernetes.GetStackAPIVersion(s.clientSet.Discovery(), s.experimental)
  	if err != nil {
  		return nil, err
  	}
  	namespace := s.namespace
  	if allNamespaces {
  		namespace = metav1.NamespaceAll
  	}
  
  	switch version {
  	case kubernetes.StackAPIV1Beta1:
  		return newStackV1Beta1(s.config, namespace)
  	case kubernetes.StackAPIV1Beta2:
  		return newStackV1Beta2(s.config, namespace)
  	case kubernetes.StackAPIV1Alpha3:
  		return newStackV1Alpha3(s.config, namespace)
  	default:
  		return nil, errors.Errorf("unsupported stack API version: %q", version)
  	}
  }
docs: // Stacks returns a client for Docker's Stack on Kubernetes