github.com/operator-framework/operator-lifecycle-manager@v0.30.0/pkg/lib/proxy/querier.go (about)

     1  package proxy
     2  
     3  import (
     4  	corev1 "k8s.io/api/core/v1"
     5  )
     6  
     7  // NoopQuerier returns an instance of noopQuerier. It's used for upstream where
     8  // we don't have any cluster proxy configuration.
     9  func NoopQuerier() Querier {
    10  	return &noopQuerier{}
    11  }
    12  
    13  // Querier is an interface that wraps the QueryProxyConfig method.
    14  //
    15  // QueryProxyConfig returns the global cluster level proxy env variable(s).
    16  type Querier interface {
    17  	QueryProxyConfig() (proxy []corev1.EnvVar, err error)
    18  }
    19  
    20  type noopQuerier struct {
    21  }
    22  
    23  // QueryProxyConfig returns no env variable(s), err is set to nil to indicate
    24  // that the cluster has no global proxy configuration.
    25  func (*noopQuerier) QueryProxyConfig() (proxy []corev1.EnvVar, err error) {
    26  	return
    27  }