mcpworker

package
v1.0.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	SubjectCreated = "mcp.servers.created"
	SubjectDeleted = "mcp.servers.deleted"
)

Variables

This section is empty.

Functions

func DecodeListToolsReply

func DecodeListToolsReply(data []byte) ([]runtimetypes.MCPTool, error)

func DecodeToolReply

func DecodeToolReply(data []byte) (any, error)

func SubjectExecute

func SubjectExecute(name string) string

func SubjectListTools

func SubjectListTools(name string) string

Types

type MCPDeletedEvent

type MCPDeletedEvent struct {
	Name string `json:"name"`
}

type MCPToolListReply

type MCPToolListReply struct {
	Tools []runtimetypes.MCPTool `json:"tools"`
	Error string                 `json:"error,omitempty"`
}

type MCPToolReply

type MCPToolReply struct {
	Result any    `json:"result,omitempty"`
	Error  string `json:"error,omitempty"`
}

type MCPToolRequest

type MCPToolRequest struct {
	SessionID string         `json:"session_id,omitempty"`
	Tool      string         `json:"tool"`
	Args      map[string]any `json:"args"`
}

type Manager

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

func New

func (*Manager) ActiveWorkers

func (m *Manager) ActiveWorkers() []string

func (*Manager) StartWorker

func (m *Manager) StartWorker(ctx context.Context, srv *runtimetypes.MCPServer) error

func (*Manager) StopAll

func (m *Manager) StopAll()

func (*Manager) StopWorker

func (m *Manager) StopWorker(ctx context.Context, name string)

func (*Manager) WatchEvents

func (m *Manager) WatchEvents(ctx context.Context) error

Jump to

Keyboard shortcuts

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