Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotOK = fmt.Errorf("http status not ok")
Functions ¶
This section is empty.
Types ¶
type FS ¶
type FS interface { List(ctx context.Context, p string, fn func(fs.FileInfo) error) error Stat(ctx context.Context, p string) (fs.FileInfo, error) Get(ctx context.Context, p string) (f io.ReadCloser, err error) Put(ctx context.Context, p string, f io.Reader) (err error) Del(ctx context.Context, p string) error }
type MirrorHandler ¶
type MirrorHandler struct { // RemoteCache is the cache of the remote file system RemoteCache FS // RedirectLinks is the redirect link RedirectLinks func(p string) (string, bool) // BaseDomain is the domain name suffix BaseDomain string // Client is used without the connect method Client *http.Client // ProxyDial specifies the optional proxyDial function for // establishing the transport connection. ProxyDial func(context.Context, string, string) (net.Conn, error) // NotFound Not proxy requests NotFound http.Handler // Logger error log Logger Logger // CheckSyncTimeout is the timeout for checking the sync CheckSyncTimeout time.Duration // HostFromFirstPath is the host from the first path HostFromFirstPath bool // BlockSuffix is for block some source BlockSuffix []string // contains filtered or unexported fields }
MirrorHandler mirror handler
func (*MirrorHandler) ServeHTTP ¶
func (m *MirrorHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.