// Get implements milo.BuildInfoServer.
183252
func (svc *BuildInfoService) Get(c context.Context, req *milo.BuildInfoRequest) (*milo.BuildInfoResponse, error) {
	projectHint := req.ProjectHint
	if projectHint != "" {
		if err := config.ValidateProjectName(projectHint); err != nil {
			return nil, grpcutil.Errf(codes.InvalidArgument, "invalid project hint: %s", err.Error())
		}
	}

	switch {
	case req.GetBuildbot() != nil:
		return buildbot.GetBuildInfo(c, req.GetBuildbot(), projectHint)

	case req.GetSwarming() != nil:
		return svc.Swarming.GetBuildInfo(c, req.GetSwarming(), projectHint)

	case req.GetBuildbucket() != nil:
		switch resp, err := svc.getFromContextURI(c, req.GetBuildbucket().GetId(), projectHint); err {
		case nil:
			return resp, nil
		case buildbucket.ErrNotFound:
			logging.WithError(err).Infof(c, "%d not found in context URI for build summary")
			// continue to fallback code.
		default:
			return nil, err
		}

		// Resolve the swarming host/task from buildbucket.
		host, taskID, err := buildbucket.GetSwarmingTaskID(c, strconv.FormatInt(req.GetBuildbucket().GetId(), 10))
		if err != nil {
			return nil, err
		}
		sReq := &milo.BuildInfoRequest_Swarming{
			Host: host,
			Task: taskID,
		}
		return svc.Swarming.GetBuildInfo(c, sReq, projectHint)

	default:
		return nil, grpcutil.Errf(codes.InvalidArgument, "must supply a build")
	}
}
508694
func (rc *RequestConfig) GET(path string) *RequestConfig {
	rc.Path = path
	rc.Method = "GET"

	return rc
}
1217081
func (s *Store) Get(i interface{}) error {
	location := s.Path(i)

	file, err := ioutil.ReadFile(location)
	if err != nil {
		return err
	}

	err = yaml.Unmarshal(file, i)
	if err != nil {
		return err
	}

	return nil
}
1248809
func Get(name string) (string, error) {
	m, err := ReadConfig()
	if err != nil {
		return "", err
	}
	return get(name, m)
}
987157
func (multi *KapacitorStore) Get(ctx context.Context, id int) (chronograf.Server, error) {
	var err error
	for _, store := range multi.Stores {
		var k chronograf.Server
		k, err = store.Get(ctx, id)
		if err == nil {
			return k, nil
		}
	}
	return chronograf.Server{}, nil
}
229604
func (cache *Cache) Get(key string, params imageserver.Params) (*imageserver.Image, error) {
	data, err := cache.getData(key)
	if err != nil {
		return nil, err
	}
	if data == nil {
		return nil, nil
	}
	im := new(imageserver.Image)
	err = im.UnmarshalBinaryNoCopy(data)
	if err != nil {
		return nil, err
	}
	return im, nil
}
745081
func (ed *CoreinfoEndpoint) Get(ctx context.Context, in *pb.CoreinfoRequest) (*pb.CoreinfoReply, 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
}
659335
func (store *FSMetadataStore) Get(namespace string, key string) ([]byte, error) {
	store.RLock()
	defer store.RUnlock()

	return ioutil.ReadFile(store.path(namespace, key))
}
1062186
func (c *Config) Get(format string) (info Info, err error) {
	// make a deep copy of info
	if err = mergo.Merge(&info, c.Info); err != nil {
		return
	}
	override, ok := c.Overrides[format]
	if !ok {
		// no overrides
		return
	}
	err = mergo.Merge(&info.Overridables, override, mergo.WithOverride)
	if err != nil {
		return
	}
	return
}
1223208
func (srv *Server) Get(params imageserver.Params) (*imageserver.Image, error) {
	resp, err := srv.doRequest(params)
	if err != nil {
		return nil, err
	}
	defer func() {
		_ = resp.Body.Close()
	}()
	data, err := loadData(resp)
	if err != nil {
		return nil, err
	}
	format, err := srv.identify(resp, data)
	if err != nil {
		return nil, err
	}
	return &imageserver.Image{
		Format: format,
		Data:   data,
	}, nil
}
1224450
func (s *SitesService) Get(id string) (*Site, *Response, error) {
	site := &Site{Id: id, client: s.client}
	site.Deploys = &DeploysService{client: s.client, site: site}
	resp, err := site.Reload()

	return site, resp, err
}
570664
func (srv *Server) Get(params imageserver.Params) (*imageserver.Image, error) {
	ctx := &Context{
		Params: params,
	}
	key := srv.KeyGenerator.GetKey(params)
	var data []byte
	dest := groupcache.AllocatingByteSliceSink(&data)
	err := srv.Group.Get(ctx, key, dest)
	if err != nil {
		return nil, err
	}
	im := new(imageserver.Image)
	err = im.UnmarshalBinaryNoCopy(data)
	if err != nil {
		return nil, err
	}
	return im, nil
}
1023100
func (r *registry) Get(name string, pluginType consts.PluginType) (func() (interface{}, error), bool) {
	switch pluginType {
	case consts.PluginTypeCredential:
		f, ok := r.credentialBackends[name]
		return toFunc(f), ok
	case consts.PluginTypeSecrets:
		f, ok := r.logicalBackends[name]
		return toFunc(f), ok
	case consts.PluginTypeDatabase:
		f, ok := r.databasePlugins[name]
		return f, ok
	default:
		return nil, false
	}
}
749118
func (srv *Server) Get(params imageserver.Params) (*imageserver.Image, error) {
	enc, format, err := getEncoderFormat(srv.DefaultFormat, params)
	if err != nil {
		return nil, err
	}
	nim, err := srv.Provider.Get(params)
	if err != nil {
		return nil, err
	}
	im, err := encode(nim, format, enc, params)
	if err != nil {
		return nil, err
	}
	return im, nil
}
1059818
func (m *InMem) Get(ctx context.Context, name string) ([]byte, error) {
	m.Lock()
	defer m.Unlock()

	sec, found := m.data[name]
	if !found {
		return nil, fmt.Errorf("entry not found")
	}
	return sec, nil
}
1257983
func (c *Ctx) Get(key interface{}) (value interface{}, exists bool) {
	value = c.netContext.Value(key)
	exists = value != nil
	return
}
1344832
func (c *Cacher) Get(ctx context.Context, key string, resourceVersion string, objPtr runtime.Object, ignoreNotFound bool) error {
	if resourceVersion == "" {
		// If resourceVersion is not specified, serve it from underlying
		// storage (for backward compatibility).
		return c.storage.Get(ctx, key, resourceVersion, objPtr, ignoreNotFound)
	}

	// If resourceVersion is specified, serve it from cache.
	// It's guaranteed that the returned value is at least that
	// fresh as the given resourceVersion.
	getRV, err := c.versioner.ParseResourceVersion(resourceVersion)
	if err != nil {
		return err
	}

	if getRV == 0 && !c.ready.check() {
		// If Cacher is not yet initialized and we don't require any specific
		// minimal resource version, simply forward the request to storage.
		return c.storage.Get(ctx, key, resourceVersion, objPtr, ignoreNotFound)
	}

	// Do not create a trace - it's not for free and there are tons
	// of Get requests. We can add it if it will be really needed.
	c.ready.wait()

	objVal, err := conversion.EnforcePtr(objPtr)
	if err != nil {
		return err
	}

	obj, exists, readResourceVersion, err := c.watchCache.WaitUntilFreshAndGet(getRV, key, nil)
	if err != nil {
		return err
	}

	if exists {
		elem, ok := obj.(*storeElement)
		if !ok {
			return fmt.Errorf("non *storeElement returned from storage: %v", obj)
		}
		objVal.Set(reflect.ValueOf(elem.Object).Elem())
	} else {
		objVal.Set(reflect.Zero(objVal.Type()))
		if !ignoreNotFound {
			return storage.NewKeyNotFoundError(key, int64(readResourceVersion))
		}
	}
	return nil
}