core

package
v0.0.0-...-a6a431b Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "0.1.0"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Addr          string
	Logger        *log.Logger
	Origin        string
	Authenticator func(Server, *http.Request, ID) error
}

Config is server config params

type ID

type ID = uint64

ID represents a node ID

type Server

type Server interface {
	Listen(certPath, keyPath string) error
	Statics() Statics
	io.Closer
}

Server represents message broker

func New

func New(conf Config) Server

New make a new Server with conf as its Config

type Statics

type Statics struct {
	UpTime      int32
	Connections int32
	Version     string
}

Statics is Server status and Statics

Jump to

Keyboard shortcuts

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