server

package
v0.0.30 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorResponse

type ErrorResponse struct {
	Error string `json:"error"`
}

ErrorResponse is a standard JSON error envelope.

type Server

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

Server is the HTTP API for the sidecar.

func NewServer

func NewServer(addr string, eng *engine.Engine, homeDir string) *Server

NewServer creates a Server wired to the given engine. homeDir is the seid home directory (e.g. /sei) used by the node-id endpoint.

func (*Server) ListenAndServe

func (s *Server) ListenAndServe(ctx context.Context) error

ListenAndServe starts the HTTP server and blocks until ctx is cancelled.

type TaskRequest

type TaskRequest struct {
	ID     string         `json:"id,omitempty"`
	Type   string         `json:"type"`
	Params map[string]any `json:"params,omitempty"`
}

TaskRequest is the JSON body for POST /v0/tasks. When ID is provided, the engine uses it as the task's canonical identifier; otherwise a random UUID is generated.

Jump to

Keyboard shortcuts

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