server

package
v0.20.4 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

README

DataTug agent server

It is started using serve command like:

datatug serve /t=<path_to_project_folder>

This will start HTTP server that listens by default on port # 8989. You can check it started by opening http://localhost:8989.

The port can be changed with --port=<####> parameter.

Run datatug serve --help to see all available parameters.

Endpoints

You can learn about server endpoints here.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpServer

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

func NewHttpServer

func NewHttpServer() HttpServer

func (*HttpServer) ServeHTTP

func (s *HttpServer) ServeHTTP(pathsByID map[string]string, host string, port int, session secureread.Session, caps api.Capabilities) error

ServeHTTP starts HTTP server. session is the fixed secureread.Session this process's whole life runs under (REQ:principal-selection) — every read the web UI can trigger through the endpoints registered below goes through it (REQ:server-acl-all-reads); see apps/datatugapp/commands/cmd_serve.go for how it is built from --as/--role/--group and the project's policy set. caps gates this process's write/opaque-SQL capabilities closed by default (api.Capabilities's own doc comment) — see cmd_serve.go's --allow-writes/ --allow-opaque-sql flags.

func (*HttpServer) Shutdown

func (s *HttpServer) Shutdown(ctx context.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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