server

package
v0.0.0-...-889eed4 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2022 License: Unlicense Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ConnectionsGauge keeps track of all active connections
	ConnectionsGauge = prometheus.NewGauge(prometheus.GaugeOpts{
		Name: "wuerfler_connections",
		Help: "Active connections",
	})
)

Functions

This section is empty.

Types

type ErrorMessage

type ErrorMessage struct {
	Type    string `json:"type"`
	Payload string `json:"payload"`
}

ErrorMessage is being sent whenever there is an error

type Message

type Message struct {
	Type    string          `json:"type"`
	Payload json.RawMessage `json:"payload"`
}

Message is the general type

type RollPayload

type RollPayload struct {
	Dices []uint8 `json:"dices"`
}

RollPayload contains the requested dices

type Server

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

Server holds everything the wuerfler server needs

func NewServer

func NewServer(conf config.Config) *Server

NewServer returns a new server

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

Run runs the server

Jump to

Keyboard shortcuts

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