cloudapp

package
v0.0.0-...-9402fd8 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package cloudapp is an individual cloud application

Widget server to serve a standalone cloudmorph instance

Index

Constants

View Source
const (
	Linux osTypeEnum = iota
	Mac
	Windows
)
View Source
const (
	// CollaborativeMode Multiple users share the same app session
	CollaborativeMode = "collaborative"
	// OnDemandMode Multiple users runs on a new available machine
	OnDemandMode = "ondemand"
)

Variables

This section is empty.

Functions

func NewAppMode

func NewAppMode(appMode string) *appModeHandler

func NewCloudAppClient

func NewCloudAppClient(cfg config.Config, appEvents chan Packet) *ccImpl

NewCloudAppClient returns new cloudapp client

Types

type AppHost

type AppHost struct {
	// Host string `json:"host"`
	Addr    string `json:"addr"`
	AppName string `json:"app_name"`
}

type Client

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

func NewServiceClient

func NewServiceClient(clientID string, ws *cws.Client, appEvents chan Packet, conf *webrtc.Config) *Client

func (*Client) Handle

func (c *Client) Handle()

func (*Client) Heartbeat

func (c *Client) Heartbeat()

Heartbeat maintains connection to server

func (*Client) Route

func (c *Client) Route()

type CloudAppClient

type CloudAppClient interface {
	VideoStream() chan *rtp.Packet
	AudioStream() chan *rtp.Packet
	SendInput(Packet)
	Handle()
}

type Packet

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

Packet represents a packet in cloudapp

type Server

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

func NewServer

func NewServer(cfg config.Config) *Server

func NewServerWithHTTPServerMux

func NewServerWithHTTPServerMux(cfg config.Config, r *mux.Router, svmux *http.ServeMux) *Server

func (*Server) Handle

func (o *Server) Handle()

func (*Server) ListenAndServe

func (o *Server) ListenAndServe() error

func (*Server) Shutdown

func (o *Server) Shutdown()

func (*Server) WS

func (s *Server) WS(w http.ResponseWriter, r *http.Request)

type Service

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

func NewCloudService

func NewCloudService(conf config.Config) *Service

NewCloudService returns a Cloud Service

func (*Service) AddClient

func (s *Service) AddClient(clientID string, ws *cws.Client) *Client

func (*Service) Handle

func (s *Service) Handle()

func (*Service) RemoveClient

func (s *Service) RemoveClient(clientID string)

func (*Service) SendInput

func (s *Service) SendInput(packet Packet)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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