package http

import "codeberg.org/eris/eris-go/http"

Index

Types

type HttpStore

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

func NewClient

func NewClient(u *url.URL) (store *HttpStore)

func (*HttpStore) Allowed

func (store *HttpStore) Allowed() eris.AllowOps

func (*HttpStore) Close

func (store *HttpStore) Close() (err error)

func (*HttpStore) Drop

func (store *HttpStore) Drop(ref eris.Ref) error

func (*HttpStore) Get

func (store *HttpStore) Get(ctx context.Context, chunk []byte, ref eris.Ref) (err error)

func (*HttpStore) Has

func (store *HttpStore) Has(ctx context.Context, ref eris.Ref, chunkSize int) (present bool)

func (*HttpStore) Put

func (store *HttpStore) Put(ctx context.Context, chunk []byte, ref eris.Ref) error

type StoreHandler

type StoreHandler struct {
	Store          eris.Store
	Encode, Decode bool
}

HTTP handler for serving ERIS blocks If Decode is true then clients may request decoded data.

func (StoreHandler) ServeHTTP

func (handler StoreHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)

Source Files

http_client.go http_server.go

Version
v0.0.0-20250117134628-64f8be33f6fe (latest)
Published
Jan 17, 2025
Platform
linux/amd64
Imports
13 packages
Last checked
1 day ago

Tools for package owners.