caddyhttpfs

package module
v0.0.0-...-31c3efb Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: Apache-2.0, MIT Imports: 14 Imported by: 0

README

📡 caddy-httpfs

Connect multiple Caddy instances through HTTP.

✍️ Example

# Caddyfile for the primary server
{
	storage httpfs {
		path /path/to/storage
	}
}

https://443 {
	handle /httpfs {
		httpfs {
			path /path/to/storage
		}
	}
}

# Caddyfile for other servers
{
	storage httpfs {
		remote https://primary.server/httpfs
	}
}

https://443 {
	respond "Hello, www |3=)/"
}

⚖️ License

Licensed under either of

at your option.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Httpfs

type Httpfs struct {
	Path   string  `json:"path,omitempty"`
	Remote string  `json:"remote,omitempty"`
	Proxy  string  `json:"proxy,omitempty"`
	Tee    *Httpfs `json:"tee,omitempty"`
	// contains filtered or unexported fields
}

func (*Httpfs) Provision

func (c *Httpfs) Provision(ctx caddy.Context) error

func (*Httpfs) UnmarshalCaddyfile

func (c *Httpfs) UnmarshalCaddyfile(d *caddyfile.Dispenser) error

type HttpfsClient

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

func (*HttpfsClient) Delete

func (c *HttpfsClient) Delete(ctx context.Context, key string) error

func (*HttpfsClient) Exists

func (c *HttpfsClient) Exists(ctx context.Context, key string) bool

func (*HttpfsClient) List

func (c *HttpfsClient) List(ctx context.Context, path string, recursive bool) ([]string, error)

func (*HttpfsClient) Load

func (c *HttpfsClient) Load(ctx context.Context, key string) ([]byte, error)

func (*HttpfsClient) Lock

func (c *HttpfsClient) Lock(ctx context.Context, name string) error

func (*HttpfsClient) Stat

func (c *HttpfsClient) Stat(ctx context.Context, key string) (certmagic.KeyInfo, error)

func (*HttpfsClient) Store

func (c *HttpfsClient) Store(ctx context.Context, key string, value []byte) error

func (*HttpfsClient) String

func (c *HttpfsClient) String() string

func (*HttpfsClient) Unlock

func (c *HttpfsClient) Unlock(ctx context.Context, name string) error

type HttpfsServer

type HttpfsServer struct {
	Httpfs
	// contains filtered or unexported fields
}

func (HttpfsServer) CaddyModule

func (HttpfsServer) CaddyModule() caddy.ModuleInfo

func (*HttpfsServer) Provision

func (c *HttpfsServer) Provision(ctx caddy.Context) error

func (*HttpfsServer) ServeHTTP

func (c *HttpfsServer) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error

type HttpfsStorage

type HttpfsStorage struct {
	Httpfs
}

func (HttpfsStorage) CaddyModule

func (HttpfsStorage) CaddyModule() caddy.ModuleInfo

func (*HttpfsStorage) CertMagicStorage

func (c *HttpfsStorage) CertMagicStorage() (certmagic.Storage, error)

Jump to

Keyboard shortcuts

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