github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/kv/kvserver/refreshraftreason_string.go (about)

     1  // Code generated by "stringer -type refreshRaftReason"; DO NOT EDIT.
     2  
     3  package kvserver
     4  
     5  import "strconv"
     6  
     7  func _() {
     8  	// An "invalid array index" compiler error signifies that the constant values have changed.
     9  	// Re-run the stringer command to generate them again.
    10  	var x [1]struct{}
    11  	_ = x[noReason-0]
    12  	_ = x[reasonNewLeader-1]
    13  	_ = x[reasonNewLeaderOrConfigChange-2]
    14  	_ = x[reasonSnapshotApplied-3]
    15  	_ = x[reasonReplicaIDChanged-4]
    16  	_ = x[reasonTicks-5]
    17  }
    18  
    19  const _refreshRaftReason_name = "noReasonreasonNewLeaderreasonNewLeaderOrConfigChangereasonSnapshotAppliedreasonReplicaIDChangedreasonTicks"
    20  
    21  var _refreshRaftReason_index = [...]uint8{0, 8, 23, 52, 73, 95, 106}
    22  
    23  func (i refreshRaftReason) String() string {
    24  	if i < 0 || i >= refreshRaftReason(len(_refreshRaftReason_index)-1) {
    25  		return "refreshRaftReason(" + strconv.FormatInt(int64(i), 10) + ")"
    26  	}
    27  	return _refreshRaftReason_name[_refreshRaftReason_index[i]:_refreshRaftReason_index[i+1]]
    28  }