obsbrowser

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Browser

type Browser struct {
	Chan         chan string
	Receivers    map[uuid.UUID]*SendObject
	LastAccessed map[uuid.UUID]time.Time
	Mu           sync.Mutex
}

func New

func New(ctx context.Context) *Browser

func (*Browser) CloseObject

func (o *Browser) CloseObject(ctx context.Context, u uuid.UUID)

func (*Browser) Dispatch

func (o *Browser) Dispatch(ctx context.Context, b string) error

func (*Browser) Send

func (o *Browser) Send(ctx context.Context, msg string) types.ObsSendObject

TODO optimize cleaner with priority queue

func (*Browser) SendChan

func (o *Browser) SendChan() chan string

type SendObject

type SendObject struct {
	DoneChan    chan struct{}
	ReceiveChan chan string
}

func (*SendObject) Done

func (s *SendObject) Done() chan struct{}

func (*SendObject) Receive

func (s *SendObject) Receive() chan string

Jump to

Keyboard shortcuts

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