// GetState implements method in VersionedDB interface
336389
func (vdb *versionedDB) GetState(namespace string, key string) (*statedb.VersionedValue, error) {
	logger.Debugf("GetState(). ns=%s, key=%s", namespace, key)
	compositeKey := constructCompositeKey(namespace, key)
	dbVal, err := vdb.db.Get(compositeKey)
	if err != nil {
		return nil, err
	}
	if dbVal == nil {
		return nil, nil
	}
	return decodeValue(dbVal)
}
199350
func (d *Domain) GetState() (DomainState, int, error) {
	var cState C.int
	var cReason C.int
	var err C.virError
	result := C.virDomainGetStateWrapper(d.ptr,
		(*C.int)(unsafe.Pointer(&cState)),
		(*C.int)(unsafe.Pointer(&cReason)),
		0, &err)
	if int(result) == -1 {
		return 0, 0, makeError(&err)
	}
	return DomainState(cState), int(cReason), nil
}
143620
func (b *Backend) GetState(taskUUID string) (*tasks.TaskState, error) {
	tasktStateBytes, ok := b.tasks[taskUUID]
	if !ok {
		return nil, NewErrTasknotFound(taskUUID)
	}

	state := new(tasks.TaskState)
	decoder := json.NewDecoder(bytes.NewReader(tasktStateBytes))
	decoder.UseNumber()
	if err := decoder.Decode(state); err != nil {
		return nil, fmt.Errorf("Failed to unmarshal task state %v", b)
	}

	return state, nil
}
1056351
func NewGetProcedureState(ctx context.Context, procID uint64) *GetProcedureState {
	return &GetProcedureState{
		base: base{
			ctx:      ctx,
			resultch: make(chan RPCResult, 1),
		},
		procID: procID,
	}
}
159355
func GetVersion() Version {
	var versionStr string
	if gitCommit != "" && gitTag != "" && gitTreeState == "clean" {
		// if we have a clean tree state and the current commit is tagged,
		// this is an official release.
		versionStr = gitTag
	} else {
		// otherwise formulate a version string based on as much metadata
		// information we have available.
		versionStr = "v" + version
		if len(gitCommit) >= 7 {
			versionStr += "+" + gitCommit[0:7]
			if gitTreeState != "clean" {
				versionStr += ".dirty"
			}
		} else {
			versionStr += "+unknown"
		}
	}
	return Version{
		Version:      versionStr,
		BuildDate:    buildDate,
		GitCommit:    gitCommit,
		GitTag:       gitTag,
		GitTreeState: gitTreeState,
		GoVersion:    runtime.Version(),
		Compiler:     runtime.Compiler,
		Platform:     fmt.Sprintf("%s/%s", runtime.GOOS, runtime.GOARCH),
	}
}
998265
func (c *Client) GetStateFromCluster() (*State, error) {
	resp, err := c.GetHTTPResponseFromCluster(c.GetURLForStateFile)
	return c.parseStateResponse(resp, err)
}
415473
func (r *TasksService) GetStates() *TasksGetStatesCall {
	c := &TasksGetStatesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	return c
}
475056
func (stub *ChaincodeStub) GetState(key string) ([]byte, error) {
	// Access public data by setting the collection to empty string
	collection := ""
	return stub.handler.handleGetState(collection, key, stub.ChannelId, stub.TxID)
}
998825
func (c *Client) GetState() uint8 {
	c.stateLock.Lock()
	defer c.stateLock.Unlock()

	return c.state.State()
}
394988
func (vm *VM) GetState() (string, error) {
	stdout, stderr, err := runner.Run("list")
	if err != nil {
		return "", err
	}
	if stderr != "" {
		return "", fmt.Errorf("Failed to get state using the vmrun utility: %s", stderr)
	}

	if strings.Contains(stdout, vm.Dst) {
		return lvm.VMRunning, nil
	}

	// Maybe vm.Dst is a symlink?
	p, err := filepath.EvalSymlinks(vm.Dst)
	if err != nil {
		return "", err
	}

	absp, err := filepath.Abs(p)
	if err != nil {
		return "", err
	}

	if strings.Contains(stdout, absp) {
		return lvm.VMRunning, nil
	}

	// Originally reported these as VMHalted, but for our purposes it was better
	// to list them as VMSuspended so that we did not assume they would start up
	// in an initial state.
	return lvm.VMSuspended, nil
}
379096
func (c ClientCookies) GetState(r *http.Request, id string) string {
	stateCookie, err := r.Cookie(stateCookiePrefix + id)
	if err != nil {
		return ""
	}
	return stateCookie.Value
}
1335662
func (c *CombinedStatus) GetState() string {
	if c == nil || c.State == nil {
		return ""
	}
	return *c.State
}
228617
func (c *Changelog) GetVersion(versionNum string) *Version {
	for _, v := range c.Versions {
		if v.Version == versionNum {
			return v
		}
	}
	return nil
}
420045
func (impl *adminImpl) GetJobState(c context.Context, id *api.JobID) (*api.JobState, error) {
	job, err := impl.ctl.GetJob(c, mapper.JobID(id.JobId))
	if err != nil {
		return nil, toStatus(err)
	}
	cfg := &api.JobConfig{}
	if err := proto.Unmarshal(job.Config.Params, cfg); err != nil {
		return nil, toStatus(errors.Annotate(err, "failed to unmarshal JobConfig").Err())
	}
	info, err := job.FetchInfo(c)
	if err != nil {
		return nil, toStatus(err)
	}
	return &api.JobState{Config: cfg, Info: info}, nil
}
1233532
func (c *Ctx) GetOperationState(sh SessionHandle) ([]byte, error) {
	var (
		state    C.CK_BYTE_PTR
		statelen C.CK_ULONG
	)
	e := C.GetOperationState(c.ctx, C.CK_SESSION_HANDLE(sh), &state, &statelen)
	defer C.free(unsafe.Pointer(state))
	if toError(e) != nil {
		return nil, toError(e)
	}
	b := C.GoBytes(unsafe.Pointer(state), C.int(statelen))
	return b, nil
}
1112532
func (m TaskManager) GetDebugState(c context.Context, ctl task.ControllerReadOnly) (*internal.DebugManagerState, error) {
	return nil, fmt.Errorf("no debug state")
}
971584
func (d *DismissedReview) GetState() string {
	if d == nil || d.State == nil {
		return ""
	}
	return *d.State
}