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: 0

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