targetkit

package
v0.2026203.815 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 16 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

Overview

Package targetkit provides transport-neutral gRPC connections to Charly targets. SSH is only a process transport: gRPC still owns the protocol, and the target chain carried by CUE-generated spec.TargetSpec owns nested routing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DialProcessProvider

func DialProcessProvider(ctx context.Context, process spec.Process, opts DialOptions) (*grpc.ClientConn, pb.ProviderClient, error)

DialProcessProvider opens gRPC over a process supplied by a deployment executor. This is the placement-neutral sibling of DialProvider: the same protocol runs over local exec, SSH, containers, VMs, and recursively nested venues without teaching the gRPC layer about any of them.

func DialProvider

func DialProvider(ctx context.Context, target spec.TargetSpec, opts DialOptions) (*grpc.ClientConn, pb.ProviderClient, error)

DialProvider opens gRPC over a local-exec or SSH stdio process. The SSH remote argv is fixed to `charly __agent-target serve --stdio`; nested target hops are carried as TargetSpec on the first Provider.Channel frame and are resolved by the responsible Charly node.

func ServeStdio

func ServeStdio(stdin io.ReadCloser, stdout io.WriteCloser, register func(*grpc.Server), opts ...grpc.ServerOption) error

ServeStdio runs a gRPC server on one full-duplex stdio connection. stdout is exclusively HTTP/2 protocol data; diagnostics belong on stderr.

func StdioCommand

func StdioCommand(target spec.TargetSpec, opts DialOptions) ([]string, error)

StdioCommand validates the generic route and returns an argv with no shell interpolation. Hops after the first grpc marker—including tmux, another SSH node, or an exec/container hop—are nested routing data, not special cases.

func StdioFiles

func StdioFiles() (io.ReadCloser, io.WriteCloser)

StdioFiles is the production adapter used by the hidden target command.

Types

type DialOptions

type DialOptions struct {
	CharlyBinary       string
	RemoteCharlyBinary string
	SSHBinary          string
	Stderr             io.Writer
	ExtraGRPC          []grpc.DialOption
	Command            func(context.Context, string, ...string) *exec.Cmd
}

DialOptions controls process launch only. It deliberately has no runtime- or tmux-specific fields; those remain in the CUE payload sent over Provider.Channel.

Jump to

Keyboard shortcuts

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