httpd

package
v0.0.0-...-06bcc8c Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultAddr = "127.0.0.1:3000"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Addr string
}

type ErrorRsp

type ErrorRsp struct {
	Code    int    `json:"err_code"`
	Message string `json:"err_message"`
}

type Option

type Option func(server *Server)

func WithAddr

func WithAddr(addr string) Option

func WithTouchCtl

func WithTouchCtl(t *touchctl.TouchCtl) Option

func WithYkMan

func WithYkMan(yk *ykman.YkMan) Option

type Server

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

func NewServer

func NewServer(opts ...Option) (*Server, error)

func (*Server) ListenAndServe

func (s *Server) ListenAndServe() error

func (*Server) Shutdown

func (s *Server) Shutdown(_ context.Context) error

Jump to

Keyboard shortcuts

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