compose

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2025 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Overview

internal/compose/compose.go

internal/compose/lifecycle.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Down

func Down(configFile string, serverNames []string) error

func List

func List(configFile string) error

func Logs

func Logs(configFile string, serverNames []string, follow bool) error

func ShortDuration

func ShortDuration(d time.Duration) string

func Start

func Start(configFile string, serverNames []string) error

func Stop

func Stop(configFile string, serverNames []string) error

func Up

func Up(configFile string, serverNames []string) error

func Validate

func Validate(configFile string) error

Types

type Composer

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

Composer orchestrates the entire MCP compose environment

func NewComposer

func NewComposer(configPath string) (*Composer, error)

NewComposer creates a new composer instance

func (*Composer) GetProtocolManagers

func (c *Composer) GetProtocolManagers(serverName string) *ProtocolManagerSet

GetProtocolManagers returns protocol managers for a server

func (*Composer) Shutdown

func (c *Composer) Shutdown() error

Shutdown gracefully shuts down the composer

func (*Composer) StartAll

func (c *Composer) StartAll() error

StartAll starts all configured servers

func (*Composer) StartServer

func (c *Composer) StartServer(serverName string) error

StartServer starts a specific server with protocol integration

func (*Composer) StopAll

func (c *Composer) StopAll() error

StopAll stops all running servers

func (*Composer) StopServer

func (c *Composer) StopServer(serverName string) error

StopServer stops a specific server

type HealthChecker

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

HealthChecker performs health checks on servers

func NewHealthChecker

func NewHealthChecker(healthConfig config.HealthCheck, logger *logging.Logger, baseURL string) *HealthChecker

NewHealthChecker creates a new health checker

func (*HealthChecker) Check

func (hc *HealthChecker) Check() error

Check performs a health check

type LifecycleManager

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

LifecycleManager handles pre/post hooks and health checks

func NewLifecycleManager

func NewLifecycleManager(cfg *config.ComposeConfig, logger *logging.Logger, projectDir string) *LifecycleManager

NewLifecycleManager creates a new lifecycle manager

func (*LifecycleManager) ExecutePostStartHook

func (lm *LifecycleManager) ExecutePostStartHook(serverName string, hook string) error

ExecutePostStartHook executes post-start lifecycle hook

func (*LifecycleManager) ExecutePostStopHook

func (lm *LifecycleManager) ExecutePostStopHook(serverName string, hook string) error

ExecutePostStopHook executes post-stop lifecycle hook

func (*LifecycleManager) ExecutePreStartHook

func (lm *LifecycleManager) ExecutePreStartHook(serverName string, hook string) error

ExecutePreStartHook executes pre-start lifecycle hook

func (*LifecycleManager) ExecutePreStopHook

func (lm *LifecycleManager) ExecutePreStopHook(serverName string, hook string) error

ExecutePreStopHook executes pre-stop lifecycle hook

type ProtocolManagerSet

type ProtocolManagerSet struct {
	Progress     *protocol.ProgressManager
	Resource     *protocol.ResourceManager
	Sampling     *protocol.SamplingManager
	Subscription *protocol.SubscriptionManager
	Change       *protocol.ChangeNotificationManager
}

ProtocolManagerSet contains all protocol managers for a server

Jump to

Keyboard shortcuts

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