transport

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package transport wraps the generated Connect IngestService client with the wire policy mAPI-ng requires: the gRPC protocol (ADR-0002) over a dedicated HTTP client with an explicit timeout, zstd send-compression, and cleartext HTTP/2 (H2C) for local/dev http:// endpoints. It exposes a narrow surface (Upload, Register) so the Core recorder depends on an interface, not on Connect types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is the transport-level ingest client. It is safe for concurrent use.

func New

func New(endpoint, key string) (*Client, error)

New builds a Client for the given base endpoint URL and ingest key. An http:// scheme selects H2C (cleartext HTTP/2) for local/dev; https:// uses TLS HTTP/2. Any other scheme is rejected. The key is attached as a bearer Authorization header on every request so the collector can resolve the tenant.

func (*Client) Register

func (c *Client) Register(ctx context.Context, hs *mapingv1.Handshake) error

Register sends the one-time startup Handshake.

func (*Client) Upload

func (c *Client) Upload(ctx context.Context, req *mapingv1.UploadRequest) error

Upload sends one batched UploadRequest to the collector.

Jump to

Keyboard shortcuts

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