You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: decision.go
    path of file: ./repos/yoke/monitor
    
    the code of the file until where you have to start completion: //
package monitor

import (
	"errors"
	"os"
	"sync"
	"time"

	"github.com/nanopack/yoke/config"
	"github.com/nanopack/yoke/state"
)

var (
	ClusterUnaviable = errors.New("none of the nodes in the cluster are availabl
    
func (decider decider) Loop(check time.Duration) error {
	timer := time.Tick(check)
	for range timer {
		err := decider.reCheck()
		switch {
		case err == ClusterUnaviable:
		case err != nil:
			return err
		default:
		}
	}
	return nil
}