Class OssRemoteSnapshotClient

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

public class OssRemoteSnapshotClient extends Object implements io.agentscope.harness.agent.sandbox.snapshot.RemoteSnapshotClient
RemoteSnapshotClient backed by Alibaba Cloud OSS.
  • Constructor Details

    • OssRemoteSnapshotClient

      public OssRemoteSnapshotClient(com.aliyun.oss.OSS ossClient, String bucketName, String keyPrefix)
      Creates an OSS-backed snapshot client.
      Parameters:
      ossClient - initialized OSS 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