Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewInboundHandler ¶
NewInboundHandler will create a new handler to enforce Did-Comm HTTP transport specs then routes processing to the mandatory 'msgHandler' argument.
Arguments:
- 'msgHandler' is the handler function that will be executed with the inbound request payload. Users of this library must manage the handling of all inbound payloads in this function.
Types ¶
type Inbound ¶
type Inbound struct {
// contains filtered or unexported fields
}
Inbound http type.
func NewInbound ¶
NewInbound creates a new HTTP inbound transport instance.
type OutboundHTTPClient ¶
type OutboundHTTPClient struct {
// contains filtered or unexported fields
}
OutboundHTTPClient represents the Outbound HTTP transport instance.
func NewOutbound ¶
func NewOutbound(opts ...OutboundHTTPOpt) (*OutboundHTTPClient, error)
NewOutbound creates a new instance of Outbound HTTP transport to Post requests to other Agents. An http.Client or tls.Config options is mandatory to create a transport instance.
func (*OutboundHTTPClient) Accept ¶
func (cs *OutboundHTTPClient) Accept(url string) bool
Accept url.
func (*OutboundHTTPClient) AcceptRecipient ¶
func (cs *OutboundHTTPClient) AcceptRecipient([]string) bool
AcceptRecipient checks if there is a connection for the list of recipient keys.
func (*OutboundHTTPClient) Send ¶
func (cs *OutboundHTTPClient) Send(data []byte, destination *service.Destination) (string, error)
Send sends a2a exchange data via HTTP (client side).
type OutboundHTTPOpt ¶
type OutboundHTTPOpt func(opts *outboundCommHTTPOpts)
OutboundHTTPOpt is an outbound HTTP transport option.
func WithOutboundHTTPClient ¶
func WithOutboundHTTPClient(client *http.Client) OutboundHTTPOpt
WithOutboundHTTPClient option is for creating an Outbound HTTP transport using an http.Client instance.
func WithOutboundTLSConfig ¶
func WithOutboundTLSConfig(tlsConfig *tls.Config) OutboundHTTPOpt
WithOutboundTLSConfig option is for creating an Outbound HTTP transport using a tls.Config instance.
func WithOutboundTimeout ¶
func WithOutboundTimeout(timeout time.Duration) OutboundHTTPOpt
WithOutboundTimeout option is for creating an Outbound HTTP transport using a client timeout value.