room

package
v0.0.0-...-a535717 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: ISC Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Room

type Room interface {
	Run(context.Context)
}

type RoomMan

type RoomMan struct {
	NatsURL string
	// contains filtered or unexported fields
}

func (*RoomMan) NewRoom

func (m *RoomMan) NewRoom(name, owner string, playlist []string) (Room, chan bool)

type RoomManager

type RoomManager interface {
	NewRoom(string, string, []string) (Room, chan bool)
}

func NewManager

func NewManager(natsURL string) RoomManager

type RoomStruct

type RoomStruct struct {
	Mutex    sync.Mutex
	RoomName string
	Playlist []string
	Owner    string
	Users    []string
	NatsURL  string
	Index    int
	Subject  string
	Comm     chan bool
}

func (*RoomStruct) Run

func (r *RoomStruct) Run(ctx context.Context)

Opens the NATS 'topic' and handle the flow of event

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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