Documentation
¶
Index ¶
Constants ¶
View Source
const ( ErrorInvalidParams = 5001000 ErrorInvalidSDP = 5001001 ErrorInvalidCandidate = 5001002 ErrorRoomFull = 5002000 ErrorPeerNotFound = 5002001 ErrorPeerClosed = 5002002 ErrorTrackNotFound = 5002003 ErrorServerNewPeerConnection = 5003000 ErrorServerCreateOffer = 5003001 ErrorServerSetLocalOffer = 5003002 ErrorServerNewTrack = 5003003 ErrorServerAddTransceiver = 5003004 ErrorServerSetRemoteOffer = 5003005 ErrorServerCreateAnswer = 5003006 ErrorServerSetLocalAnswer = 5003007 ErrorServerSetRemoteAnswer = 5003008 ErrorServerTimeout = 5003999 )
Variables ¶
This section is empty.
Functions ¶
func ServeRPC ¶
func ServeRPC(engine *Engine, conf *Configuration) error
Types ¶
type Configuration ¶
type Configuration struct {
Engine struct {
Interface string `toml:"interface"`
Address string `toml:"address"`
LogLevel int `toml:"log-level"`
PortMin uint16 `toml:"port-min"`
PortMax uint16 `toml:"port-max"`
} `toml:"engine"`
Turn struct {
Host string `toml:"host"`
Secret string `toml:"secret"`
} `toml:"turn"`
RPC struct {
Port int `toml:"port"`
} `toml:"rpc"`
}
func Setup ¶
func Setup(path string) (*Configuration, error)
type Engine ¶
type Engine struct {
IP string
Interface string
PortMin uint16
PortMax uint16
// contains filtered or unexported fields
}
func BuildEngine ¶
func BuildEngine(conf *Configuration) (*Engine, error)
type Error ¶
type Render ¶
type Render struct {
// contains filtered or unexported fields
}
func (*Render) RenderData ¶
func (*Render) RenderError ¶
type State ¶
type State struct {
Version string `json:"version"`
BootedAt time.Time `json:"booted_at"`
UpdatedAt time.Time `json:"updated_at"`
ActivePeers int `json:"active_peers"`
ClosedPeers int `json:"closed_peers"`
PeakPeers int `json:"peak_peers"`
ActiveRooms int `json:"active_rooms"`
ClosedRooms int `json:"closed_rooms"`
PeakRooms int `json:"peak_rooms"`
}
Click to show internal directories.
Click to hide internal directories.