server

package
v0.0.0-...-185fbd5 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Address is the address at which the server will be listening
	Address string
}

Config is the configuration for the server

func NewServerConfig

func NewServerConfig() *Config

NewServerConfig creates a new server config

type Server

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

Server is a simple HTTP server that listens for incoming requests

func NewServer

func NewServer(store *store.Store[model.Comment], logger *slog.Logger) *Server

NewServer creates a new instance of the Server

func (*Server) Initialize

func (s *Server) Initialize(ctx context.Context, conf *Config) chan struct{}

Initialize starts the HTTP server

Jump to

Keyboard shortcuts

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