transport

package
v0.32.0 Latest Latest
Warning

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

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

Documentation

Overview

Package transport defines the protocol-agnostic surface that modeld exposes over a wire transport. Concrete transports (the grpc subpackage today; an HTTP transport later) adapt this Service to their protocol so the daemon's API is described in exactly one place.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service interface {
	RegisterBackend(ctx context.Context, backendID string, spec modeld.BackendSpec) error
	RemoveBackend(ctx context.Context, backendID string) error
	ListBackends(ctx context.Context) ([]string, error)
	ListModels(ctx context.Context, backendID string) ([]modeld.ObservedModel, error)
}

Service is the modeld API as seen by a transport. It is intentionally a thin projection of *modeld.Daemon so transports never reach into daemon state directly.

func FromDaemon

func FromDaemon(d *modeld.Daemon) Service

FromDaemon adapts a *modeld.Daemon to the Service interface.

Directories

Path Synopsis
Package grpc is the gRPC transport for modeld.
Package grpc is the gRPC transport for modeld.
modeldpb
Package modeldpb contains the modeld gRPC wire bindings.
Package modeldpb contains the modeld gRPC wire bindings.
Package leader routes follower calls to the current modeld owner advertised in the lease file.
Package leader routes follower calls to the current modeld owner advertised in the lease file.

Jump to

Keyboard shortcuts

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