Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MergeDialogPayloadQuery ¶
MergeDialogPayloadQuery merges a JSON payload object into the dialog URL query as payload=.
func MergeDialogQueryParams ¶
MergeDialogQueryParams adds apiKey/apiSecret/agentId query parameters.
func RedactDialogDialURL ¶
RedactDialogDialURL redacts sensitive query values for logs.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client streams dialog events to a dialog app and executes commands on a Session.
func NewClient ¶
func NewClient(cfg ClientConfig) (*Client, error)
NewClient validates cfg. The WebSocket is opened by Start.
func (*Client) ForwardTransferRequest ¶
ForwardTransferRequest notifies the dialog app of a transfer request.
type ClientConfig ¶
type ClientConfig struct {
URL string
CallID string
HandshakeHeaders http.Header
DialTimeout time.Duration
OnHangup func(reason string)
OnASRFinal func(text string)
OnTTSStart func(utteranceID, text string)
OnTurn func(dialog.TurnEvent)
ReconnectAttempts int
ReconnectInitialBackoff time.Duration
HoldTextFirst string
HoldTextRetry string
HoldTextGiveUp string
}
ClientConfig configures a per-call dialog WebSocket client.
Click to show internal directories.
Click to hide internal directories.