Documentation
¶
Overview ¶
Package router reaches devbox daemons through Substrate's atenet-router: gRPC (devbox.v1.Daemon) and HTTP (terminal, VNC and preview WebSockets) over mTLS, with the target actor in the ate-target-actor header. A request to a suspended actor resumes it, so callers check the instance state first.
Index ¶
Constants ¶
const ( // TargetHeader selects the actor, as "<atespace>/<name>". TargetHeader = "ate-target-actor" // DefaultAddress is atenet-router's in-cluster HTTPS Service. DefaultAddress = "atenet-router.ate-system.svc:443" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Address is host:port, DefaultAddress when empty.
Address string
// CredentialBundle is a PEM file with the gateway's pod-identity key and certificate chain
// (podidentity.podcert.ate.dev/credential-bundle.pem). Re-read on every handshake.
CredentialBundle string
// TrustBundle verifies the router's serving certificate (servicedns-ca.podcert.ate.dev/trust-bundle.pem).
TrustBundle string
// ServerName overrides the TLS server name, the Address host by default.
ServerName string
// Insecure dials without TLS (tests and local development).
Insecure bool
}
Config locates atenet-router and the gateway's identity.
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router is a connection to atenet-router.
func New ¶
func New(conn grpc.ClientConnInterface, rt http.RoundTripper, baseURL string) *Router
New wraps an existing connection and HTTP transport (tests).
func (*Router) Daemon ¶
func (r *Router) Daemon(actor string) devboxv1.DaemonClient
Daemon returns a client for the daemon of an actor ("<atespace>/<name>"). Calls carry the request token of the incoming call they serve, if any.