server

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package server provides the server application lifecycle manager for the server part of the CLI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Server)

Option is a function that configures the server.

func WithLogger

func WithLogger(logger *slog.Logger) Option

WithLogger configures the server with the given logger.

func WithOptions

func WithOptions(options Options) Option

WithOptions configures the server with the given Options.

type Options

type Options struct {
	Logger *slog.Logger
}

Options holds the configuration for the server.

type Server

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

Server is the main orchestrator and Server of the application.

func New

func New(address string, handler socket.Handler, options ...Option) *Server

New returns a new server.

func (*Server) Start

func (s *Server) Start(ctx context.Context) (err error)

Start the server.

Jump to

Keyboard shortcuts

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