server

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package server provides the HTTP server for the grove daemon.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RunningConfig

type RunningConfig struct {
	GitInterval       time.Duration `json:"git_interval"`
	SessionInterval   time.Duration `json:"session_interval"`
	WorkspaceInterval time.Duration `json:"workspace_interval"`
	PlanInterval      time.Duration `json:"plan_interval"`
	NoteInterval      time.Duration `json:"note_interval"`
	StartedAt         time.Time     `json:"started_at"`
}

RunningConfig holds the active configuration intervals being used by the daemon. This is exposed via the /api/config endpoint so clients can verify what config is active.

type Server

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

Server manages the daemon's HTTP server over a Unix socket.

func New

func New(logger *logrus.Entry) *Server

New creates a new Server instance.

func (*Server) ListenAndServe

func (s *Server) ListenAndServe(socketPath string) error

ListenAndServe starts the daemon on the given unix socket path. It blocks until the server stops or fails.

func (*Server) SetEngine

func (s *Server) SetEngine(eng *engine.Engine)

SetEngine sets the collector engine for the server.

func (*Server) SetRunningConfig

func (s *Server) SetRunningConfig(cfg *RunningConfig)

SetRunningConfig sets the running configuration for the server.

func (*Server) Shutdown

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

Shutdown gracefully stops the server.

Jump to

Keyboard shortcuts

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