server

package
v0.0.0-...-c0fde58 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const Media = "/tmp/cache"

Variables

This section is empty.

Functions

func ConfigureCA

func ConfigureCA()

func ConfigureDocker

func ConfigureDocker(proxyAddress string)

func ExecuteCmd

func ExecuteCmd(stdout bool, name string, cmd ...string) (string, int)

func GetData

func GetData() string

func StartHTTPSServers

func StartHTTPSServers() []*http.Server

func StartHTTPServers

func StartHTTPServers() []*http.Server

func StartP2PServer

func StartP2PServer(config *configure.DeployConfig, isRun bool) *http.Server

func StartProxyServer

func StartProxyServer(config *configure.DeployConfig, isRun bool) *http.Server

func StartServer

func StartServer(idx int, runMode string, rootList []string, port int, serveBySSL, proxyHTTPS bool) *http.Server

func StartServers

func StartServers(root, agent int, serveBySSL, proxyHTTPS bool) []*http.Server

Types

type Config

type Config struct {
	// Host address, for P2P route
	MyAddr string
	// APIKey as prefix for P2P Access
	APIKey string
	// Fs cached remote file system for p2p
	Fs *fs.P2PFS
}

Config configuration for server

type Server

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

Server object for p2p and proxy

func (Server) ServeHTTP

func (s Server) ServeHTTP(w http.ResponseWriter, req *http.Request)

ServeHTTP as HTTP handler

Jump to

Keyboard shortcuts

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