11package types
22
3- // AgentStatusResponse contains the current status of the portal-tunnel agent daemon.
43type AgentStatusResponse struct {
54 ConfigPath string `json:"config_path,omitempty"`
65 ControlAddr string `json:"control_addr"`
76 WalletAddress string `json:"wallet_address,omitempty"`
87 Tunnels []AgentTunnelStatus `json:"tunnels,omitempty"`
98}
109
11- // AgentTunnelStatus represents the runtime state of a single managed tunnel.
1210type AgentTunnelStatus struct {
1311 ID string `json:"id"`
1412 Name string `json:"name,omitempty"`
@@ -30,15 +28,13 @@ type AgentTunnelStatus struct {
3028 Relays []AgentRelayStatus `json:"relays,omitempty"`
3129}
3230
33- // AgentHTTPRoute defines an HTTP routing rule for paid or public endpoints.
3431type AgentHTTPRoute struct {
3532 Prefix string `json:"prefix"`
3633 Upstream string `json:"upstream"`
3734 Methods []string `json:"methods,omitempty"`
3835 Amount string `json:"amount,omitempty"`
3936}
4037
41- // AgentRelayStatus reports the connection state and capabilities of a relay.
4238type AgentRelayStatus struct {
4339 RelayURL string `json:"relay_url"`
4440 PublicURL string `json:"public_url,omitempty"`
@@ -52,7 +48,6 @@ type AgentRelayStatus struct {
5248 SupportsTCP bool `json:"supports_tcp"`
5349}
5450
55- // AgentTunnelRequest describes a tunnel configuration submitted to the agent API.
5651type AgentTunnelRequest struct {
5752 ID string `json:"id"`
5853 Name string `json:"name,omitempty"`
@@ -69,17 +64,14 @@ type AgentTunnelRequest struct {
6964 X402Endpoints []string `json:"x402_endpoints,omitempty"`
7065}
7166
72- // AgentRelayRequest identifies a relay by URL for add/remove operations.
7367type AgentRelayRequest struct {
7468 RelayURL string `json:"relay_url"`
7569}
7670
77- // AgentMultiHopRequest configures explicit multi-hop relay paths.
7871type AgentMultiHopRequest struct {
7972 Relays []string `json:"relays"`
8073}
8174
82- // AgentTunnelUpdateRequest applies partial updates to a running tunnel's configuration.
8375type AgentTunnelUpdateRequest struct {
8476 MaxActiveRelays * int `json:"max_active_relays,omitempty"`
8577 Metadata * AgentMetadataRequest `json:"metadata,omitempty"`
@@ -90,7 +82,6 @@ func (r AgentTunnelUpdateRequest) Empty() bool {
9082 (r .Metadata == nil || r .Metadata .Empty ())
9183}
9284
93- // AgentMetadataRequest holds partial metadata updates for a tunnel.
9485type AgentMetadataRequest struct {
9586 Description * string `json:"description,omitempty"`
9687 Owner * string `json:"owner,omitempty"`
0 commit comments