import ( tsuru "github.com/globocom/tsuru/client/tsuru" "github.com/globocom/tsuru/app" ) // tsuruClient is an instance of the tsuru client app := &app.App{Name: "myapp"} err := tsuruClient.CreateApp(app) if err != nil { // handle error }
import ( tsuru "github.com/globocom/tsuru/client/tsuru" "github.com/globocom/tsuru/app" ) // tsuruClient is an instance of the tsuru client app, err := tsuruClient.GetApp("myapp") if err != nil { // handle error } err = app.Scale("web", 3) if err != nil { // handle error }
import ( tsuru "github.com/globocom/tsuru/client/tsuru" "github.com/globocom/tsuru/app" ) // tsuruClient is an instance of the tsuru client app, err := tsuruClient.GetApp("myapp") if err != nil { // handle error } logs, err := app.Logs("web", tsuru.LogsArgs{Lines: 100}) if err != nil { // handle error } fmt.Println(logs)This code retrieves the logs for the "web" process of the "myapp" app, limiting the output to the last 100 lines.