Class CosRemoteSnapshotClient

java.lang.Object
io.agentscope.extensions.cos.CosRemoteSnapshotClient
All Implemented Interfaces:
io.agentscope.harness.agent.sandbox.snapshot.RemoteSnapshotClient

public class CosRemoteSnapshotClient extends Object implements io.agentscope.harness.agent.sandbox.snapshot.RemoteSnapshotClient
RemoteSnapshotClient backed by Tencent Cloud COS.
  • Constructor Details

    • CosRemoteSnapshotClient

      public CosRemoteSnapshotClient(com.qcloud.cos.COSClient cosClient, String bucketName, String keyPrefix)
      Creates a COS-backed snapshot client.
      Parameters:
      cosClient - initialized COS client
      bucketName - bucket for snapshot objects
      keyPrefix - object key prefix (optional, may be null/blank)
  • Method Details

    • upload

      public void upload(String snapshotId, InputStream data) throws Exception
      Specified by:
      upload in interface io.agentscope.harness.agent.sandbox.snapshot.RemoteSnapshotClient
      Throws:
      Exception
    • download

      public InputStream download(String snapshotId) throws Exception
      Specified by:
      download in interface io.agentscope.harness.agent.sandbox.snapshot.RemoteSnapshotClient
      Throws:
      Exception
    • exists

      public boolean exists(String snapshotId) throws Exception
      Specified by:
      exists in interface io.agentscope.harness.agent.sandbox.snapshot.RemoteSnapshotClient
      Throws:
      Exception