ReplicaClient is a client for writing LTX files to Alibaba Cloud OSS.
| 50 | |
| 51 | // ReplicaClient is a client for writing LTX files to Alibaba Cloud OSS. |
| 52 | type ReplicaClient struct { |
| 53 | mu sync.Mutex |
| 54 | client *oss.Client |
| 55 | uploader *oss.Uploader |
| 56 | logger *slog.Logger |
| 57 | |
| 58 | // Alibaba Cloud authentication keys. |
| 59 | AccessKeyID string |
| 60 | AccessKeySecret string |
| 61 | |
| 62 | // OSS bucket information |
| 63 | Region string |
| 64 | Bucket string |
| 65 | Path string |
| 66 | Endpoint string |
| 67 | |
| 68 | // Upload configuration |
| 69 | PartSize int64 // Part size for multipart uploads (default: 5MB) |
| 70 | Concurrency int // Number of concurrent parts to upload (default: 3) |
| 71 | |
| 72 | // MetadataConcurrency controls parallel HeadObject calls for timestamp-based restore. |
| 73 | // Higher values improve restore speed for large backup histories. |
| 74 | // Default: 50 |
| 75 | MetadataConcurrency int |
| 76 | } |
| 77 | |
| 78 | // NewReplicaClient returns a new instance of ReplicaClient. |
| 79 | func NewReplicaClient() *ReplicaClient { |
nothing calls this directly
no outgoing calls
no test coverage detected