proxy

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AudioServer

type AudioServer struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

AudioServer is a local proxy object respresenting a remote Audio server. It can be considered an abstraction layer so you don't have to take care of sending and receiving messages to the remote audio server. This proxy implementation is based on the micro.mu microservice framework.

func NewAudioServer

func NewAudioServer(name string, client client.Client, doneCh chan struct{}, opts ...Option) (*AudioServer, error)

NewAudioServer is the constructor for the Audioserver proxy. The communication with the remote audio server is done through a micro client. In case the object disappears the doneCh will be closed.

func (*AudioServer) Close

func (as *AudioServer) Close()

Close shutsdown this object and all associated go routines so that it can be garbage collected.

func (*AudioServer) Index

func (as *AudioServer) Index() int

Index returns the static index of the remote audio server. This is only needed for maintaining a consistent order in a GUI if several audio servers are available

func (*AudioServer) Latency

func (as *AudioServer) Latency() int

Latency returns the ping (2-way) latency to the remote audio server.

func (*AudioServer) Name

func (as *AudioServer) Name() string

Name returns the name of the remote audio server

func (*AudioServer) RxAddress

func (as *AudioServer) RxAddress() string

RxAddress returns the address on which the remote audio server is sending out the audio.

func (*AudioServer) RxOn

func (as *AudioServer) RxOn() bool

RxOn returns a boolean which indicates the the remote audio server is streaming audio.

func (*AudioServer) ServiceName

func (as *AudioServer) ServiceName() string

ServiceName returns the fully qualified service name of the remote audio server

func (*AudioServer) SetNotifyCb

func (as *AudioServer) SetNotifyCb(f func())

SetNotifyCb sets a callback which will be executed whenever the state of the server changes.

func (*AudioServer) StartRxStream

func (as *AudioServer) StartRxStream() error

StartRxStream tells the remote audio server to start streaming audio.

func (*AudioServer) StopRxStream

func (as *AudioServer) StopRxStream() error

StopRxStream tells the remote audio server to stop streaming audio.

func (*AudioServer) TxAddress

func (as *AudioServer) TxAddress() string

TxAddress returns the address on which the remote audio server is listening for incoming audio to be transmitted.

func (*AudioServer) TxUser

func (as *AudioServer) TxUser() string

TxUser returns the current user transmitting through the remote audio server. In case nobody is transmitting, an empty string will be returned.

type Option

type Option func(*Options)

Option is the type for a function option

type Options

type Options struct {
}

Options is the data structure which holds the particular Options values. The values are typically provided as functional options.

Jump to

Keyboard shortcuts

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