// Describer returns a Describer for displaying the specified RESTMapping type or an error.
488880
func Describer(restClientGetter genericclioptions.RESTClientGetter, mapping *meta.RESTMapping) (describe.Describer, error) {
	clientConfig, err := restClientGetter.ToRESTConfig()
	if err != nil {
		return nil, err
	}
	// try to get a describer
	if describer, ok := DescriberFor(mapping.GroupVersionKind.GroupKind(), clientConfig); ok {
		return describer, nil
	}
	// if this is a kind we don't have a describer for yet, go generic if possible
	if genericDescriber, ok := GenericDescriberFor(mapping, clientConfig); ok {
		return genericDescriber, nil
	}
	// otherwise return an unregistered error
	return nil, fmt.Errorf("no description has been implemented for %s", mapping.GroupVersionKind.String())
}
1110751
func (client *Client) DescribeKeyPairs(args *DescribeKeyPairsArgs) (KeyPairs []KeyPairItemType, pagination *common.PaginationResult, err error) {
	response, err := client.DescribeKeyPairsWithRaw(args)
	if err != nil {
		return nil, nil, err
	}

	return response.KeyPairs.KeyPair, &response.PaginationResult, err
}
679555
func (b *Broker) DescribeConfigs(request *DescribeConfigsRequest) (*DescribeConfigsResponse, error) {
	response := new(DescribeConfigsResponse)

	err := b.sendAndReceive(request, response)
	if err != nil {
		return nil, err
	}

	return response, nil
}
134448
func (client *Client) DescribeUserdata(args *DescribeUserdataArgs) (userData *DescribeUserdataItemType, err error) {
	response := DescribeUserdataResponse{}

	err = client.Invoke("DescribeUserdata", args, &response)

	if err == nil {
		return &response.DescribeUserdataItemType, nil
	}

	return nil, err
}
838694
func (c *appCollector) Describe(ch chan<- *prometheus.Desc) {
	ch <- descAppInfo
	ch <- descAppCreated
	ch <- descAppSyncStatusCode
	ch <- descAppHealthStatus
}
852569
func GenericDescriberFor(mapping *meta.RESTMapping, clientConfig *rest.Config) (describe.Describer, bool) {
	// used to fetch the resource
	dynamicClient, err := dynamic.NewForConfig(clientConfig)
	if err != nil {
		return nil, false
	}

	// used to get events for the resource
	clientSet, err := clientset.NewForConfig(clientConfig)
	if err != nil {
		return nil, false
	}
	eventsClient := clientSet.CoreV1()

	return &genericDescriber{mapping, dynamicClient, eventsClient}, true
}
830396
func (c *MgoStatsCollector) Describe(ch chan<- *prometheus.Desc) {
	c.clustersGauge.Describe(ch)
	c.masterConnsGauge.Describe(ch)
	c.slaveConnsGauge.Describe(ch)
	c.sentOpsCounter.Describe(ch)
	c.receivedOpsCounter.Describe(ch)
	c.receivedDocsCounter.Describe(ch)
	c.socketsAliveGauge.Describe(ch)
	c.socketsInuseGauge.Describe(ch)
	c.socketRefsGauge.Describe(ch)
}
591302
func (i *Interceptor) Describe(in chan<- *prometheus.Desc) {
	i.monitoring.dialer.Describe(in)
	i.monitoring.server.Describe(in)
	i.monitoring.client.Describe(in)
}
1352135
func (c *Cloud) describeLoadBalancer(name string) (*elb.LoadBalancerDescription, error) {
	request := &elb.DescribeLoadBalancersInput{}
	request.LoadBalancerNames = []*string{&name}

	response, err := c.elb.DescribeLoadBalancers(request)
	if err != nil {
		if awsError, ok := err.(awserr.Error); ok {
			if awsError.Code() == "LoadBalancerNotFound" {
				return nil, nil
			}
		}
		return nil, err
	}

	var ret *elb.LoadBalancerDescription
	for _, loadBalancer := range response.LoadBalancerDescriptions {
		if ret != nil {
			klog.Errorf("Found multiple load balancers with name: %s", name)
		}
		ret = loadBalancer
	}
	return ret, nil
}
136052
func NewDescriptionManager(r *http.Request) *DescriptionManager {
	session := db.GetDBSession(r)
	return &DescriptionManager{
		session:    session,
		collection: getDescriptionManager(session),
	}
}
147410
func (client *Client) DescribeRegions() (resp *DescribeRegionsResponse, err error) {
	args := DescribeRegionsArgs{}
	response := DescribeRegionsResponse{}
	err = client.Invoke("DescribeRegions", &args, &response)

	if err != nil {
		return nil, err
	}
	return &response, nil
}
1140140
func (d *NetNamespaceDescriber) Describe(namespace, name string, settings describe.DescriberSettings) (string, error) {
	netns, err := d.c.NetNamespaces().Get(name, metav1.GetOptions{})
	if err != nil {
		return "", err
	}
	return tabbedString(func(out *tabwriter.Writer) error {
		formatMeta(out, netns.ObjectMeta)
		formatString(out, "Name", netns.NetName)
		formatString(out, "ID", netns.NetID)
		formatString(out, "Egress IPs", strings.Join(netns.EgressIPs, ", "))
		return nil
	})
}
1362782
func (c *processCollector) Describe(ch chan<- *Desc) {
	ch <- c.cpuTotal
	ch <- c.openFDs
	ch <- c.maxFDs
	ch <- c.vsize
	ch <- c.maxVsize
	ch <- c.rss
	ch <- c.startTime
}
929523
func (bc *buildCollector) Describe(ch chan<- *prometheus.Desc) {
	ch <- buildCountDesc
	ch <- activeBuildDesc
}
217324
func initHelper(driverRegistry map[string]driverConfigTypes, driverName string) (core.Driver, error) {
	if _, ok := driverRegistry[driverName]; ok {
		driverType := driverRegistry[driverName].DriverType

		driver := reflect.New(driverType).Interface()
		return driver, nil
	}

	return nil, core.Errorf("Failed to find a registered driver for: %s", driverName)
}
1181803
func (sh *Handler) Describe(ctx context.Context, dr *DescribeRequest) (dres *DescribeResponse, err error) {
	sh.index.RLock()
	defer sh.index.RUnlock()

	return sh.DescribeLocked(ctx, dr)
}
591279
func (s *Server) GetServiceProvider(r *http.Request, serviceProviderID string) (*saml.EntityDescriptor, error) {
	s.idpConfigMu.RLock()
	defer s.idpConfigMu.RUnlock()
	rv, ok := s.serviceProviders[serviceProviderID]
	if !ok {
		return nil, os.ErrNotExist
	}
	return rv, nil
}