Documentation
¶
Overview ¶
Package mcphost supplies immutable synthetic hosts for core protocol tests.
Index ¶
- type Backend
- func (b *Backend) Inspect(ctx context.Context, permit ports.Permit, node string, ...) (_ remotefile.Metadata, retErr error)
- func (b *Backend) OpenFiles(ctx context.Context, _ ports.Permit, node string) (ports.FileSession, error)
- func (b *Backend) OpenTransfer(ctx context.Context, permit ports.Permit, node string) (ports.TransferSession, error)
- func (b *Backend) Run(ctx context.Context, _ ports.Permit, node string, command ports.Command) (ports.CommandResult, error)
- func (b *Backend) RunTunnel(ctx context.Context, _ ports.Permit, spec tunnel.Spec, ready func(string) bool, ...) (retErr error)
- func (b *Backend) Shutdown(context.Context) error
- type Configuration
- type GuardrailConfig
- type NodeGuardrailCfg
- type Provider
- func (p *Provider) Dependencies() ports.Dependencies
- func (p *Provider) DomainID() string
- func (p *Provider) Enter(ctx context.Context, admission ports.Admission) (ports.Permit, error)
- func (p *Provider) GetConfig(id string) (*ssh.ClientConfig, error)
- func (p *Provider) List(ctx context.Context, query ports.NodeQuery) (ports.InventorySnapshot, error)
- func (p *Provider) NewBackend(ctx context.Context) (ports.Backend, error)
- func (p *Provider) Policy() policy.Config
- func (p *Provider) Resolve(ctx context.Context, request ports.ResolveRequest) (ports.OperationSnapshot, error)
- func (p *Provider) ResolveSecret(ctx context.Context, request ssh.SecretRequest) ([]byte, error)
- func (p *Provider) ResolveSelector(selector string) (string, error)
- func (p *Provider) SSHOptions() []ssh.Option
- func (p *Provider) Snapshot() *Configuration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
Backend preserves the original static-fixture connection behavior, including direct fault-injection access. Production hosts use sshexec or a CLI adapter.
func (*Backend) OpenTransfer ¶
type Configuration ¶
type GuardrailConfig ¶
type NodeGuardrailCfg ¶
type NodeGuardrailCfg = policy.NodeConfig
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
func NewProviderWithoutOpenSSH ¶
func NewProviderWithoutOpenSSH(cfg *Configuration) *Provider
func (*Provider) Dependencies ¶
func (p *Provider) Dependencies() ports.Dependencies
func (*Provider) NewBackend ¶
func (*Provider) Resolve ¶
func (p *Provider) Resolve(ctx context.Context, request ports.ResolveRequest) (ports.OperationSnapshot, error)
func (*Provider) ResolveSecret ¶
func (*Provider) ResolveSelector ¶
func (*Provider) SSHOptions ¶
Tests set HOME/USERPROFILE to fixture-owned directories. Discovery is limited to this synthetic host; production core never reads these process defaults.
func (*Provider) Snapshot ¶
func (p *Provider) Snapshot() *Configuration