fileserver

package
v2.10.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Package fileserver implements a server for downloading PFS files over plain HTTP (i.e. browser downloads).

See: https://www.notion.so/2023-04-03-HTTP-file-and-archive-downloads-cfb56fac16e54957b015070416b09e94

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Request

type Request struct {
	PachClient     *client.APIClient
	Request        *http.Request
	ResponseWriter http.ResponseWriter
	RequestID      string
	HTML           bool
}

type Server

type Server struct {
	ClientFactory func(context.Context) *client.APIClient
}

Server is an http.Handler that can download from and upload to PFS.

func (*Server) ServeHTTP

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

ServeHTTP implements http.Handler for the /pfs/ route.

Jump to

Keyboard shortcuts

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