overlord

package
v0.0.0-...-104a804 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2024 License: BSD-3-Clause Imports: 36 Imported by: 0

README

Overlord Deployment Guide

Objective

The goal of this document is to provide deployment guidance to the Overlord factory monitor system.

Basic Deployment

Get the source

The Overlord source code resides in the chromiumos factory repository. You can clone the factory git repo without the entire chromiumos source tree:

$ git clone https://chromium.googlesource.com/chromiumos/platform/factory

Build

Make sure you have the Go lang toolchain installed (apt-get install google-golang). Building Overlord is as easy as typing make under the go/src/overlord

$ cd factory/go/src/overlord

$ make

Deploy

Assuming your server is located at SHOPFLOOR_IP, just scp the go/bin dir onto the server

$ scp -r factory/go/bin SHOPFLOOR_IP:~/overlord

In this particular case, we copy the bin folder onto the HOME/overlord on the shopfloor server.

Start the Server

To start the server, simply run the overlordd binary

shopfloor:~ $ cd overlord

shopfloor:~/overlord $ nohup ./overlordd &

One the server started, browse http://SHOPFLOOR_IP:9000 to access the overlord web frontend.

There are some options available for the overlordd command, use overlord -help to see them.

By default, overlordd is started with HTTP basic auth enabled. The default account / password is overlord/cros, please follow the later section in this document to change the password for production environment. To disable HTTP basic auth, simply add the -noauth option when launching overlordd. This is strongly discouraged in production environment, as it expose your server for anyone to access it.

Ghost Clients

The clients are called ghost in the Overlord framework. There are currently two implementations, one implemented in python and the other implemented in go. The python version can be found under the factory source repository: py/tools/ghost.py; while the go version is under go/src/overlord/ghost.go which is built along side with the overlordd binary under go/bin.

Server Configuration

Changing LAN Discovery Broadcast Interface

Overlord server broadcasts LAN discovery messages into the subnet so clients can identify the server IP. In a typical factory network, a server might have at least two interface, one for LAN and another for external network. By default, overlord broadcast the LAN discovery message to the default gateway's subnet. To specify a different one, use the -lan-disc-iface option:

shopfloor:~/overlord $ nohup ./overlordd -lan-disc-iface=eth1 &

Changing Default Password

The password to the Overlord server is stored in a apache style htpasswd file. This means it supports multiple login credentials. To change it, first remove the default password:

shopfloor:~/overlord $ rm app/overlord.htpasswd

The use the htpasswd utility to create a new htpasswd file. The htpasswd utility can be installed by apt-get install apache2-utils:

shopfloor:~/overlord $ htpasswd -B -c app/overlord.htpasswd username11

New password:
Re-type new password:
Updating password for user username1

The -c option create the new file. To add more credentials to the file simply remove the -c option:

shopfloor:~/overlord $ htpasswd -B app/overlord.htpasswd username2

Enable SSL Support

To ensure the privacy of the communication with the overlord server via the web frontend. It`s encouraged to enable SSL on a production environment.

You can either use a CA-signed SSL certificate or a self-signed SSL certificate. We usually use a self-signed certificate in the factory since we can`t be 100% sure we are the only one that have access to the server. If the partner have access to the server, they can steal your SSL certificate file!

To generate a self-signed SSL certificate, you need the openssl software suite from you distribution:

shopfloor:~/overlord $ openssl req -x509 -nodes -newkey rsa:2048 -keyout
key.pem -out cert.pem -days 365

Note that you need to input the correct common name when generating the certificate, common name is typically the FQDN or IP of the server.

This will generate two files: cert.pem and key.pem. Assign it to the -tls option when starting overlordd, and you are all set.

shopfloor:~/overlord $ nohup ./overlordd -tls=cert.pem,key.pem &

Now you can browse https://shopfloor_ip:9000 to access the web frontend. Note that you need to use https instead of http.

Connecting to a TLS enabled Server

ghost automatically detects if Overlord server has TLS enabled and verify it using system installed ca-certificates bundle.

To connect to a TLS enabled Overlord server, a ghost client must specify the TLS certificate to be used for verification:

$ ghost --tls-cert-file cert.pem SERVER_IP

Optionally, one could enable TLS but skip certificate verification:

$ ghost --tls-no-verify SERVER_IP

Caveats

The SSL certification generated above is a self-signed SSL certificate. The first time you visit the web frontend, you will see a warning.

