Class PortForwardStrategy
java.lang.Object
io.agentscope.extensions.sandbox.kubernetes.client.internal.strategy.PortForwardStrategy
- All Implemented Interfaces:
ConnectionStrategy
Port-forward connection strategy — establishes a fabric8 port-forward tunnel
to the sandbox-router service for development / out-of-cluster mode.
-
Constructor Summary
ConstructorsConstructorDescriptionPortForwardStrategy(io.fabric8.kubernetes.client.KubernetesClient client, LocalTunnelConnectionConfig config) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.agentscope.extensions.sandbox.kubernetes.client.internal.strategy.ConnectionStrategy
shouldInjectRouterHeaders
-
Constructor Details
-
PortForwardStrategy
public PortForwardStrategy(io.fabric8.kubernetes.client.KubernetesClient client, LocalTunnelConnectionConfig config)
-
-
Method Details
-
connect
Description copied from interface:ConnectionStrategyDiscover and return the base URL.- Specified by:
connectin interfaceConnectionStrategy- Returns:
- the base URL (e.g.
http://127.0.0.1:12345) - Throws:
Exception- if discovery fails
-
close
public void close()Description copied from interface:ConnectionStrategyRelease any resources held by this strategy (e.g. port-forward tunnels).- Specified by:
closein interfaceConnectionStrategy
-