Documentation
¶
Index ¶
- Constants
- func InitLogger(gl *logrus.Logger)
- type Channel
- func (sc *Channel) AddListener(l Listener)
- func (sc *Channel) BroadcastInstance(se *rpc.SystemEvent) (err error)
- func (sc *Channel) HasInstance(name string) (exist bool)
- func (sc *Channel) NotifyInstance(se *rpc.SystemEvent) (err error)
- func (sc *Channel) RegisterInstance(name string) (is *InstanceState, err error)
- type InstanceState
- type Listener
Constants ¶
View Source
const ( KeepAliveDuration = 2 * time.Second KeepAliveTimeout = KeepAliveDuration * 3 )
Variables ¶
This section is empty.
Functions ¶
func InitLogger ¶
Types ¶
type Channel ¶
type Channel struct {
// contains filtered or unexported fields
}
Channel is a bidirectional channel that communicates with each signalling server (by grpc streaming) the goal is to provide mechanism enabling media server to send async event to other servers and route incoming async events to subsystem in media server
func GetSystemChannel ¶
func GetSystemChannel() *Channel
func (*Channel) AddListener ¶
func (*Channel) BroadcastInstance ¶
func (sc *Channel) BroadcastInstance(se *rpc.SystemEvent) (err error)
BroadcastInstance NONBLOCK send event to all instances
func (*Channel) HasInstance ¶
func (*Channel) NotifyInstance ¶
func (sc *Channel) NotifyInstance(se *rpc.SystemEvent) (err error)
NotifyInstance NONBLOCK send event to instance
func (*Channel) RegisterInstance ¶
func (sc *Channel) RegisterInstance(name string) (is *InstanceState, err error)
type InstanceState ¶
type InstanceState struct {
FromInstanceC, ToInstanceC chan *rpc.SystemEvent
// contains filtered or unexported fields
}
type Listener ¶
type Listener interface {
// OnChannelEvent invoked by multiple goroutine concurrently
OnChannelEvent(e *rpc.SystemEvent)
}
Click to show internal directories.
Click to hide internal directories.