Documentation ¶
Index ¶
Constants ¶
View Source
const ( CMD_StartSession = "StartSession" CMD_ReceiveChunk = "ReceiveChunk" CMD_EndSession = "EndSession" )
Client commands
View Source
const ( CMD_MonitorSession = "MonitorSession" CMD_JoinSession = "JoinSession" // Join to an existing user session )
Admin commands
View Source
const ( SESSION_STARTED = "STARTED" SESSION_INPROGRESS = "INPROGRESS" SESSION_ENDED = "ENDED" )
View Source
const AdminConnType = 1
View Source
const CMD_Auth = "Auth"
View Source
const (
CMD_ReceiveSessionId = "ReceiveSessionId"
)
Server commands
View Source
const CMD_Telemetry = "Telemetry"
Naming convention in the package. When a action is required we prefix it with CMD (Command) When a data or information is passed we prefix variable as MSG(Message) Telemetry command to send some telemetry data
View Source
const UserConnType = 0
Variables ¶
View Source
var AUDIO_PREFIX = "audio-data"
View Source
var BUCKET_NAME string
View Source
var PROFILE = "dev"
View Source
var PROPERTIES *properties.Properties
View Source
var SessionStore = map[string]*Session{}
func init() { redidClient = redis.NewClient(&redis.Options{ Addr: PROPERTIES.MustGet("openavstream.redis.connection"), Password: "", // no password set DB: 0, // use default DB }) }
View Source
var VIDEO_PREFIX = "video-data"
Functions ¶
func GetProperty ¶
func IsSessionExist ¶
Types ¶
type ClientLogData ¶
type ClientLogData struct { }
type ClientMetricsData ¶
type ClientMetricsData struct { }
type Connection ¶
Holds the socket connection and a unique id for it.
type ConnectionGroup ¶
type ConnectionGroup struct { UserConnection Connection AdminConnection []Connection }
Holds a group of connection. Group is defined by one user connection and multiple Admin connection.
type Session ¶
type Session struct { SessionId string AuthToken string ConnGroup ConnectionGroup State string }
Session is started when first user connects to it the server a unique session Id is given to it.
func (*Session) WriteBinary ¶
write the binary data to the socket
type StartConversationData ¶
type TelemetryData ¶
Click to show internal directories.
Click to hide internal directories.