// Find provides basic searching functionality across a Mesos cluster
// enabling searching for supported Mesos objects (Targets). Find may perform
// multiple calls to the Mesos master and agents depending on the provided criteria.
Find provides basic searching functionality across a Mesos cluster
enabling searching for supported Mesos objects (Targets). Find may perform
multiple calls to the Mesos master and agents depending on the provided criteria.
// Find provides basic searching functionality across a Mesos cluster // enabling searching for supported Mesos objects ( Targets ) . Find may perform // multiple calls to the Mesos master and agents depending on the provided criteria .
func Find(profile *config.Profile, criteria Criteria) (msgs Messages, err error) {
	switch criteria.Target {
	case AGENTS:
		return FindAgents(profile, criteria)
	case TASKS:
		return FindTasks(profile, criteria)
	case FILES:
		switch {
		case criteria.AgentID == "":
			err = ErrInvalidCriteria
		case criteria.FilePath == "":
			err = ErrInvalidCriteria
		default:
			return FindFiles(profile, criteria)
		}
	default:
		err = ErrInvalidCriteria
	}
	return msgs, err
}
func Find ( profile * config . Profile , criteria Criteria ) ( msgs Messages , err error ) { switch criteria . Target { case AGENTS : return FindAgents ( profile , criteria ) case TASKS : return FindTasks ( profile , criteria ) case FILES : switch { case criteria . AgentID == " " : err = ErrInvalidCriteria case criteria . FilePath == " " : err = ErrInvalidCriteria default : return FindFiles ( profile , criteria ) } default : err = ErrInvalidCriteria } return msgs , err }
Find provides basic searching functionality across a Mesos cluster
enabling searching for supported Mesos objects (Targets).
Find provides basic searching functionality across a Mesos cluster enabling searching for supported Mesos objects ( Targets ) .