fileserver

package
v0.0.0-...-3b7a923 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Fast and dirty implementation for synchronized file server across replica

Index

Constants

View Source
const (
	StoragePath = "./storage/"
)

Variables

This section is empty.

Functions

func NewRouter

func NewRouter(fsHandler Handler) *chi.Mux

func NewServer

func NewServer(address string, router *chi.Mux) *server

Types

type Handler

type Handler interface {
	Index(writer http.ResponseWriter, request *http.Request)
	HandleUpload(writer http.ResponseWriter, request *http.Request)
	HandleFileServer(writer http.ResponseWriter, request *http.Request)
	DropAll(writer http.ResponseWriter, request *http.Request)
	GetAll(writer http.ResponseWriter, request *http.Request)

	PeerDiscovery()
	StartSync()
}

func NewFileServerHandler

func NewFileServerHandler(pathToServe string, peerFsHost []string, host string) Handler

Jump to

Keyboard shortcuts

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