postback

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2021 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Name     string        `json:"name"`
	Username string        `json:"username"`
	Password string        `json:"password"`
	RootURL  string        `json:"root_url"`
	MaxConns int           `json:"max_conns"`
	Retries  int           `json:"retries"`
	Timeout  time.Duration `json:"timeout"`
}

Options represents HTTP Postback server options.

type Postback

type Postback struct {
	// contains filtered or unexported fields
}

Postback represents an HTTP Message server.

func New

func New(o Options) (*Postback, error)

New returns a new instance of the HTTP Postback messenger.

func (*Postback) Close

func (p *Postback) Close() error

Close closes idle HTTP connections.

func (*Postback) Flush

func (p *Postback) Flush() error

Flush flushes the message queue to the server.

func (*Postback) Name

func (p *Postback) Name() string

Name returns the messenger's name.

func (*Postback) Push

func (p *Postback) Push(m messenger.Message) error

Push pushes a message to the server.

Jump to

Keyboard shortcuts

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