Documentation
¶
Index ¶
- type AmiAdvMockAction
- type AmiConn
- type AmiMockAction
- type AmiMocker
- type AmiServer
- func (c *AmiServer) AdvMock(action string, cb AmiAdvMockAction)
- func (c *AmiServer) Clear()
- func (c *AmiServer) Close()
- func (c *AmiServer) CloseCons()
- func (c *AmiServer) Emit(packet textproto.MIMEHeader)
- func (c *AmiServer) Mock(action string, cb AmiMockAction)
- func (c *AmiServer) Unmock(action string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AmiAdvMockAction ¶
type AmiAdvMockAction func(conn *AmiConn, params textproto.MIMEHeader, super *AmiMocker) textproto.MIMEHeader
type AmiConn ¶
AmiConn for mocking Asterisk AMI
func NewAmiConn ¶
func (*AmiConn) Emit ¶
func (conn *AmiConn) Emit(packet textproto.MIMEHeader)
Emit: emits packet to connection
type AmiMockAction ¶
type AmiMockAction func(conn *AmiConn, params textproto.MIMEHeader) textproto.MIMEHeader
type AmiMocker ¶
type AmiMocker struct {
// contains filtered or unexported fields
}
func (*AmiMocker) Call ¶
func (mocker *AmiMocker) Call(conn *AmiConn, params textproto.MIMEHeader) textproto.MIMEHeader
type AmiServer ¶
type AmiServer struct { sync.RWMutex context.Context Addr string // contains filtered or unexported fields }
AmiServer for mocking Asterisk AMI
func NewAmiServer ¶
NewAmiServer: Creats an ami mock server
func (*AmiServer) AdvMock ¶
func (c *AmiServer) AdvMock(action string, cb AmiAdvMockAction)
AdvMock: adds an action to mock with super support
func (*AmiServer) Emit ¶
func (c *AmiServer) Emit(packet textproto.MIMEHeader)
Emit: emits packet to all connections
func (*AmiServer) Mock ¶
func (c *AmiServer) Mock(action string, cb AmiMockAction)
Mock: adds an action to mock
Click to show internal directories.
Click to hide internal directories.