github.com/zoomfoo/nomad@v0.8.5-0.20180907175415-f28fd3a1a056/nomad/plan_apply_not_ent.go (about)

     1  // +build !ent
     2  
     3  package nomad
     4  
     5  import (
     6  	"github.com/hashicorp/nomad/nomad/state"
     7  	"github.com/hashicorp/nomad/nomad/structs"
     8  )
     9  
    10  // refreshIndex returns the index the scheduler should refresh to as the maximum
    11  // of both the allocation and node tables.
    12  func refreshIndex(snap *state.StateSnapshot) (uint64, error) {
    13  	allocIndex, err := snap.Index("allocs")
    14  	if err != nil {
    15  		return 0, err
    16  	}
    17  	nodeIndex, err := snap.Index("nodes")
    18  	if err != nil {
    19  		return 0, err
    20  	}
    21  	return maxUint64(nodeIndex, allocIndex), nil
    22  }
    23  
    24  // evaluatePlanQuota returns whether the plan would be over quota
    25  func evaluatePlanQuota(snap *state.StateSnapshot, plan *structs.Plan) (bool, error) {
    26  	return false, nil
    27  }