server

package module
v0.0.0-...-648fd64 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MIT Imports: 6 Imported by: 0

README

noknow-hub/pkg-go/http/server

Getting Started

Import
import (
    "github.com/noknow-hub/pkg-go/http/server"
)

Usage

Documentation

Overview

//////////////////////////////////////////////////////////////////// server.go ////////////////////////////////////////////////////////////////////

Index

Constants

View Source
const (
	ADDRESS_LOCAL_HOST = ""
	SOCKET_FILE_MODE   = 0777
)

Variables

This section is empty.

Functions

This section is empty.

Types

type TcpServer

type TcpServer struct {
	Address   string
	CertFile  string
	IsFcgi    bool
	KeyFile   string
	Port      string
	ServerMux *http.ServeMux
}

func NewTcpServer

func NewTcpServer(address, port string, serverMux *http.ServeMux) *TcpServer

//////////////////////////////////////////////////////////////////// New TcpServer. ////////////////////////////////////////////////////////////////////

func (*TcpServer) Run

func (s *TcpServer) Run() error

//////////////////////////////////////////////////////////////////// Run with TCP. ////////////////////////////////////////////////////////////////////

func (*TcpServer) SetFcgi

func (s *TcpServer) SetFcgi() *TcpServer

//////////////////////////////////////////////////////////////////// Set FCGI. ////////////////////////////////////////////////////////////////////

func (*TcpServer) SetTls

func (s *TcpServer) SetTls(certFile, keyFile string) *TcpServer

//////////////////////////////////////////////////////////////////// Set TLS configuration. ////////////////////////////////////////////////////////////////////

type UnixServer

type UnixServer struct {
	GroupId    int
	IsFcgi     bool
	ServerMux  *http.ServeMux
	SocketPath string
	UserId     int
}

func NewUnixServer

func NewUnixServer(socketPath string, serverMux *http.ServeMux) *UnixServer

//////////////////////////////////////////////////////////////////// New UnixServer. ////////////////////////////////////////////////////////////////////

func (*UnixServer) Run

func (s *UnixServer) Run() error

//////////////////////////////////////////////////////////////////// Run with UNIX socket. ////////////////////////////////////////////////////////////////////

func (*UnixServer) SetFcgi

func (s *UnixServer) SetFcgi() *UnixServer

//////////////////////////////////////////////////////////////////// Set FCGI. ////////////////////////////////////////////////////////////////////

func (*UnixServer) SetOwner

func (s *UnixServer) SetOwner(userId, groupId int) *UnixServer

//////////////////////////////////////////////////////////////////// Set owner. ////////////////////////////////////////////////////////////////////

Directories

Path Synopsis
//////////////////////////////////////////////////////////////////// request.go ////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////// request.go ////////////////////////////////////////////////////////////////////

Jump to

Keyboard shortcuts

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