This is the result of self-signed SSL certificate, no need to panic. Click on the left top corner of the browser to see the certificate information.

Make sure the fingerprint is correct then hit the Advanced button then Proceed.

Auto Upgrade Setup

Overlord supports an AU(Auto Upgrade) protocol for updating ghost clients. Ghost clients automatically check for update on registration. Admins can also force an upgrade if there are updates available.

Prepare Upgrade Files

Fetch the latest ghost.py or ghost binary from factory repo. For the ghost binary, rename it into ghost.ARCH, where ARCH is go runtime.GOARCH variable on that platform. For a x86_64 platform, the runtime.GOARCH equals amd64. In such case, rename the binary to ghost.amd64.

Copy the Upgrade File Onto the Server

Create the required directory structure

On the Shopfloor server:

shopfloor:~/overlord $ mkdir app/upgrade
Copy the Upgrade file
$ scp ghost.py SHOPFLOOR_IP:~/overlord/app/upgrade

$ scp ghost.amd64 SHOPFLOOR_IP:~/overlord/app/upgrade
Generate Checksum
shopfloor:~/overlord $ cd app/upgrade

shopfloor:~/overlord/app/upgrade $ for i in `ls ghost.* | grep -v sha1`; do \
        sha1sum $i | awk '{ print $1 }' > $i.sha1 done
Force Upgrade

After the above step, the upgrade files are ready. Now if a new client connects or client reconnects to the overlord server, it automatically checks for upgrade and apply it. To force an upgrade for already connected clients, simply send a GET request to the server:

$ curl -k -u username1:password1 'https://127.0.0.1:9000/api/agents/upgrade'

