package
0.0.0-20240229161823-4c98d7827540
Repository: https://github.com/johanmickos/nacre.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# Functions
DefaultServer returns a Root nacre instance with the default configuration and setup.
NewHTTPServer allocates a HTTP server for serving nacre's HTTP traffic.
NewInMemoryRateLimiter returns a memory-backed rate limiter for managing incoming peer/client requests.
NewRandString returns a new string of length 'n' consisting of random alphabetical characters.
NewRedisHub allocates a new Redis-backed hub implementation.
NewTCPServer returns a stoppable TCP server listening on the provided address.
ParseConfig returns the default Nacre configuration merged with overridden configurations from environment variables.
# Constants
Possible client states.
Possible client states.
Possible client states.
# Structs
AppConfig exposes Nacre-specific configuration options.
Config is the root structure containing Nacre configuration.
HTTPServer handles nacre's HTTP requests and websocket upgrades.
Peer represents a connected websocket peer and is responsible for driving the websocket read/write loops and peer connection maangement.
RedisConfig exposes Redis-specific configuration options.
Root is the root struct defining the nacre server dependencies.
TCPServer handles nacre's TCP clients and their data streams.
# Interfaces
Hub is a central client/peer and streamed data management layer.
RateLimiter defines functions for keeping track of ongoing peer/client connections and limiting incoming request rates.
# Type aliases
ClientState indicates whether the data-streaming client is still connected.