mcpworker

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Worker)

func WithAddr

func WithAddr(addr string) Option

func WithInstructions

func WithInstructions(instr string) Option

func WithServerName

func WithServerName(name string) Option

func WithServerVersion

func WithServerVersion(v string) Option

func WithShutdownTimeout

func WithShutdownTimeout(d time.Duration) Option

func WithToolRegistrar

func WithToolRegistrar(reg func(*mcp.Server)) Option

type PingInput

type PingInput struct {
	Message string `json:"message" jsonschema:"Message to echo back"`
}

type PingOutput

type PingOutput struct {
	Status  string `json:"status"`
	Message string `json:"message"`
}

type Worker

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

func New

func New(opts ...Option) *Worker

func (*Worker) Addr

func (w *Worker) Addr() net.Addr

func (*Worker) Alive

func (w *Worker) Alive() error

func (*Worker) Healthy

func (w *Worker) Healthy() error

func (*Worker) Init

func (w *Worker) Init(logger *slog.Logger) error

func (*Worker) Run

func (w *Worker) Run() error

func (*Worker) Terminate

func (w *Worker) Terminate() error

Jump to

Keyboard shortcuts

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