Help us shape the future of Go! Take the 2026 Go Developer Survey

transport

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package transport defines the language-neutral transport extraction contract. Language adapters match exact API identities and normalize their evidence; this package owns stable operation nodes and graph emission.

Index

Constants

View Source
const NoPosition = -1

NoPosition marks a value that is not carried by any call argument.

Variables

This section is empty.

Functions

func Emit

func Emit(b *parserapi.Builder, sourceID string, operation Operation) string

Emit declares one stable callsite operation and its language-neutral edges.

func OperationID

func OperationID(b *parserapi.Builder, operation Operation) string

func QualifiedName

func QualifiedName(operation Operation) string

QualifiedName returns the stable callsite identity shared by emitters that need to attach later evidence (for example, a downstream decode) before the operation node itself is walked.

Types

type Adapter

type Adapter interface {
	Match(identity string) (Spec, bool)
}

Adapter recognizes exact API identities. Implementations must not fall back to method-name matching.

type Direction

type Direction string
const (
	Send    Direction = "send"
	Receive Direction = "receive"
)

type ExactAdapter

type ExactAdapter map[string]Spec

ExactAdapter is the common adapter implementation used by language-specific extractors after they have established a typed/static API identity.

func (ExactAdapter) Match

func (a ExactAdapter) Match(identity string) (Spec, bool)

type Operation

type Operation struct {
	Spec
	Channel       string
	ChannelStatus string
	Reliability   string
	PayloadStatus string
	Proof         string
	WrapperDepth  int
	Location      graph.Location
	MessageID     string
	Message       string
	Binding       string
}

Operation is normalized evidence for one callsite. Carries is emitted only when MessageID and Message are both present and PayloadStatus is proven.

type Spec

type Spec struct {
	Protocol            string
	API                 string
	Direction           Direction
	ChannelPosition     int
	PayloadPosition     int
	ReliabilityPosition int
	ChannelField        string
	PayloadField        string
	ReliabilityField    string
}

Spec describes one exact transport API and where it keeps its channel, payload, and reliability evidence. Argument positions are zero-based; NoPosition means the API does not expose that value as an argument. A non-empty Field is a dotted path resolved through the value at that position, which is how libraries that pass a packet struct rather than positional bytes are modelled.

Jump to

Keyboard shortcuts

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