transport

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const ArtifactVersion = "compute-network-conformance.v1"
View Source
const DefaultProviderVersion = "v0.2.0-dev"

Variables

This section is empty.

Functions

func ServeContentProcess

func ServeContentProcess(ctx context.Context, args []string, stdout io.Writer, stderr io.Writer) error

Types

type CaptiveProof

type CaptiveProof struct {
	DenyByDefault bool               `json:"deny_by_default"`
	CheckedModes  []core.NetworkMode `json:"checked_modes"`
	Residue       ResidueScan        `json:"residue"`
}

type ConformanceArtifact

type ConformanceArtifact struct {
	Version     string                    `json:"version"`
	Mode        Mode                      `json:"mode"`
	GeneratedAt time.Time                 `json:"generated_at"`
	Supported   bool                      `json:"supported"`
	Specs       []network.ConformanceSpec `json:"specs"`
	Transfer    *TransferProof            `json:"transfer,omitempty"`
	Captive     *CaptiveProof             `json:"captive,omitempty"`
}

func RunConformance

func RunConformance(ctx context.Context, opts RunOptions) (ConformanceArtifact, error)

type Mode

type Mode string
const (
	ModeP2P     Mode = "p2p"
	ModeCaptive Mode = "captive"
	ModeTor     Mode = "tor"
	ModeTailnet Mode = "tailnet"
)

type ResidueScan

type ResidueScan struct {
	Clean          bool     `json:"clean"`
	RemovedEntries int      `json:"removed_entries,omitempty"`
	RemainingNames []string `json:"remaining_names,omitempty"`
}

type RunOptions

type RunOptions struct {
	Mode                 Mode
	ArtifactPath         string
	WorkDir              string
	BindHost             string
	Payload              []byte
	ContentServerCommand []string
	ContentServerEnv     []string
	LookPath             func(string) (string, error)
	DialContext          func(context.Context, string, string) (net.Conn, error)
	RunCommand           func(context.Context, string, ...string) ([]byte, error)
	TorSocksAddress      string
	ProviderVersion      string
	Now                  time.Time
}

type TransferProof

type TransferProof struct {
	ContentRef           string `json:"content_ref"`
	Bytes                int64  `json:"bytes"`
	SHA256               string `json:"sha256"`
	ServerPID            int    `json:"server_pid"`
	ServerIdentitySHA256 string `json:"server_identity_sha256"`
	SignatureSHA256      string `json:"signature_sha256"`
}

Jump to

Keyboard shortcuts

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