Documentation
¶
Index ¶
- Constants
- type RESTService
- func (a *RESTService) AttachShell(w http.ResponseWriter, r *http.Request)
- func (a *RESTService) DetachShell(w http.ResponseWriter, r *http.Request)
- func (a *RESTService) GetAppLogs(w http.ResponseWriter, r *http.Request)
- func (a *RESTService) GetAppsStatus(w http.ResponseWriter, r *http.Request)
- func (a *RESTService) GetCredsHelper(w http.ResponseWriter, r *http.Request)
- func (a *RESTService) GetIdentity(w http.ResponseWriter, r *http.Request)
- func (a *RESTService) GetInitScripts(w http.ResponseWriter, r *http.Request)
- func (a *RESTService) GetLogs(w http.ResponseWriter, r *http.Request)
- func (a *RESTService) GetSessions(w http.ResponseWriter, r *http.Request)
- func (a *RESTService) GetSplash(w http.ResponseWriter, r *http.Request)
- func (a *RESTService) GetStreams(w http.ResponseWriter, r *http.Request)
- func (a *RESTService) GetSystemInfo(w http.ResponseWriter, r *http.Request)
- func (a *RESTService) InstallApp(w http.ResponseWriter, r *http.Request)
- func (a *RESTService) ListDetachedShells(w http.ResponseWriter, r *http.Request)
- func (a *RESTService) ResizeShell(w http.ResponseWriter, r *http.Request)
- func (a *RESTService) Serve(ctx context.Context)
- func (a *RESTService) Shutdown(w http.ResponseWriter, r *http.Request)
- func (a *RESTService) StartApp(w http.ResponseWriter, r *http.Request)
- func (a *RESTService) StopApp(w http.ResponseWriter, r *http.Request)
- func (a *RESTService) ValidateK8shelldFile(w http.ResponseWriter, r *http.Request)
- type Server
Constants ¶
const ( FLAG_DIR_TEMPLATE = "%s/.k8shell/flags" SystemInfoCollectionIntervalSeconds = 30 )
const API_VERSION = "v1"
const JWT_VERIFIER_PUBLIC_KEY_ENV = "JWT_VERIFIER_PUBLIC_KEY"
const JWT_VERIFIER_SIGNING_METHOD_ENV = "JWT_VERIFIER_SIGNING_METHOD"
const USER_DISPLAY_NAME_ENV = "USERFULLNAME"
const USER_EMAIL_ENV = "USEREMAIL"
const USER_GID_ENV = "USER_GID"
const USER_UID_ENV = "USER_UID"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RESTService ¶
type RESTService struct {
// contains filtered or unexported fields
}
func NewRESTService ¶
NewRESTAPI creates a new REST API service
func (*RESTService) AttachShell ¶
func (a *RESTService) AttachShell(w http.ResponseWriter, r *http.Request)
AttachShell hijacks the HTTP connection and bridges it directly to the PTY of the requested shell session (replaying scrollback first).
func (*RESTService) DetachShell ¶
func (a *RESTService) DetachShell(w http.ResponseWriter, r *http.Request)
DetachShell signals the currently attached client of a session to detach. An optional JSON body { "ttl": "30m" } sets a per-session TTL override.
func (*RESTService) GetAppLogs ¶
func (a *RESTService) GetAppLogs(w http.ResponseWriter, r *http.Request)
GetAppLogs returns (and can stream) the latest logs for a given app.
func (*RESTService) GetAppsStatus ¶
func (a *RESTService) GetAppsStatus(w http.ResponseWriter, r *http.Request)
GetAppsStatus returns the status of all configured apps.
func (*RESTService) GetCredsHelper ¶
func (a *RESTService) GetCredsHelper(w http.ResponseWriter, r *http.Request)
func (*RESTService) GetIdentity ¶
func (a *RESTService) GetIdentity(w http.ResponseWriter, r *http.Request)
func (*RESTService) GetInitScripts ¶
func (a *RESTService) GetInitScripts(w http.ResponseWriter, r *http.Request)
GetInitScripts returns a JSON snapshot of all init script states.
func (*RESTService) GetLogs ¶
func (a *RESTService) GetLogs(w http.ResponseWriter, r *http.Request)
func (*RESTService) GetSessions ¶
func (a *RESTService) GetSessions(w http.ResponseWriter, r *http.Request)
func (*RESTService) GetSplash ¶
func (a *RESTService) GetSplash(w http.ResponseWriter, r *http.Request)
func (*RESTService) GetStreams ¶
func (a *RESTService) GetStreams(w http.ResponseWriter, r *http.Request)
func (*RESTService) GetSystemInfo ¶
func (a *RESTService) GetSystemInfo(w http.ResponseWriter, r *http.Request)
func (*RESTService) InstallApp ¶
func (a *RESTService) InstallApp(w http.ResponseWriter, r *http.Request)
InstallApp installs the specified app (asynchronously).
func (*RESTService) ListDetachedShells ¶
func (a *RESTService) ListDetachedShells(w http.ResponseWriter, r *http.Request)
ListDetachedShells returns a JSON list of PTY shell sessions with no attached client.
func (*RESTService) ResizeShell ¶
func (a *RESTService) ResizeShell(w http.ResponseWriter, r *http.Request)
ResizeShell resizes the PTY of a shell session (works whether attached or detached).
func (*RESTService) Serve ¶
func (a *RESTService) Serve(ctx context.Context)
func (*RESTService) Shutdown ¶
func (a *RESTService) Shutdown(w http.ResponseWriter, r *http.Request)
func (*RESTService) StartApp ¶
func (a *RESTService) StartApp(w http.ResponseWriter, r *http.Request)
StartApp starts supervising and running the specified app.
func (*RESTService) StopApp ¶
func (a *RESTService) StopApp(w http.ResponseWriter, r *http.Request)
StopApp stops supervising and (if running) stops the specified app.
func (*RESTService) ValidateK8shelldFile ¶
func (a *RESTService) ValidateK8shelldFile(w http.ResponseWriter, r *http.Request)