...

Source file src/edge-infra.dev/pkg/edge/datasync/apis/v1alpha1/miscellaneous.go

Documentation: edge-infra.dev/pkg/edge/datasync/apis/v1alpha1

     1  package v1alpha1
     2  
     3  // AttachmentConfig is the configuration for attachment storage
     4  type AttachmentConfig struct {
     5  	// Defines zlib compression level for the attachments
     6  	CompressionLevel *int `json:"compressionLevel,omitempty" ini:"compression_level"`
     7  	// specifies by their MIME type which types of attachments to compress
     8  	Compressible []string `json:"compressibleTypes,omitempty" ini:"compressible_types"`
     9  }
    10  
    11  // StatisticsConfig is the configuration for statistics calculation
    12  type StatisticsConfig struct {
    13  	// Interval between gathering statistics in seconds
    14  	Interval *int `json:"interval,omitempty" ini:"interval"`
    15  }
    16  
    17  type Algorithm string
    18  
    19  const (
    20  	Random     Algorithm = "random"
    21  	Sequential Algorithm = "sequential"
    22  	UTCRandom  Algorithm = "utc_random"
    23  	UTCID      Algorithm = "utc_id"
    24  )
    25  
    26  // UUIDConfig is the UUIDs configuration
    27  type UUIDConfig struct {
    28  	// algorithm to generate UUIDs
    29  	Algorithm *Algorithm `json:"algorithm,omitempty" ini:"algorithm"`
    30  	// UUID suffix
    31  	UTCIDSuffix *string `json:"utcIDSuffix,omitempty" ini:"utc_id_suffix"`
    32  	// maximum number of UUIDs that will be sent in a single request
    33  	MaxCount *int `json:"maxCount,omitempty" ini:"max_count"`
    34  }
    35  
    36  // VendorConfig is the configuration for vendor information
    37  type VendorConfig struct {
    38  	// distributor name
    39  	Name *string `json:"name,omitempty" ini:"name"`
    40  	// distributer version
    41  	Version *string `json:"version,omitempty" ini:"version"`
    42  }
    43  
    44  // CSPConfig is the configuration for Content Security Policy
    45  type CSPConfig struct {
    46  	// specifies whether to enable the sending of the CSP header for _utils
    47  	UtilsEnable *bool `json:"utilsEnable,omitempty" ini:"utils_enable"`
    48  	// specifies the exact header value to send for _utils
    49  	UtilsHeaderValue *string `json:"utilsHeaderValue,omitempty" ini:"utils_header_value"`
    50  	// specifies whether to enable the sending of the CSP header for attachments
    51  	AttachmentsEnable *bool `json:"attachmentsEnable,omitempty" ini:"attachments_enable"`
    52  	// specifies the exact header value to send for attachments
    53  	AttachmentsValue *string `json:"attachmentsHeaderValue,omitempty" ini:"attachments_header_value"`
    54  	// specifies whether to enable the sending of the CSP header for show list
    55  	ShowlistEnable *bool `json:"showListEnable,omitempty" ini:"showlist_enable"`
    56  	// specifies the exact header value to send for show list
    57  	ShowlistHeaderValue *string `json:"showlistHeaderValue,omitempty" ini:"showlist_header_value"`
    58  	// specifies whether to enable the sending of the CSP header
    59  	Enable *bool `json:"enable,omitempty" ini:"enable"`
    60  	// specifies the default header value to send
    61  	HeaderValue *string `json:"headerValue,omitempty" ini:"header_value"`
    62  }
    63  
    64  // PurgeConfig is the configuration for database purge
    65  type PurgeConfig struct {
    66  	// maximum number of documents allowed in a single purge request
    67  	MaxDocumentIDNumber *int `json:"maxDocumentIdNumber,omitempty" ini:"max_document_id_number"`
    68  	// maximum number of accumulated revisions allowed in a single purge request
    69  	MaxRevisionsNumber *int `json:"maxRevisionsNumber,omitempty" ini:"max_revisions_number"`
    70  	// allowed duration when index is not updated for local purge checkpoint document
    71  	IndexLagWarnSeconds *int `json:"indexLagWarnSeconds,omitempty" ini:"index_lag_warn_seconds"`
    72  }
    73  
    74  // BackgroundIndexConfig Secondary indexes in CouchDB
    75  type BackgroundIndexConfig struct {
    76  	// BatchChannels Controls number of background view builds that can be running in parallel
    77  	BatchChannels *int `json:"batch_channels,omitempty" ini:"batch_channels,omitempty"`
    78  	// IncrementalChannels Controls number of additional short jobs allowed to run concurrently with main jobs
    79  	IncrementalChannels *int `json:"incremental_channels,omitempty" ini:"incremental_channels,omitempty"`
    80  	// MaxIncrementalUpdates Controls whether an indexing job is "incremental" or not by looking at the difference in sequence numbers between the current index and the main database
    81  	MaxIncrementalUpdates *int `json:"max_incremental_updates,omitempty" ini:"max_incremental_updates,omitempty"`
    82  	// IgnoreShardsIgnoreShards tell the background indexer to skip over specific database shard files
    83  	IgnoreShards map[string]bool `json:"ignoreShards,omitempty"  ini:"ken.ignore,omitempty"`
    84  }
    85  
    86  // ReShardingConfig options for re sharding nodes
    87  type ReShardingConfig struct {
    88  	//  MaxJobs Maximum number of resharding jobs per cluster node
    89  	MaxJobs *int `json:"maxJobs,omitempty" ini:"max_jobs,omitempty"`
    90  	//  MaxHistory Each resharding job maintains a timestamped event log. This setting limits the maximum size of that log
    91  	MaxHistory *int `json:"maxHistory,omitempty" ini:"max_history,omitempty"`
    92  	//  MaxRetries How many times to retry shard splitting steps if they fail. For example, if indexing or topping off fails, it will be retried up to this many times before the whole resharding job fails
    93  	MaxRetries *int `json:"maxRetries,omitempty" ini:"max_retries,omitempty"`
    94  	// RetryInterval  How long to wait between subsequent retries
    95  	RetryInterval *int `json:"retryInterval,omitempty" ini:"retry_interval_sec,omitempty"`
    96  	//  DeleteSource Indicates if the source shard should be deleted after resharding has finished. By default, it is true
    97  	DeleteSource bool `json:"deleteSource,omitempty" ini:"delete_source,omitempty"`
    98  	//  UpdateTimeout How many seconds to wait for the shard map update operation to complete. If there is a large number of shard db changes waiting to finish replicating, it might be beneficial to increase this timeout
    99  	UpdateTimeout *int `json:"updateTimeout,omitempty" ini:"update_shard_map_timeout_sec,omitempty"`
   100  	//  SourceCloseTimeout How many seconds to wait for the source shard to close. “Close” in this context means that client requests which keep the database open have all finished
   101  	SourceCloseTimeout *int `json:"sourceCloseTimeout,omitempty" ini:"source_close_timeout_sec,omitempty"`
   102  	//  RequireNodeParam Require users to specify a node
   103  	RequireNodeParam *bool `json:"requireNodeParam,omitempty" ini:"require_node_param,omitempty"`
   104  	//  RequireRangeParam Require users to specify a range
   105  	RequireRangeParam *bool `json:"requireRangeParam,omitempty" ini:"require_range_param,omitempty"`
   106  }
   107  

View as plain text