Documentation ¶
Index ¶
- Variables
- type MountMap
- func (mm *MountMap) DeleteTarget(mountTarget string) bool
- func (mm *MountMap) GetSource(mountTarget string) string
- func (mm *MountMap) Put(mountTarget string, mountSource string, fsType string, ...) (bool, error)
- func (mm *MountMap) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (mm *MountMap) Targets() []string
- type MountSourcePermError
- type Server
- type ServerPool
- func (sp *ServerPool) Add(addr string) (*Server, error)
- func (sp *ServerPool) Get(port uint16) *Server
- func (sp *ServerPool) Listen()
- func (sp *ServerPool) NServer() int
- func (sp *ServerPool) Remove(port uint16) (bool, error)
- func (sp *ServerPool) Servers() []*Server
- func (sp *ServerPool) StartSrv(s *Server) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidMountTarget describes an invalid value for a mount target. ErrInvalidMountTarget = errors.New("invalid mount target value") // ErrInvalidMountSource describes an invalid value for a mount source. ErrInvalidMountSource = errors.New("invalid mount source value") )
Functions ¶
This section is empty.
Types ¶
type MountMap ¶
type MountMap struct {
// contains filtered or unexported fields
}
func NewMountMap ¶
func NewMountMap(fsf fileserver.Factory) *MountMap
func (*MountMap) DeleteTarget ¶
Delete removes an existing mount target. It returns true if the mount target existed.
func (*MountMap) GetSource ¶
GetSource retrieves the source for the given mount target. It returns "" if the mount target doesn't exist.
type MountSourcePermError ¶
type MountSourcePermError struct {
// contains filtered or unexported fields
}
func (*MountSourcePermError) Error ¶
func (e *MountSourcePermError) Error() string
type Server ¶
type Server struct { MountMap *MountMap HandlerWrapper func(http.Handler) http.Handler Addr string Port uint16 Started chan struct{} Running bool // contains filtered or unexported fields }
func (*Server) ListenAndServe ¶
type ServerPool ¶
type ServerPool struct { Fsf fileserver.Factory // contains filtered or unexported fields }
func NewServerPool ¶
func NewServerPool(fsf fileserver.Factory) *ServerPool
func (*ServerPool) Get ¶
func (sp *ServerPool) Get(port uint16) *Server
func (*ServerPool) Listen ¶
func (sp *ServerPool) Listen()
func (*ServerPool) NServer ¶
func (sp *ServerPool) NServer() int
func (*ServerPool) Servers ¶
func (sp *ServerPool) Servers() []*Server
func (*ServerPool) StartSrv ¶
func (sp *ServerPool) StartSrv(s *Server) bool
Click to show internal directories.
Click to hide internal directories.