Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Inbound ¶
type Inbound struct {
// contains filtered or unexported fields
}
Inbound http(ws) type.
func NewInbound ¶
func NewInbound(internalAddr, externalAddr, certFile, keyFile string, opts ...InboundOpt) (*Inbound, error)
NewInbound creates a new WebSocket inbound transport instance.
type InboundOpt ¶
type InboundOpt func(opts *inboundOpts)
InboundOpt is an inbound ws option.
func WithInboundReadLimit ¶
func WithInboundReadLimit(n int64) InboundOpt
WithInboundReadLimit sets the custom max number of bytes to read for a single message.
type OutboundClient ¶
type OutboundClient struct {
// contains filtered or unexported fields
}
OutboundClient websocket outbound.
func NewOutbound ¶
func NewOutbound(opts ...OutboundClientOpt) *OutboundClient
NewOutbound creates a client for Outbound WS transport.
func (*OutboundClient) Accept ¶
func (cs *OutboundClient) Accept(url string) bool
Accept checks for the url scheme.
func (*OutboundClient) AcceptRecipient ¶
func (cs *OutboundClient) AcceptRecipient(keys []string) bool
AcceptRecipient checks if there is a connection for the list of recipient keys.
func (*OutboundClient) Send ¶
func (cs *OutboundClient) Send(data []byte, destination *service.Destination) (string, error)
Send sends a2a data via WS.
type OutboundClientOpt ¶
type OutboundClientOpt func(c *OutboundClient)
OutboundClientOpt configures outbound client.
func WithOutboundReadLimit ¶
func WithOutboundReadLimit(n int64) OutboundClientOpt
WithOutboundReadLimit sets the custom max number of bytes to read for a single message.
Click to show internal directories.
Click to hide internal directories.