(Note: use http if you don't have SSL enabled)

Documentation

Index

Constants

View Source
const (
	ModeNone = iota
	ModeControl
	ModeTerminal
	ModeShell
	ModeLogcat
	ModeFile
	ModeForward
)

ConnServer Client mode

View Source
const (
	Success = "success"
	Failed  = "failed"
)

RPC states

View Source
const (
	TLSDetect = iota
	TLSForceDisable
	TLSForceEnable
)

TLS modes

View Source
const (
	RandomMID = "##random_mid##" // Random Machine ID identifier
)

Exported

View Source
const (
	StdinClosed = "##STDIN_CLOSED##"
)

Stream control

Variables

View Source
var (
	OverlordLDPort   = GetenvInt("OVERLORD_LD_PORT", 4456) // LAN discovery port
	DefaultHTTPPort  = 80
	DefaultHTTPSPort = 443
)

Overlord server ports.

Functions

func DownloadFile

func DownloadFile(filename string)

DownloadFile adds a file to the download queue, which would be pickup by the ghost control channel instance and perform download.

func GetFileSha1

func GetFileSha1(filename string) (string, error)

GetFileSha1 return the sha1sum of a file.

func GetGateWayIP

func GetGateWayIP() ([]string, error)

GetGateWayIP return the IPs of the gateways.

func GetMachineID

func GetMachineID() (string, error)

GetMachineID generates machine-dependent ID string for a machine. There are many ways to generate a machine ID: 1. /sys/class/dmi/id/product_uuid (only available on intel machines) 2. MAC address We follow the listed order to generate machine ID, and fallback to the next alternative if the previous doesn't work.

func GetPlatformString

func GetPlatformString() string

GetPlatformString returns machine platform string. Platform stream has the format of GOOS.GOARCH

func GetProcessWorkingDirectory

func GetProcessWorkingDirectory(pid int) (string, error)

GetProcessWorkingDirectory returns the current working directory of a process.

func GetenvInt

func GetenvInt(key string, defaultValue int) int

GetenvInt parse an integer from environment variable, and return default value when error.

func ModeStr

func ModeStr(mode int) string

ModeStr translate client mode to string.

func StartGhost

func StartGhost(args []string, mid string, noLanDisc bool, noRPCServer bool,
	tlsCertFile string, verify bool, propFile string, download string,
	reset bool, status bool, tlsMode int)

StartGhost starts the Ghost client.

func StartOverlord

func StartOverlord(bindAddr string, port int, lanDiscInterface string, lanDisc bool, auth bool,
	certsString string, linkTLS bool, htpasswdPath string)

StartOverlord starts the overlord server.

func ToVTNewLine

func ToVTNewLine(text string) string

ToVTNewLine replace the newline character to VT100 newline control.

func Ttyname

func Ttyname(fd uintptr) (string, error)

Ttyname returns the TTY name of a given file descriptor.

Types

type BasicAuth

type BasicAuth struct {
	Realm string

	Disable bool // Disable basic auth function, pass through
	// contains filtered or unexported fields
}

BasicAuth is a class that provide WrapHandler and WrapHandlerFunc, which turns a http.Handler to a HTTP basic-auth enabled http handler.

func NewBasicAuth

func NewBasicAuth(realm, htpasswd string, disable bool) *BasicAuth

NewBasicAuth creates a BasicAuth object

func (*BasicAuth) Authenticate

func (auth *BasicAuth) Authenticate(user, passwd string) (bool, error)

Authenticate authenticate an user with the provided user and passwd.

func (*BasicAuth) IsBlocked

func (auth *BasicAuth) IsBlocked(r *http.Request) bool

IsBlocked returns true if the given IP is blocked.

func (*BasicAuth) ResetFailCount

func (auth *BasicAuth) ResetFailCount(r *http.Request)

ResetFailCount resets the fail count for the given IP.

func (*BasicAuth) Unauthorized

func (auth *BasicAuth) Unauthorized(w http.ResponseWriter, r *http.Request,
	msg string, record bool)

Unauthorized returns a 401 Unauthorized response.

func (*BasicAuth) WrapHandler

func (auth *BasicAuth) WrapHandler(h http.Handler) http.Handler

WrapHandler wraps an http.Hanlder and provide HTTP basic-auth.

func (*BasicAuth) WrapHandlerFunc

func (auth *BasicAuth) WrapHandlerFunc(h http.HandlerFunc) http.Handler

WrapHandlerFunc wraps an http.HanlderFunc and provide HTTP basic-auth.

type ConnServer

type ConnServer struct {
	*RPCCore
	Mode        int                    // Client mode, see constants.go
	Command     chan interface{}       // Channel for overlord command
	Response    chan string            // Channel for reponsing overlord command
	Sid         string                 // Session ID
	Mid         string                 // Machine ID
	TerminalSid string                 // Associated terminal session ID
	Properties  map[string]interface{} // Client properties

	Download fileDownloadContext // File download context
	// contains filtered or unexported fields
}

ConnServer is the main struct for storing connection context between Overlord and Ghost.

func NewConnServer

func NewConnServer(ovl *Overlord, conn net.Conn) *ConnServer

NewConnServer create a ConnServer object.

func (*ConnServer) Listen

func (c *ConnServer) Listen()

Listen is the main routine for listen to socket messages.

func (*ConnServer) SendClearToDownload

func (c *ConnServer) SendClearToDownload()

SendClearToDownload sends "clear_to_download" request to client to start downloading.

func (*ConnServer) SendUpgradeRequest

func (c *ConnServer) SendUpgradeRequest() error

SendUpgradeRequest sends upgrade request to clients to trigger an upgrade.

func (*ConnServer) SpawnFileServer

func (c *ConnServer) SpawnFileServer(sid, terminalSid, action, filename,
	dest string, perm int, checkOnly bool)

SpawnFileServer Spawn a remote file connection (a ghost with mode ModeFile). action is either 'download' or 'upload'. sid is used for uploading file, indicatiting which client's working directory to upload to.

func (*ConnServer) SpawnModeForwarder

func (c *ConnServer) SpawnModeForwarder(sid string, port int)

SpawnModeForwarder spawns a forwarder connection (a ghost with mode ModeForward). sid is the session ID, which will be used as the session ID of the new ghost.

func (*ConnServer) SpawnShell

func (c *ConnServer) SpawnShell(sid string, command string)

SpawnShell spawns a shell command connection (a ghost with mode ModeShell). sid is the session ID, which will be used as the session ID of the new ghost. command is the command to execute.

func (*ConnServer) SpawnTerminal

func (c *ConnServer) SpawnTerminal(sid, ttyDevice string)

SpawnTerminal spawns a terminal connection (a ghost with mode ModeTerminal). sid is the session ID, which will be used as the session ID of the new ghost. ttyDevice is the target terminal device to open. If it's an empty string, a pseudo terminal will be open instead.

func (*ConnServer) StopListen

func (c *ConnServer) StopListen()

StopListen stops ConnServer's Listen loop.

func (*ConnServer) Terminate

func (c *ConnServer) Terminate()

Terminate terminats the connection and perform cleanup.

type ConnectLogcatCmd

type ConnectLogcatCmd struct {
	Conn *websocket.Conn
}

ConnectLogcatCmd is an overlord intend to connect to a logcat session.

type EmptyArgs

type EmptyArgs struct {
}

EmptyArgs for RPC.

type EmptyReply

type EmptyReply struct {
}

EmptyReply for RPC.

type Ghost

type Ghost struct {
	*RPCCore

	RegisterStatus string // Register status from server response
	// contains filtered or unexported fields
}

Ghost type is the main context for storing the ghost state.

func NewGhost

func NewGhost(addrs []string, tls *tlsSettings, mode int, mid string) *Ghost

NewGhost creates a Ghost object.

func (*Ghost) AddToDownloadQueue

func (ghost *Ghost) AddToDownloadQueue(ttyName, filename string)

AddToDownloadQueue adds a downloadInfo to the download queue

func (*Ghost) InitiateDownload

func (ghost *Ghost) InitiateDownload(info downloadInfo)

InitiateDownload initiates a client-initiated download request.

func (*Ghost) InitiatefileOperation

func (ghost *Ghost) InitiatefileOperation(res *Response) error

InitiatefileOperation initiates a file operation. The operation could either be 'download' or 'upload' This function starts handshake with overlord then execute download sequence.

func (*Ghost) Listen

func (ghost *Ghost) Listen() error

Listen is the main routine for listen to socket messages.

func (*Ghost) Ping

func (ghost *Ghost) Ping() error

Ping sends a ping message to the overlord server.

func (*Ghost) Register

func (ghost *Ghost) Register() error

Register existent to Overlord.

func (*Ghost) RegisterSession

func (ghost *Ghost) RegisterSession(sesssionID, pidStr string)

RegisterSession register the PID to a session.

func (*Ghost) RegisterTTY

func (ghost *Ghost) RegisterTTY(sesssionID, ttyName string)

RegisterTTY register the TTY to a session.

func (*Ghost) Reset

func (ghost *Ghost) Reset()

Reset all states for a new connection.

func (*Ghost) ScanGateway

func (ghost *Ghost) ScanGateway()

ScanGateway scans current network gateway and add it into addrs if not already exist.

func (*Ghost) ServeHTTP

func (ghost *Ghost) ServeHTTP(w http.ResponseWriter, req *http.Request)

ServeHTTP method for serving JSON-RPC over HTTP.

func (*Ghost) SetFileOp

func (ghost *Ghost) SetFileOp(operation, filename string, perm int) *Ghost

SetFileOp sets the file operation to perform.

func (*Ghost) SetModeForwardPort

func (ghost *Ghost) SetModeForwardPort(port int) *Ghost

SetModeForwardPort sets the port to forward.

func (*Ghost) SetPropFile

func (ghost *Ghost) SetPropFile(propFile string) *Ghost

SetPropFile sets the property file filename.

func (*Ghost) SetShellCommand

func (ghost *Ghost) SetShellCommand(command string) *Ghost

SetShellCommand sets the shell comamnd to execute.

func (*Ghost) SetSid

func (ghost *Ghost) SetSid(sid string) *Ghost

SetSid sets the Session ID for the Ghost instance.

func (*Ghost) SetTLSMode

func (ghost *Ghost) SetTLSMode(mode int) *Ghost

SetTLSMode sets the mode of tls detection.

func (*Ghost) SetTerminalSid

func (ghost *Ghost) SetTerminalSid(sid string) *Ghost

SetTerminalSid sets the terminal session ID for the Ghost instance.

func (*Ghost) SetTtyDevice

func (ghost *Ghost) SetTtyDevice(ttyDevice string) *Ghost

SetTtyDevice sets the TTY device name to open.

func (*Ghost) SpawnPortModeForwardServer

func (ghost *Ghost) SpawnPortModeForwardServer(res *Response) error

SpawnPortModeForwardServer spawns a port forwarding server and forward I/O to the TCP socket.

func (*Ghost) SpawnShellServer

func (ghost *Ghost) SpawnShellServer(res *Response) error

SpawnShellServer spawns a Shell server and forward input/output from/to the TCP socket.

func (*Ghost) SpawnTTYServer

func (ghost *Ghost) SpawnTTYServer(res *Response) error

SpawnTTYServer Spawns a TTY server and forward I/O to the TCP socket.

func (*Ghost) Start

func (ghost *Ghost) Start(lanDisc bool, RPCServer bool)

Start bootstraps and start the client.

func (*Ghost) StartDownloadServer

func (ghost *Ghost) StartDownloadServer() error

StartDownloadServer starts the download server.

func (*Ghost) StartLanDiscovery

func (ghost *Ghost) StartLanDiscovery()

StartLanDiscovery starts listening to LAN discovery message.

func (*Ghost) StartRPCServer

func (ghost *Ghost) StartRPCServer()

StartRPCServer starts a local RPC server used for communication between ghost instances.

func (*Ghost) StartUploadServer

func (ghost *Ghost) StartUploadServer() error

StartUploadServer starts the upload server.

func (*Ghost) Upgrade

func (ghost *Ghost) Upgrade() error

Upgrade starts the upgrade sequence of the ghost instance.

type Message

type Message interface {
	Marshal() ([]byte, error)
}

Message is the interface which defines a sendable message.

type Overlord

type Overlord struct {
	// contains filtered or unexported fields
}

Overlord type is the main context for storing the overlord server state.

func NewOverlord

func NewOverlord(
	bindAddr string, port int,
	lanDiscInterface string,
	lanDisc bool, auth bool,
	certsString string, linkTLS bool, htpasswdPath string) *Overlord

NewOverlord creates an Overlord object.

func (*Overlord) AddWebsocketContext

func (ovl *Overlord) AddWebsocketContext(wc *webSocketContext)

AddWebsocketContext adds an websocket context to the overlord state.

func (*Overlord) GetAppDir

func (ovl *Overlord) GetAppDir() string

GetAppDir returns the overlord application directory.

func (*Overlord) GetAppNames

func (ovl *Overlord) GetAppNames(ignoreSpecial bool) ([]string, error)

GetAppNames return the name of overlord apps.

func (*Overlord) InitSocketIOServer

func (ovl *Overlord) InitSocketIOServer()

InitSocketIOServer initializes the Socket.io server.

func (*Overlord) Register

func (ovl *Overlord) Register(conn *ConnServer) (*websocket.Conn, error)

Register a client.

func (*Overlord) RegisterDownloadRequest

func (ovl *Overlord) RegisterDownloadRequest(conn *ConnServer)

RegisterDownloadRequest registers a file download request.

func (*Overlord) RegisterHTTPHandlers

func (ovl *Overlord) RegisterHTTPHandlers()

RegisterHTTPHandlers register handlers for http routes.

func (*Overlord) RegisterUploadRequest

func (ovl *Overlord) RegisterUploadRequest(conn *ConnServer)

RegisterUploadRequest registers a file upload request.

func (*Overlord) Serv

func (ovl *Overlord) Serv()

Serv is the main routine for starting all the overlord sub-server.

func (*Overlord) ServHTTP

func (ovl *Overlord) ServHTTP()

ServHTTP is the Web server main routine.

func (*Overlord) StartUDPBroadcast

func (ovl *Overlord) StartUDPBroadcast(port int)

StartUDPBroadcast is the main routine for broadcasting LAN discovery message.

func (*Overlord) Unregister

func (ovl *Overlord) Unregister(conn *ConnServer)

Unregister a client.

type PollableProcess

type PollableProcess os.Process

PollableProcess is a os.Process which supports the polling for it's status.

func (*PollableProcess) Poll

func (p *PollableProcess) Poll() (uint32, error)

Poll polls the process for it's execution status.

type RPCCore

type RPCCore struct {
	Conn       net.Conn // handle to the TCP connection
	ReadBuffer string   // internal read buffer
	// contains filtered or unexported fields
}

RPCCore is the core implementation of the TCP-based 2-way RPC protocol.

func NewRPCCore

func NewRPCCore(conn net.Conn) *RPCCore

NewRPCCore creates the RPCCore object.

func (*RPCCore) ClearRequests

func (rpc *RPCCore) ClearRequests()

ClearRequests clear all the requests.

func (*RPCCore) ParseMessage

func (rpc *RPCCore) ParseMessage(msgJSON string) (Message, error)

ParseMessage parses a single JSON string into a Message object.

func (*RPCCore) ParseRequests

func (rpc *RPCCore) ParseRequests(buffer string, single bool) []*Request

ParseRequests parses a buffer from SpawnReaderRoutine into Request objects. The response message is automatically handled by the RPCCore itrpc by invoking the corresponding response handler.

func (*RPCCore) ScanForTimeoutRequests

func (rpc *RPCCore) ScanForTimeoutRequests() error

ScanForTimeoutRequests scans for timeout requests.

func (*RPCCore) SendMessage

func (rpc *RPCCore) SendMessage(msg Message) error

SendMessage sends a message.

func (*RPCCore) SendRequest

func (rpc *RPCCore) SendRequest(req *Request, handler ResponseHandler) error

SendRequest sends a Request.

func (*RPCCore) SendResponse

func (rpc *RPCCore) SendResponse(res *Response) error

SendResponse sends a Response.

func (*RPCCore) SpawnReaderRoutine

func (rpc *RPCCore) SpawnReaderRoutine() (chan []byte, chan error)

SpawnReaderRoutine spawnes a goroutine that actively read from the socket. This function returns two channels. The first one is the channel that send the content from the socket, and the second channel send an error object if there is one.

func (*RPCCore) StopConn

func (rpc *RPCCore) StopConn()

StopConn stops the connection and terminates the reader goroutine.

type RegistrationFailedError

type RegistrationFailedError error

RegistrationFailedError indicates an registration fail error.

type Request

type Request struct {
	Rid     string          `json:"rid"`
	Timeout int64           `json:"timeout"`
	Name    string          `json:"name"`
	Params  json.RawMessage `json:"params"`
}

Request Object. Implements the Message interface. If Timeout < 0, then the response can be omitted.

func NewRequest

func NewRequest(name string, params map[string]interface{}) *Request

NewRequest creats a new Request object. name is the name of the request. params is map between string and any other JSON-serializable data structure.

func (*Request) Marshal

func (r *Request) Marshal() ([]byte, error)

Marshal mashels the Request.

func (*Request) SetTimeout

func (r *Request) SetTimeout(timeout int64)

SetTimeout sets the timeout of request. The default timeout is is defined in requestTimeoutSeconds.

type Responder

type Responder struct {
	RequestTime int64           // Time of request
	Timeout     int64           // Timeout in seconds
	Handler     ResponseHandler // The corresponding request handler
}

Responder is The structure that stores the response handler information.

type Response

type Response struct {
	Rid      string          `json:"rid"`
	Response string          `json:"response"`
	Params   json.RawMessage `json:"params"`
}

Response Object. Implements the Message interface.

func NewResponse

func NewResponse(rid, response string, params map[string]interface{}) *Response

NewResponse creates a new Response object. rid is the request ID of the request this response is intended for. response is the response status text. params is map between string and any other JSON-serializable data structure.

func (*Response) Marshal

func (r *Response) Marshal() ([]byte, error)

Marshal marshals the Response.

type ResponseHandler

type ResponseHandler func(res *Response) error

ResponseHandler is the function type of the response handler. if res is nil, means that the response timeout.

type SpawnFileCmd

type SpawnFileCmd struct {
	Sid         string // Session ID
	TerminalSid string // Target terminal's session ID
	Action      string // Action, download or upload
	Filename    string // File to perform action on
	Dest        string // Destination, use for upload
	Perm        int    // File permissions to set
	CheckOnly   bool   // Check permission only (writable?)
}

SpawnFileCmd is an overlord intend to perform file transfer.

type SpawnModeForwarderCmd

type SpawnModeForwarderCmd struct {
	Sid  string // Session ID
	Port int    // Port to forward
}

SpawnModeForwarderCmd is an overlord intend to perform port forwarding.

type SpawnShellCmd

type SpawnShellCmd struct {
	Sid     string // Session ID
	Command string // Command to execute
}

SpawnShellCmd is an overlord intend to launch a shell command.

type SpawnTerminalCmd

type SpawnTerminalCmd struct {
	Sid       string // Session ID
	TtyDevice string // Termainl device to open
}

SpawnTerminalCmd is an overlord intend to launch a terminal.

type TLSCerts

type TLSCerts struct {
	Cert string // cert.pem filename
	Key  string // key.pem filename
}

TLSCerts stores the TLS certificate filenames.

type TerminalControl

type TerminalControl struct {
	Type string `json:"type"`
	Data string `json:"data"`
}

TerminalControl is a JSON struct for storing terminal control messages.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL