server

package
v0.0.0-...-f075ea9 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MessageTypeNodeJoin = 1000 + iota
)

Variables

This section is empty.

Functions

func NewServer

func NewServer(addr string)

Types

type CatMux

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

func (*CatMux) ServeHTTP

func (c *CatMux) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Cluster

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

func (*Cluster) Broadcast

func (c *Cluster) Broadcast(msg *Message)

func (*Cluster) Send

func (c *Cluster) Send(entrypoint string, msg *Message) error

type Message

type Message struct {
	Type    MessageType
	Message []byte
}

type MessageType

type MessageType int

Jump to

Keyboard shortcuts

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