Documentation
¶
Overview ¶
Package server implements the ditto HTTP API server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server wraps net/http and exposes the ditto copy lifecycle over HTTP.
func New ¶
func New(addr string, client copypkg.CopyClient, token string, statusFn func() StatusResponse) *Server
New creates a Server. addr is a listen address like ":8080". token is the expected Bearer token; pass "" to disable auth. statusFn is called by GET /v1/status to produce operational metrics.
Click to show internal directories.
Click to hide internal directories.