transport

package
v0.1.0-proto2f Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2026 License: MPL-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const ALPNGapiQUIC = "gapi-quic"

ALPNGapiQUIC is the ALPN protocol identifier for the kernel's QUIC transport. It mirrors the ecosystem ALPN registry as its governing contract (append-only, tombstoned): a collision is a review failure, not a runtime discovery. Consumers (the orchestrator's ALPN router) import this constant and never redefine the literal (GAPI-DIV-011).

Variables

This section is empty.

Functions

func CreateClientTLSConfig

func CreateClientTLSConfig(cfg TLSConfig) (*tls.Config, error)

CreateClientTLSConfig builds a tls.Config from the provided settings

func GenerateInsecureSelfSignedCert

func GenerateInsecureSelfSignedCert() (tls.Certificate, error)

GenerateInsecureSelfSignedCert generates a self-signed cert for testing/insecure modes.

func NewClientFromConfig

func NewClientFromConfig(cfg config.TransportConfig) (eventbus.Transport[*anypb.Any], error)

Config-driven client.

func NewLocal

func NewLocal() eventbus.Transport[*anypb.Any]

Local in-proc transport.

func NewQUICClientTransport

func NewQUICClientTransport(cfg config.TransportConfig) (eventbus.Transport[*anypb.Any], error)

QUIC client transport.

func NewQUICServerTransport

func NewQUICServerTransport(addr, tlsCert, tlsKey string) (eventbus.Transport[*anypb.Any], error)

QUIC server transport.

func NewServerFromConfig

func NewServerFromConfig(cfg config.TransportConfig) (eventbus.Transport[*anypb.Any], error)

Config-driven server.

Types

type Local

type Local[T any] struct {
	// contains filtered or unexported fields
}

Local provides an in-proc "loopback" transport used for testing or single-process mode.

func (*Local[T]) Broadcast

func (t *Local[T]) Broadcast(e eventbus.Event[T]) error

func (*Local[T]) Close

func (t *Local[T]) Close() error

func (*Local[T]) OnRemoteEvent

func (t *Local[T]) OnRemoteEvent(fn func(eventbus.Event[T]))

func (*Local[T]) PublishRemote

func (t *Local[T]) PublishRemote(ctx context.Context, e eventbus.Event[T]) error

type QUIC

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

func NewQUICClient

func NewQUICClient(addr string, cert *tls.Certificate, tlsConfig TLSConfig) (*QUIC, error)

func NewQUICServer

func NewQUICServer(addr string, cert tls.Certificate) (*QUIC, error)

func (*QUIC) Broadcast

func (q *QUIC) Broadcast(e eventbus.Event[*anypb.Any]) error

func (*QUIC) Close

func (q *QUIC) Close() error

func (*QUIC) OnRemoteEvent

func (q *QUIC) OnRemoteEvent(fn func(eventbus.Event[*anypb.Any]))

func (*QUIC) PublishRemote

func (q *QUIC) PublishRemote(ctx context.Context, e eventbus.Event[*anypb.Any]) error

type TLSConfig

type TLSConfig struct {
	// InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name.
	InsecureSkipVerify bool
	// CAFile is the path to the CA certificate file.
	CAFile string
}

TLSConfig holds TLS configuration for the client

type Transport

type Transport = eventbus.Transport[*anypb.Any]

All transports are now strictly protobuf-based.

Jump to

Keyboard shortcuts

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