// Read the state.
772442
func (r *AutoVLANOperResource) Read(id string) error {
	key := fmt.Sprintf(vLANResourceOperPath, id)
	return r.StateDriver.ReadState(key, r, json.Unmarshal)
}
332511
func (a *MobileAppState) State() keybase1.MobileAppState {
	a.Lock()
	defer a.Unlock()
	return a.state
}
417613
func (s *CfgEndpointState) Read(id string) error {
	key := fmt.Sprintf(endpointConfigPath, id)
	return s.StateDriver.ReadState(key, s, json.Unmarshal)
}
573549
func (d *ConsulStateDriver) ReadAllState(baseKey string, sType core.State,
	unmarshal func([]byte, interface{}) error) ([]core.State, error) {
	baseKey = processKey(baseKey)
	return readAllStateCommon(d, baseKey, sType, unmarshal)
}
674644
func (d *ConsulStateDriver) Read(key string) ([]byte, error) {
	key = processKey(key)

	var err error
	var kv *api.KVPair

	for i := 0; i < maxConsulRetries; i++ {
		kv, _, err = d.Client.KV().Get(key, nil)
		if err != nil {
			if api.IsServerError(err) || strings.Contains(err.Error(), "EOF") || strings.Contains(err.Error(), "connection refused") {
				time.Sleep(time.Second)
				continue
			}

			return []byte{}, err
		}

		// err == nil
		if kv == nil {
			return []byte{}, core.Errorf("key not found")
		}

		return kv.Value, err
	}

	return []byte{}, err
}
92097
func (r *Reader) ReadStateFile() (*statefile.File, error) {
	for _, file := range r.zip.File {
		if file.Name == tfstateFilename {
			r, err := file.Open()
			if err != nil {
				return nil, fmt.Errorf("failed to extract state from plan file: %s", err)
			}
			return statefile.Read(r)
		}
	}
	return nil, statefile.ErrNoState
}
1172537
func (s *OvsDriverOperState) Read(id string) error {
	key := fmt.Sprintf(ovsOperPath, id)
	return s.StateDriver.ReadState(key, s, json.Unmarshal)
}
533512
func (s *CfgBgpState) ReadAll() ([]core.State, error) {
	return s.StateDriver.ReadAllState(bgpConfigPathPrefix, s, json.Unmarshal)
}
554162
func (r *UploadPackResponse) Read(p []byte) (int, error) {
	if r.r == nil {
		return 0, ErrUploadPackResponseNotDecoded
	}

	return r.r.Read(p)
}
743177
func (s *SvcProvider) Read(id string) error {
	key := fmt.Sprintf(svcProviderPath, id)
	err := s.StateDriver.ReadState(key, s, json.Unmarshal)
	return err
}
888991
func (d *digest) State() ([]byte, error) {
	var buf bytes.Buffer
	encoder := gob.NewEncoder(&buf)

	// We encode this way so that we do not have
	// to export these fields of the digest struct.
	vals := []interface{}{
		d.h, d.x, d.nx, d.len, d.is224,
	}

	for _, val := range vals {
		if err := encoder.Encode(val); err != nil {
			return nil, err
		}
	}

	return buf.Bytes(), nil
}
87590
func (c *client) Read() (pdu.Body, error) {
	select {
	case pdu := <-c.inbox:
		return pdu, nil
	case <-c.stop:
		return nil, io.EOF
	}
}
808592
func (s *OvsDriverOperState) ReadAll() ([]core.State, error) {
	return s.StateDriver.ReadAllState(ovsOperPathPrefix, s, json.Unmarshal)
}
1061977
func (ds *DummyStatus) Read(p []byte) (n int, err error) {
	ds.hook.Read(p)
	return len(p), nil
}
681737
func (s *OperEndpointState) ReadAll() ([]core.State, error) {
	return s.StateDriver.ReadAllState(endpointOperPathPrefix, s, json.Unmarshal)
}
204784
func (s *EndpointGroupState) ReadAll() ([]core.State, error) {
	return s.StateDriver.ReadAllState(epGroupConfigPathPrefix, s, json.Unmarshal)
}
1039326
func (i *Issue) GetState() string {
	if i == nil || i.State == nil {
		return ""
	}
	return *i.State
}