xmpp

package module
v0.0.0-...-ae36d4e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeSender

func MakeSender(target string) (send.Sender, error)

MakeSender constructs an XMPP logging backend that reads the hostname, username, and password from environment variables:

  • GRIP_XMPP_HOSTNAME
  • GRIP_XMPP_USERNAME
  • GRIP_XMPP_PASSWORD

The instance is otherwise unconfigured.

func MakeXMPPFormatter

func MakeXMPPFormatter(name string) send.MessageFormatter

MakeXMPPFormatter returns a MessageFormatter that will produce messages in the following format, used primarily by the xmpp logger:

[<name>] (p=<priority>) <message>

It can never error.

func NewSender

func NewSender(target string, info ConnectionInfo) (send.Sender, error)

NewSender creates a sender with the configuration for the connection to the XMPP server.

Types

type ConnectionInfo

type ConnectionInfo struct {
	Hostname string
	Username string
	Password string

	DisableTLS           bool
	AllowUnencryptedAuth bool
	// contains filtered or unexported fields
}

ConnectionInfo stores all information needed to connect to an XMPP (jabber) server to send log messages.

func GetConnectionInfo

func GetConnectionInfo() ConnectionInfo

GetConnectionInfo builds an XMPPConnectionInfo structure reading default values from the following environment variables:

GRIP_XMPP_HOSTNAME
GRIP_XMPP_USERNAME
GRIP_XMPP_PASSWORD

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL