Changing role, env, and name to be string pointers. This is due to the fact that TaskQuery can now take nil pointers to ignore certain fields. This allows querying for all jobs of a certain environment, all jobs from a certain role, and all jobs with a certain name.

This commit is contained in:
Renan DelValle 2018-09-16 21:23:36 -07:00
parent ce71939546
commit 0a3288a1dd
No known key found for this signature in database
GPG key ID: C240AD6D6F443EC9
5 changed files with 104 additions and 27 deletions

View file

@ -21,7 +21,7 @@ var rootCmd = &cobra.Command{
}
var username, password, zkAddr, schedAddr string
var env, role, name string
var env, role, name *string
var client realis.Realis
var monitor *realis.Monitor
var insecureSkipVerify bool
@ -66,8 +66,6 @@ func connect(cmd *cobra.Command, args []string) {
zkOptions := []realis.ZKOpt{ realis.ZKEndpoints(zkAddr), realis.ZKPath("/aurora/scheduler")}
if clientKey != "" || clientCert != "" || caCertsPath != "" {
zkOptions = append(zkOptions, realis.ZKAuroraPortOverride(8081), realis.ZKAuroraSchemeOverride("https"))
realisOptions = append(realisOptions, realis.Certspath(caCertsPath), realis.ClientCerts(clientKey, clientCert))
}