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 ¶
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. |
Click to show internal directories.
Click to hide internal directories.