// getS3Endpoint get Amazon S3 endpoint based on the bucket location.
185228
func getS3Endpoint(bucketLocation string) (s3Endpoint string) {
	s3Endpoint, ok := awsS3EndpointMap[bucketLocation]
	if !ok {
		// Default to 's3.dualstack.us-east-1.amazonaws.com' endpoint.
		s3Endpoint = "s3.dualstack.us-east-1.amazonaws.com"
	}
	return s3Endpoint
}
244551
func (c *Client) EndPoint(parts ...string) *url.URL {
	up := []string{apiVersion, "Accounts", c.AccountSid}
	up = append(up, parts...)
	u, _ := url.Parse(strings.Join(up, "/"))
	u.Path = fmt.Sprintf("/%s.%s", u.Path, apiFormat)
	return u
}
708472
func (p *NetPlugin) GetEndpointStats() ([]byte, error) {
	p.Lock()
	defer p.Unlock()
	return p.NetworkDriver.GetEndpointStats()
}
704074
func (ed *ContainersEndpoint) Get(ctx context.Context, in *pb.ContainersRequest) (*pb.ContainersReply, error) {
	key, err := ed.getKey(in, ctx)
	if err != nil {
		return nil, err
	}
	data, err := ed.wch.Get(key)
	if err != nil {
		return nil, err
	}
	obj, _, err := ed.make(key, data)
	if err != nil {
		return nil, err
	}
	return obj, nil
}
874557
func (ed *StreamrouterStreamprocsEndpoint) Get(ctx context.Context, in *pb.StreamrouterStreamprocsRequest) (*pb.StreamrouterStreamprocsReply, error) {
	key, err := ed.getKey(in, ctx)
	if err != nil {
		return nil, err
	}
	data, err := ed.wch.Get(key)
	if err != nil {
		return nil, err
	}
	obj, _, err := ed.make(key, data)
	if err != nil {
		return nil, err
	}
	return obj, nil
}
1180412
func (g *Cloud) GetNetworkEndpointGroup(name string, zone string) (*computebeta.NetworkEndpointGroup, error) {
	ctx, cancel := cloud.ContextWithCallTimeout()
	defer cancel()

	mc := newNetworkEndpointGroupMetricContext("get", zone)
	v, err := g.c.BetaNetworkEndpointGroups().Get(ctx, meta.ZonalKey(name, zone))
	return v, mc.Observe(err)
}
234742
func (s *RemoteAccessSession) SetEndpoint(v string) *RemoteAccessSession {
	s.Endpoint = &v
	return s
}
724319
func GenerateEndpoint() (string, error) {
	addr, err := net.ResolveTCPAddr("tcp", "localhost:0")
	if err != nil {
		return "", nil
	}

	l, err := net.ListenTCP("tcp", addr)
	if err != nil {
		return "", err
	}

	defer l.Close()
	return fmt.Sprintf("tcp://127.0.0.1:%d", l.Addr().(*net.TCPAddr).Port), nil
}
835136
func (p *Provider) Endpoint() oauth2.Endpoint {
	return oauth2.Endpoint{AuthURL: p.AuthURL, TokenURL: p.TokenURL}
}
1095286
func Endpoint(BaseURL string) oauth2.Endpoint {
	return oauth2.Endpoint{
		TokenURL: TokenURL(BaseURL),
	}
}
662931
func (c *Client) GetS3(i *GetS3Input) (*S3, error) {
	if i.Service == "" {
		return nil, ErrMissingService
	}

	if i.Version == 0 {
		return nil, ErrMissingVersion
	}

	if i.Name == "" {
		return nil, ErrMissingName
	}

	path := fmt.Sprintf("/service/%s/version/%d/logging/s3/%s", i.Service, i.Version, i.Name)
	resp, err := c.Get(path, nil)
	if err != nil {
		return nil, err
	}

	var s3 *S3
	if err := decodeJSON(&s3, resp.Body); err != nil {
		return nil, err
	}
	return s3, nil
}
1075291
func httpGetEndpointGroup(w http.ResponseWriter, r *http.Request, vars map[string]string) (interface{}, error) {
	log.Debugf("Received httpGetEndpointGroup: %+v", vars)

	key := vars["key"]

	collections.endpointGroupMutex.Lock()
	defer collections.endpointGroupMutex.Unlock()
	obj := collections.endpointGroups[key]
	if obj == nil {
		log.Infof("endpointGroup %s not found", key)
		return nil, errors.New("endpointGroup not found")
	}

	// Return the obj
	return obj, nil
}
461948
func (p *Peer) Endpoint(dns bool) string {
	if dns && p.Domain != "" {
		return fmt.Sprintf("%s:%d", p.Domain, p.Port)
	}

	return fmt.Sprintf("%s:%d", p.IPAddr, p.Port)
}
649495
func (a *Client) GetEndpointIDLog(params *GetEndpointIDLogParams) (*GetEndpointIDLogOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewGetEndpointIDLogParams()
	}

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "GetEndpointIDLog",
		Method:             "GET",
		PathPattern:        "/endpoint/{id}/log",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &GetEndpointIDLogReader{formats: a.formats},
		Context:            params.Context,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	return result.(*GetEndpointIDLogOK), nil

}
899661
func (ed *ProxyEndpoint) Get(ctx context.Context, in *pb.ProxyRequest) (*pb.ProxyReply, error) {
	key, err := ed.getKey(in, ctx)
	if err != nil {
		return nil, err
	}
	data, err := ed.wch.Get(key)
	if err != nil {
		return nil, err
	}
	obj, _, err := ed.make(key, data)
	if err != nil {
		return nil, err
	}
	return obj, nil
}
710745
func (s *ElasticsearchDataSourceConfig) SetEndpoint(v string) *ElasticsearchDataSourceConfig {
	s.Endpoint = &v
	return s
}
73783
func (c *Client) PingEndpoint() error {
	_, err := c.Restapi.GetHello(nil)
	return err
}