server

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentConfig

type AgentConfig struct {
	Name        string   `toml:"name" json:"name"`
	Description string   `toml:"description" json:"description"`
	Enabled     bool     `toml:"enabled" json:"enabled"`
	Actions     []string `toml:"actions" json:"actions"`
}

AgentConfig defines agent configuration

func (*AgentConfig) Validate

func (c *AgentConfig) Validate() error

Validate checks agent configuration

type Config

type Config struct {
	Server  ServerConfig             `toml:"server"`
	Log     log.Config               `toml:"log"`
	Models  genkit.Config            `toml:"genkit"`
	Storage storage.OpenSearchConfig `toml:"storage"`
	Neo4j   graph.Neo4jConfig        `toml:"neo4j"`
	Kafka   mq.KafkaConfig           `toml:"kafka"`
	Redis   redis.Config             `toml:"redis"`
}

Config holds all configuration values

func LoadConfig

func LoadConfig(filename string) (Config, error)

LoadConfig reads and parses the configuration file

func (*Config) Validate

func (c *Config) Validate() error

Validate checks all configuration fields

type Server

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

Server represents the memory server

func NewServer

func NewServer(conf Config) (*Server, error)

NewServer creates a new server with the given configuration

func (*Server) Shutdown

func (s *Server) Shutdown() error

Shutdown gracefully shuts down the server

func (*Server) Start

func (s *Server) Start() error

Start starts the server based on configuration mode

type ServerConfig

type ServerConfig struct {
	Mode string `toml:"mode"` // http, mcp, or both
	Port int    `toml:"port"`
}

ServerConfig contains server configuration

func (*ServerConfig) Validate

func (s *ServerConfig) Validate() error

Validate checks server configuration

Jump to

Keyboard shortcuts

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