Documentation ¶
Index ¶
- Constants
- Variables
- type AerospikeCluster
- type AzureADAuth
- type AzureAuth
- type AzureSharedKeyAuth
- type AzureStorage
- type BackupConfig
- type BackupDetails
- type BackupMetadata
- type BackupPolicy
- func (p *BackupPolicy) CopySMDDisabled() *BackupPolicy
- func (p *BackupPolicy) GetFileLimitOrDefault() int
- func (p *BackupPolicy) GetParallelOrDefault() int
- func (p *BackupPolicy) GetRetryPolicyOrDefault() models.RetryPolicy
- func (p *BackupPolicy) GetSocketTimeoutOrDefault() time.Duration
- func (p *BackupPolicy) GetTotalTimeoutOrDefault() time.Duration
- func (p *BackupPolicy) IsSealedOrDefault() bool
- type BackupRoutine
- type BackupServiceConfig
- type CompressionPolicy
- type Config
- func (c *Config) AddCluster(name string, cluster *AerospikeCluster) error
- func (c *Config) AddPolicy(name string, p *BackupPolicy) error
- func (c *Config) AddRoutine(name string, r *BackupRoutine) error
- func (c *Config) AddSecretAgent(name string, agent *SecretAgent) error
- func (c *Config) AddStorage(name string, s Storage) error
- func (c *Config) BackupConfigCopy() *BackupConfig
- func (c *Config) DeleteCluster(name string) error
- func (c *Config) DeletePolicy(name string) error
- func (c *Config) DeleteRoutine(name string) error
- func (c *Config) DeleteStorage(name string) error
- func (c *Config) ResolveSecretAgent(name *string, defaultAgent *SecretAgent) (*SecretAgent, error)
- func (c *Config) Routines() map[string]*BackupRoutine
- func (c *Config) SetBackupConfig(other *BackupConfig)
- func (c *Config) ToggleRoutineDisabled(name string, isDisabled bool) error
- func (c *Config) UpdateCluster(name string, cluster *AerospikeCluster) error
- func (c *Config) UpdatePolicy(name string, p *BackupPolicy) error
- func (c *Config) UpdateRoutine(name string, r *BackupRoutine) error
- func (c *Config) UpdateStorage(name string, s Storage) error
- type Credentials
- type CurrentBackups
- type EncryptionPolicy
- type FileLoggerConfig
- type GcpStorage
- type HTTPServerConfig
- type JobStatus
- type LastBackupRun
- func (r *LastBackupRun) FullBackupTime() *time.Time
- func (r *LastBackupRun) IncrementalBackupTime() *time.Time
- func (r *LastBackupRun) LatestRun() *time.Time
- func (r *LastBackupRun) NoFullBackup() bool
- func (r *LastBackupRun) SetFullBackupTime(t *time.Time)
- func (r *LastBackupRun) SetIncrementalBackupTime(t *time.Time)
- type LocalStorage
- type LoggerConfig
- type RateLimiterConfig
- type RestoreJobID
- type RestoreJobStatus
- type RestoreNamespace
- type RestorePolicy
- func (p *RestorePolicy) GetBatchSizeOrDefault() int
- func (p *RestorePolicy) GetMaxAsyncBatchesOrDefault() int
- func (p *RestorePolicy) GetParallelOrDefault() int
- func (p *RestorePolicy) GetRetryPolicyOrDefault() *models.RetryPolicy
- func (p *RestorePolicy) GetSocketTimeoutOrDefault() time.Duration
- func (p *RestorePolicy) GetTotalTimeoutOrDefault() time.Duration
- type RestoreRequest
- type RestoreStats
- type RestoreTimestampRequest
- type RetentionPolicy
- type RunningJob
- type S3Authentication
- type S3Storage
- type SecretAgent
- type SeedNode
- type Storage
- type TLS
- type TimeBounds
Constants ¶
const ( EncryptNone = "NONE" EncryptAES128 = "AES128" EncryptAES256 = "AES256" )
Encryption modes
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AerospikeCluster ¶
type AerospikeCluster struct { // The cluster name. ClusterLabel *string // The seed nodes details. SeedNodes []SeedNode // The connection timeout. ConnTimeout *time.Duration // Whether should use "services-alternate" instead of "services" in info request during cluster tending. UseServicesAlternate *bool // The authentication details to the Aerospike cluster. Credentials *Credentials // The cluster TLS configuration. TLS *TLS // Specifies the maximum number of parallel scans per the cluster. MaxParallelScans *int // contains filtered or unexported fields }
AerospikeCluster represents the configuration for an Aerospike cluster for backup. @Description AerospikeCluster represents the configuration for an Aerospike cluster for backup.
func NewLocalAerospikeCluster ¶
func NewLocalAerospikeCluster() *AerospikeCluster
NewLocalAerospikeCluster returns a new AerospikeCluster to be used in tests.
func (*AerospikeCluster) ASClientHosts ¶
func (c *AerospikeCluster) ASClientHosts() []*as.Host
ASClientHosts builds and returns a Host list from the AerospikeCluster configuration.
func (*AerospikeCluster) ASClientPolicy ¶
func (c *AerospikeCluster) ASClientPolicy() *as.ClientPolicy
ASClientPolicy builds and returns a new ClientPolicy from the AerospikeCluster configuration.
func (*AerospikeCluster) GetAuthMode ¶
func (c *AerospikeCluster) GetAuthMode() *string
GetAuthMode safely returns the authentication mode.
func (*AerospikeCluster) GetPassword ¶
func (c *AerospikeCluster) GetPassword() *string
GetPassword tries to read and set the password once from the configured source. Returns the password value. If it fails to read the password, it will return nil and try to read again next time.
func (*AerospikeCluster) GetUser ¶
func (c *AerospikeCluster) GetUser() *string
GetUser safely returns the username.
type AzureADAuth ¶
type AzureADAuth struct { // TenantID is the Azure AD tenant (directory) ID. TenantID string // ClientID is the application (client) ID registered in Azure AD. ClientID string // ClientSecret is the secret key for the application registered in Azure AD. ClientSecret string }
AzureADAuth represents Azure Active Directory authentication for Azure Blob storage.
type AzureAuth ¶
type AzureAuth interface {
// contains filtered or unexported methods
}
AzureAuth represents the authentication methods for Azure Blob storage. This interface is implemented by AzureSharedKeyAuth and AzureADAuth.
type AzureSharedKeyAuth ¶
AzureSharedKeyAuth represents shared key authentication for Azure Blob storage.
type AzureStorage ¶
type AzureStorage struct { // Path is the root directory within the Azure Blob container where backups will be stored. Path string // Endpoint is the URL of the Azure Blob storage service. Endpoint string // ContainerName is the name of the Azure Blob container where backups will be stored. ContainerName string // Auth holds the authentication details for Azure Blob storage. // It can be nil or AzureSharedKeyAuth or AzureADAuth. Auth AzureAuth // SecretAgent configuration to fetch keyfile from a secret store (optional). SecretAgent *SecretAgent }
AzureStorage represents the configuration for Azure Blob storage.
func (*AzureStorage) String ¶
func (s *AzureStorage) String() string
type BackupConfig ¶
type BackupConfig struct { AerospikeClusters map[string]*AerospikeCluster Storage map[string]Storage // Storage is an interface BackupPolicies map[string]*BackupPolicy BackupRoutines map[string]*BackupRoutine SecretAgents map[string]*SecretAgent }
type BackupDetails ¶
type BackupDetails struct { BackupMetadata // The path to the backup files. Key string Storage Storage }
BackupDetails contains information about a backup. @Description BackupDetails contains information about a backup.
type BackupMetadata ¶
type BackupMetadata struct { // The backup time in the ISO 8601 format. Created time.Time `yaml:"created" json:"created"` // The lower time bound of backup entities in the ISO 8601 format (for incremental backups). From time.Time `yaml:"from" json:"from"` // The namespace of a backup. Namespace string `yaml:"namespace" json:"namespace"` // The total number of records backed up. RecordCount uint64 `yaml:"record-count" json:"record-count"` // The size of the backup in bytes. ByteCount uint64 `yaml:"byte-count" json:"byte-count"` // The number of backup files created. FileCount uint64 `yaml:"file-count" json:"file-count"` // The number of secondary indexes backed up. SecondaryIndexCount uint64 `yaml:"secondary-index-count" json:"secondary-index-count"` // The number of UDF files backed up. UDFCount uint64 `yaml:"udf-count" json:"udf-count"` }
BackupMetadata is an internal container for storing backup metadata. It is stored as a separate metadata file within each backup.
func NewMetadataFromBytes ¶
func NewMetadataFromBytes(data []byte) (*BackupMetadata, error)
NewMetadataFromBytes creates a new Metadata object from a byte slice
func NewMetadataFromStats ¶
func NewMetadataFromStats(stats *models.BackupStats, namespace string, from, now time.Time) BackupMetadata
type BackupPolicy ¶
type BackupPolicy struct { // Maximum number of scan calls to run in parallel. Parallel *int // Socket timeout. If this value is 0, it is set to total-timeout. // If both are 0, there is no socket idle time limit. SocketTimeout *time.Duration // Total socket timeout. Default is 0, that is, no timeout. TotalTimeout *time.Duration // RetryPolicy defines the configuration for retry attempts in case of failures. RetryPolicy *models.RetryPolicy // Specifies how long to retain full and incremental backups. RetentionPolicy *RetentionPolicy // Do not back up any record data (metadata or bin data). NoRecords *bool // Do not back up any secondary index definitions. NoIndexes *bool // Do not back up any UDF modules. NoUdfs *bool // Throttles backup write operations to the backup file(s) to not exceed the given // bandwidth in MiB/s. Bandwidth *int // Limit total returned records per second (RPS). If RPS is zero (the default), // the records-per-second limit is not applied. RecordsPerSecond *int // File size limit (in MiB) for the backup directory. If an .asb backup file crosses this size threshold, // a new backup file will be created. FileLimit *int // Encryption details. EncryptionPolicy *EncryptionPolicy // Compression details. CompressionPolicy *CompressionPolicy // Sealed determines whether backup should include keys updated during the backup process. // When true, the backup contains only records that last modified before backup started. // When false (default), records updated during backup might be included in the backup, but it's not guaranteed. Sealed *bool }
BackupPolicy represents a scheduled backup policy.
func (*BackupPolicy) CopySMDDisabled ¶
func (p *BackupPolicy) CopySMDDisabled() *BackupPolicy
CopySMDDisabled creates a new instance of the BackupPolicy struct with identical field values. New instance has NoIndexes and NoUdfs set to true.
func (*BackupPolicy) GetFileLimitOrDefault ¶
func (p *BackupPolicy) GetFileLimitOrDefault() int
func (*BackupPolicy) GetParallelOrDefault ¶
func (p *BackupPolicy) GetParallelOrDefault() int
func (*BackupPolicy) GetRetryPolicyOrDefault ¶
func (p *BackupPolicy) GetRetryPolicyOrDefault() models.RetryPolicy
func (*BackupPolicy) GetSocketTimeoutOrDefault ¶
func (p *BackupPolicy) GetSocketTimeoutOrDefault() time.Duration
func (*BackupPolicy) GetTotalTimeoutOrDefault ¶
func (p *BackupPolicy) GetTotalTimeoutOrDefault() time.Duration
func (*BackupPolicy) IsSealedOrDefault ¶
func (p *BackupPolicy) IsSealedOrDefault() bool
IsSealedOrDefault returns the value of the Sealed property. If the property is not set, it returns the default value.
type BackupRoutine ¶
type BackupRoutine struct { // The name of the corresponding backup policy. BackupPolicy *BackupPolicy // The name of the corresponding source cluster. SourceCluster *AerospikeCluster // The name of the corresponding storage provider configuration. Storage Storage // The Secret Agent configuration for the routine (optional). SecretAgent *SecretAgent // The interval for full backup as a cron expression string. IntervalCron string // The interval for incremental backup as a cron expression string (optional). IncrIntervalCron string // The list of the namespaces to back up (optional, empty list implies backup up whole cluster). Namespaces []string // The list of backup set names (optional, an empty list implies backing up all sets). SetList []string // The list of backup bin names (optional, an empty list implies backing up all bins). BinList []string // A list of Aerospike Server rack IDs to prefer when reading records for a backup. PreferRacks []int // Back up list of partition filters. Partition filters can be ranges, individual partitions, // or records after a specific digest within a single partition. // Default number of partitions to back up: 0 to 4095: all partitions. PartitionList *string // NodeList contains a list of nodes to back up. NodeList []string // Whether this routine is disabled and should not run. Disabled bool }
BackupRoutine represents a scheduled backup operation routine. @Description BackupRoutine represents a scheduled backup operation routine.
type BackupServiceConfig ¶
type BackupServiceConfig struct { // HTTPServer is the backup service HTTP server configuration. HTTPServer *HTTPServerConfig // Logger is the backup service logger configuration. Logger *LoggerConfig }
BackupServiceConfig represents the backup service configuration properties. @Description BackupServiceConfig represents the backup service configuration properties.
func (BackupServiceConfig) GetHTTPServerOrDefault ¶
func (c BackupServiceConfig) GetHTTPServerOrDefault() *HTTPServerConfig
func (BackupServiceConfig) GetLoggerOrDefault ¶
func (c BackupServiceConfig) GetLoggerOrDefault() *LoggerConfig
type CompressionPolicy ¶
type CompressionPolicy struct { // The compression mode to be used (default is NONE). Mode string // The compression level to use (or -1 if unspecified). Level int32 }
CompressionPolicy contains backup compression information. @Description CompressionPolicy contains backup compression information.
type Config ¶
type Config struct { ServiceConfig BackupServiceConfig // contains filtered or unexported fields }
Config represents the service configuration.
func (*Config) AddCluster ¶
func (c *Config) AddCluster(name string, cluster *AerospikeCluster) error
func (*Config) AddRoutine ¶
func (c *Config) AddRoutine(name string, r *BackupRoutine) error
func (*Config) AddSecretAgent ¶
func (c *Config) AddSecretAgent(name string, agent *SecretAgent) error
func (*Config) BackupConfigCopy ¶
func (c *Config) BackupConfigCopy() *BackupConfig
func (*Config) DeleteCluster ¶
func (*Config) DeletePolicy ¶
func (*Config) DeleteRoutine ¶
func (*Config) DeleteStorage ¶
func (*Config) ResolveSecretAgent ¶
func (c *Config) ResolveSecretAgent(name *string, defaultAgent *SecretAgent) (*SecretAgent, error)
func (*Config) Routines ¶
func (c *Config) Routines() map[string]*BackupRoutine
func (*Config) SetBackupConfig ¶
func (c *Config) SetBackupConfig(other *BackupConfig)
func (*Config) ToggleRoutineDisabled ¶
ToggleRoutineDisabled sets the Disabled field of the BackupRoutine based on the provided state.
func (*Config) UpdateCluster ¶
func (c *Config) UpdateCluster(name string, cluster *AerospikeCluster) error
func (*Config) UpdatePolicy ¶
func (c *Config) UpdatePolicy(name string, p *BackupPolicy) error
func (*Config) UpdateRoutine ¶
func (c *Config) UpdateRoutine(name string, r *BackupRoutine) error
type Credentials ¶
type Credentials struct { // The username for the cluster authentication. User *string // The password for the cluster authentication. // It can be either plain text or path into the secret agent. Password *string // The file path with the password string, will take precedence over the password field. PasswordPath *string // The authentication mode string (INTERNAL, EXTERNAL, PKI). AuthMode *string // The name of the configured Secret Agent to use for authentication. SecretAgent *SecretAgent }
Credentials represents authentication details to the Aerospike cluster. @Description Credentials represents authentication details to the Aerospike cluster.
type CurrentBackups ¶
type CurrentBackups struct { // Full represents the state of a full backup. Nil if no full backup is running. Full *RunningJob // Incremental represents the state of an incremental backup. Nil if no incremental backup is running. Incremental *RunningJob // LastRunTime contains information about the latest run time for both full and incremental backups. LastRunTime *LastBackupRun }
CurrentBackups represent the current state of backups (full and incremental)
type EncryptionPolicy ¶
type EncryptionPolicy struct { // The encryption mode to be used (NONE, AES128, AES256) Mode string // The path to the file containing the encryption key. KeyFile *string // The name of the environment variable containing the encryption key. KeyEnv *string // The secret keyword in Aerospike Secret Agent containing the encryption key. KeySecret *string }
EncryptionPolicy contains backup encryption information. @Description EncryptionPolicy contains backup encryption information.
type FileLoggerConfig ¶
type FileLoggerConfig struct { // Filename is the file to write logs to. Filename string // MaxSize is the maximum size in megabytes of the log file before it gets rotated. MaxSize int // MaxAge is the maximum number of days to retain old log files based on the // timestamp encoded in their filename. The default is not to remove old log files // based on age. MaxAge int // MaxBackups is the maximum number of old log files to retain. The default // is to retain all old log files. MaxBackups int // Compress determines if the rotated log files should be compressed // using gzip. The default is not to perform compression. Compress bool }
FileLoggerConfig represents the configuration for the file logger writer. @Description FileLoggerConfig represents the configuration for the file logger writer.
func (*FileLoggerConfig) GetMaxSizeOrDefault ¶
func (f *FileLoggerConfig) GetMaxSizeOrDefault() int
type GcpStorage ¶
type GcpStorage struct { // KeyFile is the path to the JSON file containing the Google Cloud service account key. // This file is used for authentication with GCP services. KeyFile string // KeyJSON is the contents of the Google Cloud service account key. KeyJSON string // BucketName is the name of the GCP bucket where backups will be stored. BucketName string // Path is the root directory within the GCS bucket where backups will be stored. Path string // Endpoint is an alternative URL for the GCS API. // This should only be used for testing or in specific non-production scenarios. Endpoint string // SecretAgent configuration to fetch keyfile from a secret store (optional). SecretAgent *SecretAgent }
func (*GcpStorage) String ¶
func (s *GcpStorage) String() string
type HTTPServerConfig ¶
type HTTPServerConfig struct { // The address to listen on. Address *string // The port to listen on. Port *int // HTTP rate limiter configuration. Rate *RateLimiterConfig // ContextPath customizes path for the API endpoints. ContextPath *string // Timeout for http server operations. Timeout *time.Duration }
HTTPServerConfig represents the service's HTTP server configuration. @Description HTTPServerConfig represents the service's HTTP server configuration.
func (*HTTPServerConfig) GetAddressOrDefault ¶
func (s *HTTPServerConfig) GetAddressOrDefault() string
GetAddressOrDefault returns the value of the Address property. If the property is not set, it returns the default value.
func (*HTTPServerConfig) GetContextPathOrDefault ¶
func (s *HTTPServerConfig) GetContextPathOrDefault() string
GetContextPathOrDefault returns the value of the ContextPath property. If the property is not set, it returns the default value.
func (*HTTPServerConfig) GetPortOrDefault ¶
func (s *HTTPServerConfig) GetPortOrDefault() int
GetPortOrDefault returns the value of the Port property. If the property is not set, it returns the default value.
func (*HTTPServerConfig) GetRateOrDefault ¶
func (s *HTTPServerConfig) GetRateOrDefault() *RateLimiterConfig
GetRateOrDefault returns the value of the Rate property. If the property is not set, it returns the default value.
func (*HTTPServerConfig) GetTimeoutOrDefault ¶
func (s *HTTPServerConfig) GetTimeoutOrDefault() time.Duration
GetTimeoutOrDefault returns the value of the Timeout property. If the property is not set, it returns the default value = 5s.
type LastBackupRun ¶
type LastBackupRun struct {
// contains filtered or unexported fields
}
LastBackupRun stores the last run times for both full and incremental backups.
func NewLastBackupRun ¶
func NewLastBackupRun(lastFullBackup *time.Time, lastIncrBackup *time.Time) *LastBackupRun
func (*LastBackupRun) FullBackupTime ¶
func (r *LastBackupRun) FullBackupTime() *time.Time
func (*LastBackupRun) IncrementalBackupTime ¶
func (r *LastBackupRun) IncrementalBackupTime() *time.Time
func (*LastBackupRun) LatestRun ¶
func (r *LastBackupRun) LatestRun() *time.Time
func (*LastBackupRun) NoFullBackup ¶
func (r *LastBackupRun) NoFullBackup() bool
func (*LastBackupRun) SetFullBackupTime ¶
func (r *LastBackupRun) SetFullBackupTime(t *time.Time)
func (*LastBackupRun) SetIncrementalBackupTime ¶
func (r *LastBackupRun) SetIncrementalBackupTime(t *time.Time)
type LocalStorage ¶
type LocalStorage struct { // Path is the root directory where backups will be stored locally. Path string }
func (*LocalStorage) String ¶
func (s *LocalStorage) String() string
type LoggerConfig ¶
type LoggerConfig struct { // Level is the logger level. Level *string // Format is the logger format (PLAIN, JSON). Format *string // Whether to enable logging to the standard output. StdoutWriter *bool // File writer logging configuration. FileWriter *FileLoggerConfig }
func (*LoggerConfig) GetFormatOrDefault ¶
func (l *LoggerConfig) GetFormatOrDefault() string
GetFormatOrDefault returns the value of the Format property. If the property is not set, it returns the default value.
func (*LoggerConfig) GetLevelOrDefault ¶
func (l *LoggerConfig) GetLevelOrDefault() string
GetLevelOrDefault returns the value of the Level property. If the property is not set, it returns the default value.
func (*LoggerConfig) GetStdoutWriterOrDefault ¶
func (l *LoggerConfig) GetStdoutWriterOrDefault() bool
GetStdoutWriterOrDefault returns the value of the StdoutWriter property. If the property is not set, it returns the default value.
type RateLimiterConfig ¶
type RateLimiterConfig struct { // Rate limiter tokens per second threshold. Tps *int // Rate limiter token bucket size (bursts threshold). Size *int // The list of ips to whitelist in rate limiting. WhiteList []string }
RateLimiterConfig represents the service's HTTP server rate limiter configuration. @Description RateLimiterConfig is the HTTP server rate limiter configuration.
func (*RateLimiterConfig) GetSizeOrDefault ¶
func (r *RateLimiterConfig) GetSizeOrDefault() int
GetSizeOrDefault returns the value of the Size property. If the property is not set, it returns the default value.
func (*RateLimiterConfig) GetTpsOrDefault ¶
func (r *RateLimiterConfig) GetTpsOrDefault() int
GetTpsOrDefault returns the value of the Tps property. If the property is not set, it returns the default value.
func (*RateLimiterConfig) GetWhiteListOrDefault ¶
func (r *RateLimiterConfig) GetWhiteListOrDefault() []string
GetWhiteListOrDefault returns the value of the WhiteList property. If the property is not set, it returns the default value.
type RestoreJobStatus ¶
type RestoreJobStatus struct { RestoreStats CurrentRestore *RunningJob Status JobStatus Error string }
RestoreJobStatus represents a restore job status. @Description RestoreJobStatus represents a restore job status.
type RestoreNamespace ¶
type RestoreNamespace struct { // Original namespace name. Source *string // Destination namespace name. Destination *string }
RestoreNamespace specifies an alternative namespace name for the restore operation, where Source is the original namespace name and Destination is the namespace name to which the backup data is to be restored.
@Description RestoreNamespace specifies an alternative namespace name for the restore @Description operation.
type RestorePolicy ¶
type RestorePolicy struct { // The number of concurrent record readers from backup files. Default: 20 Parallel *int // Do not restore any record data (metadata or bin data). // By default, record data, secondary index definitions, and UDF modules // will be restored. NoRecords *bool // Do not restore any secondary index definitions. NoIndexes *bool // Do not restore any UDF modules. NoUdfs *bool // Socket timeout for write transactions. SocketTimeout *time.Duration // Total socket timeout for write transactions. TotalTimeout *time.Duration // Disables the use of batch writes when restoring records to the Aerospike cluster. // By default, the cluster is checked for batch write support. DisableBatchWrites *bool // The max number of outstanding async record batch write calls at a time. MaxAsyncBatches *int // The max allowed number of records per an async batch write call. // Default is 128 with batch writes enabled, or 16 without batch writes. BatchSize *int // Namespace details for the restore operation. // By default, the data is restored to the namespace from which it was taken. Namespace *RestoreNamespace // The sets to restore (optional, an empty list implies restoring all sets). SetList []string // The bins to restore (optional, an empty list implies restoring all bins). BinList []string // Replace records. This controls how records from the backup overwrite existing records in // the namespace. By default, restoring a record from a backup only replaces the bins // contained in the backup; all other bins of an existing record remain untouched. Replace *bool // Existing records take precedence. With this option, only records that do not exist in // the namespace are restored, regardless of generation numbers. If a record exists in // the namespace, the record from the backup is ignored. Unique *bool // Records from backups take precedence. This option disables the generation check. // With this option, records from the backup always overwrite records that already exist in // the namespace, regardless of generation numbers. NoGeneration *bool // Throttles read operations from the backup file(s) to not exceed the given I/O bandwidth in bytes/sec. Bandwidth *int // Throttles read operations from the backup file(s) to not exceed the given number of transactions // per second. Tps *int // Encryption details. EncryptionPolicy *EncryptionPolicy // Compression details. CompressionPolicy *CompressionPolicy // Configuration of retries for each restore write operation. RetryPolicy *models.RetryPolicy // Amount of extra time-to-live to add to records that have expirable void-times. // Must be set in seconds. ExtraTTL *int64 }
RestorePolicy represents a policy for the restore operation. @Description RestorePolicy represents a policy for the restore operation.
func (*RestorePolicy) GetBatchSizeOrDefault ¶
func (p *RestorePolicy) GetBatchSizeOrDefault() int
func (*RestorePolicy) GetMaxAsyncBatchesOrDefault ¶
func (p *RestorePolicy) GetMaxAsyncBatchesOrDefault() int
func (*RestorePolicy) GetParallelOrDefault ¶
func (p *RestorePolicy) GetParallelOrDefault() int
func (*RestorePolicy) GetRetryPolicyOrDefault ¶
func (p *RestorePolicy) GetRetryPolicyOrDefault() *models.RetryPolicy
func (*RestorePolicy) GetSocketTimeoutOrDefault ¶
func (p *RestorePolicy) GetSocketTimeoutOrDefault() time.Duration
func (*RestorePolicy) GetTotalTimeoutOrDefault ¶
func (p *RestorePolicy) GetTotalTimeoutOrDefault() time.Duration
type RestoreRequest ¶
type RestoreRequest struct { DestinationCluster *AerospikeCluster Policy *RestorePolicy SourceStorage Storage SecretAgent *SecretAgent BackupDataPath string // path to the backup data }
RestoreRequest represents a restore operation request. @Description RestoreRequest represents a restore operation request.
func NewRestoreRequest ¶
func NewRestoreRequest( destinationCluster *AerospikeCluster, policy *RestorePolicy, sourceStorage Storage, secretAgent *SecretAgent, backupDataPath string, ) *RestoreRequest
NewRestoreRequest creates a new RestoreRequest.
func (RestoreRequest) String ¶
func (r RestoreRequest) String() string
String satisfies the fmt.Stringer interface.
type RestoreStats ¶
type RestoreStats struct { ReadRecords uint64 TotalBytes uint64 ExpiredRecords uint64 SkippedRecords uint64 IgnoredRecords uint64 InsertedRecords uint64 ExistedRecords uint64 FresherRecords uint64 IndexCount uint64 UDFCount uint64 }
RestoreStats represents the statistics of a restore operation.
type RestoreTimestampRequest ¶
type RestoreTimestampRequest struct { // The details of the Aerospike destination cluster. DestinationCluster *AerospikeCluster // Restore policy to use in the operation. Policy *RestorePolicy // Secret Agent configuration (optional). SecretAgent *SecretAgent // Required epoch time for recovery. The closest backup before the timestamp will be applied. Time time.Time // The backup routine name. RoutineName string }
RestoreTimestampRequest represents a restore by timestamp operation request. @Description RestoreTimestampRequest represents a restore by timestamp operation request.
func (RestoreTimestampRequest) String ¶
func (r RestoreTimestampRequest) String() string
String satisfies the fmt.Stringer interface.
type RetentionPolicy ¶
type RunningJob ¶
type RunningJob struct { // TotalRecords: the total number of records to be processed. TotalRecords uint64 // DoneRecords: the number of records that have been successfully done. DoneRecords uint64 // StartTime: the time when the backup operation started. StartTime time.Time // PercentageDone: the progress of the backup operation as a percentage. PercentageDone uint // EstimatedEndTime: the estimated time when the backup operation will be completed. // A nil value indicates that the estimation is not available yet. EstimatedEndTime *time.Time }
RunningJob tracks progress of currently running job. @Description RunningJob tracks progress of currently running job.
type S3Authentication ¶
type S3Authentication struct { KeyIDSecret string AccessKeySecret string SecretAgent *SecretAgent }
func (*S3Authentication) ReadSecrets ¶
func (a *S3Authentication) ReadSecrets() (keyID, accessKey string, err error)
type S3Storage ¶
type S3Storage struct { // Path is the root directory within the S3 bucket where backups will be stored. // It should not include the bucket name. Path string // Bucket is the name of the S3 bucket where backups will be stored. Bucket string // S3Region is the AWS region where the S3 bucket is located. S3Region string // S3Profile is the name of the AWS credentials profile to use. S3Profile string // S3EndpointOverride is used to specify a custom S3 endpoint. S3EndpointOverride *string // S3LogLevel controls the verbosity of the AWS SDK logging. // Valid values are: OFF, FATAL, ERROR, WARN, INFO, DEBUG, TRACE. S3LogLevel *string // MinPartSize is the minimum size in bytes for multipart upload parts. MinPartSize int // MaxConnsPerHost limits the number of concurrent connections to S3. MaxConnsPerHost int // Optional authentication. Auth *S3Authentication }
type SecretAgent ¶
type SecretAgent struct { // Connection type: tcp, unix. ConnectionType string // Address of the Secret Agent. Address string // Port the Secret Agent is running on. Port *int // Timeout in milliseconds. Timeout *int // The path to a trusted CA certificate file in PEM format. TLSCAString *string // Flag that shows if secret agent responses are encrypted with base64. IsBase64 *bool // contains filtered or unexported fields }
SecretAgent represents the configuration of an Aerospike Secret Agent for a backup/restore operation. Aerospike Secret Agent acts as a proxy layer between Aerospike server and one or more external secrets management services, fetching secrets on behalf of the server.
@Description SecretAgent represents the configuration of an Aerospike Secret Agent @Description for a backup/restore operation.
func (*SecretAgent) Read ¶
func (s *SecretAgent) Read(path string) (string, error)
Read reads the secret at the given path using the Secret Agent. If no secret agent is configured, it returns the original path. If given path is not SA path (not starts with "secrets:"), it returns the original path.
func (*SecretAgent) ToSecretAgentConfig ¶
func (s *SecretAgent) ToSecretAgentConfig() *backup.SecretAgentConfig
type SeedNode ¶
type SeedNode struct { // The host name of the node. HostName string // The port of the node. Port int32 // TLS certificate name used for secure connections (if enabled). TLSName string }
SeedNode represents details of a node in the Aerospike cluster. @Description SeedNode represents details of a node in the Aerospike cluster.
type Storage ¶
type Storage interface {
// contains filtered or unexported methods
}
Storage represents the configuration for a backup storage details. This interface is implemented by all specific storage types.
type TLS ¶
type TLS struct { // Path to a trusted CA certificate file. CAFile *string // Path to a directory of trusted CA certificates. CAPath *string // The default TLS name used to authenticate each TLS socket connection. Name *string // TLS protocol selection criteria. This format is the same as Apache's SSL Protocol. Protocols *string // TLS cipher selection criteria. The format is the same as OpenSSL's Cipher List Format. CipherSuite *string // Path to the key for mutual authentication (if Aerospike cluster supports it). Keyfile *string // Password to load protected TLS-keyfile (env:VAR, file:PATH, PASSWORD). KeyfilePassword *string // Path to the chain file for mutual authentication (if Aerospike Cluster supports it). Certfile *string }
TLS represents the Aerospike cluster TLS configuration options. @Description TLS represents the Aerospike cluster TLS configuration options.
type TimeBounds ¶
TimeBounds represents a period of time between two timestamps.
func NewTimeBounds ¶
func NewTimeBounds(fromTime, toTime *time.Time) (TimeBounds, error)
NewTimeBounds creates a new TimeBounds using provided fromTime and toTime values.
func NewTimeBoundsFrom ¶
func NewTimeBoundsFrom(fromTime time.Time) TimeBounds
NewTimeBoundsFrom creates a new TimeBounds from the provided fromTime.
func NewTimeBoundsTo ¶
func NewTimeBoundsTo(toTime time.Time) TimeBounds
NewTimeBoundsTo creates a new TimeBounds until the provided toTime.
func (*TimeBounds) Contains ¶
func (tb *TimeBounds) Contains(value time.Time) bool
Contains verifies if the given value lies within FromTime (inclusive) and ToTime (exclusive).
func (*TimeBounds) String ¶
func (tb *TimeBounds) String() string
String implements the Stringer interface.
Source Files ¶
- aerospike_cluster.go
- backup_details.go
- backup_policy.go
- backup_routine.go
- backup_service_config.go
- compression_policy.go
- config.go
- config_default.go
- current_backup.go
- encryption_policy.go
- http_server_config.go
- last_backup_run.go
- logger_config.go
- restore_namespace.go
- restore_policy.go
- restore_request.go
- restore_result.go
- secret_agent.go
- storage_azure.go
- storage_gcp.go
- storage_local.go
- storage_s3.go
- time_bounds.go