broker

package module
v0.0.0-...-1d54f16 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: MIT Imports: 19 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Moved to github.com/illchi

illchi

Federated P2P message broker

Documentation

Index

Constants

View Source
const Version = "0.1.1"

Variables

View Source
var CertsCacheDir = ""
View Source
var ErrBadContentLength = errors.New("bad content length")
View Source
var ErrConflictID = errors.New("conflict id")
View Source
var HostName = ""

Functions

This section is empty.

Types

type Authenticator

type Authenticator func(Broker, *fasthttp.RequestCtx) error

type Broker

type Broker interface {
	Close() error
	Listen() error
	Stat() *Statics
}

func New

func New(config Config) (broker Broker, err error)

type Config

type Config struct {
	Addr          string
	Origin        string
	Authenticator Authenticator
	Cert, Key     []byte
}

type ID

type ID uint32

func (ID) String

func (id ID) String() string

type Statics

type Statics struct {
	UpTime      int32  `json:"uptime"`
	Connections int32  `json:"conns"`
	Version     string `json:"v"`
}

Statics is Server status and Statics

func (*Statics) JSON

func (s *Statics) JSON() []byte

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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