github.com/sentienttechnologies/studio-go-runner@v0.0.0-20201118202441-6d21f2ced8ee/internal/types/appstate.go (about) 1 //go:generate enumer -type K8sState -trimprefix K8s 2 3 // Copyright 2018-2020 (c) Cognizant Digital Business, Evolutionary AI. All rights reserved. Issued under the Apache 2.0 License. 4 5 package types 6 7 // This package contains the go code for a enumeration that represents the application 8 // state for the go runner. This code will be scanned and used by the enumer code generator 9 // to produce utility methods for the enumeration 10 11 // K8sState represents a desired state for the go runner and the lifecycle it has 12 // for servicing requests 13 // 14 type K8sState int 15 16 const ( 17 // K8sUnknown indicates that the desired state for the runner is not accessible at this time 18 K8sUnknown K8sState = iota 19 // K8sRunning inidcates the runner should restart retrieving work and running if it is not doing so 20 K8sRunning 21 // K8sDrainAndTerminate indicates the runner should complete its current outstanding work and then exit 22 K8sDrainAndTerminate 23 // K8sDrainAndSuspend indicates the runner should complete its current outstanding work and then wait for a K8sResume 24 K8sDrainAndSuspend 25 )