Documentation ¶
Index ¶
- Variables
- func CheckDialbackOffered(offered *bool) xmpp.StreamFeature
- func CheckSASLOffered(offered *bool, mechanisms *[]string) xmpp.StreamFeature
- func NewTLSConfig(cfg *pconfig.TLSConfig, domain string) (*tls.Config, error)
- func ProbeC2S(ctx context.Context, module, target string, config config.Module, _ Clients, ...) bool
- func ProbeIBR(ctx context.Context, module, target string, config config.Module, _ Clients, ...) bool
- func ProbePing(ctx context.Context, module, target string, cfg config.Module, clients Clients, ...) bool
- func ProbeS2S(ctx context.Context, module, target string, config config.Module, _ Clients, ...) bool
- func Register(prefix string, server string, account *jid.JID, password *string) xmpp.StreamFeature
- func ValidateSASLMechanisms(mechanisms []string, forbidden []string, required []string) bool
- type AccountInfo
- type Client
- type ClientConfig
- type ClientFactory
- type Clients
- type ProbeFn
- type RegisterQuery
- type StartTLSCapture
- type StartTLSConfigurableDialer
- type StreamInfo
- type XMPPDialer
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrClientClosed = errors.New("The client is already closed")
View Source
var (
ErrNoTLS = errors.New("TLS not negotiated")
)
View Source
var ErrNotThisNetwork = errors.New("address family disabled by config and configured address family not offered")
Functions ¶
func CheckDialbackOffered ¶
func CheckDialbackOffered(offered *bool) xmpp.StreamFeature
func CheckSASLOffered ¶
func CheckSASLOffered(offered *bool, mechanisms *[]string) xmpp.StreamFeature
func NewTLSConfig ¶ added in v0.6.0
Types ¶
type Client ¶ added in v0.6.0
type Client struct { Config *ClientConfig HealthCheckTimeout time.Duration // contains filtered or unexported fields }
func NewClient ¶ added in v0.6.0
func NewClient(Config *ClientConfig) *Client
func (*Client) AcquireSession ¶ added in v0.6.0
Return the current session or establish a new session if there is no current session.
If session establishment fails, it is not retried, but an error is returned. The next call to AcquireSession will retry.
func (*Client) Healthcheck ¶ added in v0.6.0
func (c *Client) Healthcheck()
Schedule a healthcheck if there isn’t currently one running
If the healthcheck fails, the connection will be closed and a new session will be established for the next use.
type ClientConfig ¶ added in v0.6.0
type ClientFactory ¶ added in v0.6.0
type RegisterQuery ¶
type RegisterQuery struct { XMLName xml.Name `xml:"jabber:iq:register query"` Instructions string `xml:"jabber:iq:register instructions"` Username string `xml:"jabber:iq:register username"` Password string `xml:"jabber:iq:register password"` Email string `xml:"jabber:iq:register email"` }
func (*RegisterQuery) TokenReader ¶
func (r *RegisterQuery) TokenReader() xml.TokenReader
type StartTLSCapture ¶
type StartTLSCapture struct { CapturedWriter io.ReadWriter // contains filtered or unexported fields }
func NewCapturingStartTLS ¶
func NewCapturingStartTLS(cfg *tls.Config) *StartTLSCapture
func (*StartTLSCapture) ToStreamFeature ¶
func (c *StartTLSCapture) ToStreamFeature() xmpp.StreamFeature
type StartTLSConfigurableDialer ¶ added in v0.6.0
type StreamInfo ¶
type XMPPDialer ¶ added in v0.6.0
type XMPPDialer struct { StartTLSConfigurableDialer S2S bool }
Click to show internal directories.
Click to hide internal directories.