25 lines
683 B
Go
25 lines
683 B
Go
package session
|
|
|
|
import "time"
|
|
|
|
type State string
|
|
|
|
const (
|
|
StateStarting State = "starting"
|
|
StateActive State = "active"
|
|
StateDetached State = "detached"
|
|
StateReconnecting State = "reconnecting"
|
|
StateTerminated State = "terminated"
|
|
StateFailed State = "failed"
|
|
)
|
|
|
|
type SessionDescriptor struct {
|
|
ID string `json:"id"`
|
|
ResourceID string `json:"resource_id"`
|
|
WorkerID string `json:"worker_id"`
|
|
State State `json:"state"`
|
|
ControllerID string `json:"controller_id"`
|
|
HeartbeatTTL time.Duration `json:"heartbeat_ttl"`
|
|
DetachGraceTime time.Duration `json:"detach_grace_time"`
|
|
}
|