server

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License: Apache-2.0, MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListenAndServe

func ListenAndServe(addr string, storageSvc storage.Service, retrievalSvc retrieval.Service, options ...Option) error

ListenAndServe creates a new storage node HTTP server, and starts it up.

func NewHandler

func NewHandler(id principal.Signer) http.Handler

NewHandler displays version info.

func NewServer

func NewServer(storageSvc storage.Service, retrievalSvc retrieval.Service, options ...Option) (*echo.Echo, error)

NewServer creates a new storage node server.

Types

type BuildInfo added in v0.0.12

type BuildInfo struct {
	Version string `json:"version"`
	Repo    string `json:"repo"`
}

type Option added in v0.0.14

type Option = func(c *serverConfig)

func WithUCANRetrievalServerOptions added in v0.0.14

func WithUCANRetrievalServerOptions(options ...ucanretrieval.Option) Option

func WithUCANServerOptions added in v0.0.14

func WithUCANServerOptions(options ...server.Option) Option

type ServerInfo added in v0.0.12

type ServerInfo struct {
	ID    string    `json:"id"`
	Build BuildInfo `json:"build"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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