Add connection webhook notifications (#392)

Also 

* Added decode of LoginStart message
* Add metrics backend constants
* Updated usage section
* Documented MaxFrameLength
This commit is contained in:
Geoff Bourne
2025-04-21 20:28:34 -05:00
committed by GitHub
parent a058d6e21d
commit cc590524c4
13 changed files with 585 additions and 66 deletions
+19
View File
@@ -0,0 +1,19 @@
package server
import (
"context"
"net"
)
type ConnectionNotifier interface {
// NotifyMissingBackend is called when an inbound connection is received for a server that does not have a backend.
NotifyMissingBackend(ctx context.Context, clientAddr net.Addr, server string, playerInfo *PlayerInfo) error
// NotifyFailedBackendConnection is called when the backend connection failed.
NotifyFailedBackendConnection(ctx context.Context,
clientAddr net.Addr, serverAddress string, playerInfo *PlayerInfo, backendHostPort string, err error) error
// NotifyConnected is called when the backend connection succeeded.
NotifyConnected(ctx context.Context,
clientAddr net.Addr, serverAddress string, playerInfo *PlayerInfo, backendHostPort string) error
}