client

package
v0.0.0-...-a8208a1 Latest Latest
Warning

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

Go to latest
Published: May 8, 2022 License: BSD-3-Clause Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// None ...
	None = &noneVal
	// DefaultSignalingServer ...
	DefaultSignalingServer = "wss://signaling.arsahosting.com/ws"
)

Functions

func UUID

func UUID() (string, error)

UUID generates a random UUID according to RFC 4122

Types

type Client

type Client struct {
	sync.RWMutex
	*rpc.Client
	// contains filtered or unexported fields
}

Client ...

func New

func New(config *Config) (*Client, error)

New ...

func (*Client) Call

func (client *Client) Call(serviceMethod string, args interface{}, reply interface{}) error

Call ...

func (*Client) Close

func (client *Client) Close() error

Close ...

func (*Client) Go

func (client *Client) Go(serviceMethod string, args interface{}, reply interface{}, done chan *rpc.Call) *rpc.Call

Go ...

type Config

type Config struct {
	signaling.Request
	URL    string
	Origin string
}

Config ...

type Dispatcher

type Dispatcher interface {
	Dispatch([]*signaling.Event)
}

Dispatcher ...

type DispatcherFunc

type DispatcherFunc func([]*signaling.Event)

DispatcherFunc ...

func (DispatcherFunc) Dispatch

func (fn DispatcherFunc) Dispatch(events []*signaling.Event)

Dispatch ...

type Node

type Node struct {
	// contains filtered or unexported fields
}

Node ...

func NewNode

func NewNode(config *Config) (*Node, error)

NewNode ...

func (*Node) Room

func (n *Node) Room() string

Room ...

func (*Node) Send

func (n *Node) Send(ev *signaling.Event) error

Send ...

func (*Node) Start

func (n *Node) Start(owner bool, dispatchers ...Dispatcher) error

Start ...

func (*Node) Stop

func (n *Node) Stop() error

Stop ...

func (*Node) User

func (n *Node) User() string

User ...

Jump to

Keyboard shortcuts

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