server

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package server provides the HTTP API server for nstance-admin.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BindAddr      string
	ConfigService *service.ConfigService
	GroupService  *service.GroupService
	Logger        *slog.Logger
}

Config contains configuration for the HTTP server.

type Server

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

Server is the HTTP API server for nstance-admin.

func New

func New(cfg Config) (*Server, error)

New creates a new HTTP API server.

func (*Server) Start

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

Start starts the HTTP server.

func (*Server) Stop

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

Stop gracefully stops the HTTP server.

Jump to

Keyboard shortcuts

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