hub

package
v0.0.0-...-9058691 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Mapper     RoomMap
	Broadcast  chan *models.BroadcastMessage
	Disconnect chan *models.DisconnectMessage
)

Functions

This section is empty.

Types

type IHub

type IHub interface {
	CreateStream(ctx context.Context) string

	GetParticipants(ctx context.Context, roomID string) []*models.Participant

	InsertIntoStream(ctx context.Context, roomID string, client *models.Participant)

	DeleteStream(ctx context.Context, roomID string)

	Receiver(ctx context.Context, roomId string, client *models.Participant)

	Broadcaster()
}

func NewStreamHub

func NewStreamHub(streamCfg *parameter.ServerConf) IHub

type RoomMap

type RoomMap struct {
	Map map[string][]*models.Participant
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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