Skip to content

Commit

Permalink
move OpensearchConfig upper in a file
Browse files Browse the repository at this point in the history
  • Loading branch information
loosla committed Sep 20, 2024
1 parent 1ccb90d commit fab4b0b
Showing 1 changed file with 42 additions and 42 deletions.
84 changes: 42 additions & 42 deletions databases.go
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,47 @@ type KafkaConfig struct {
AutoCreateTopicsEnable *bool `json:"auto_create_topics_enable,omitempty"`
}

// OpensearchConfig holds advanced configurations for Opensearch database clusters.
type OpensearchConfig struct {
HttpMaxContentLengthBytes *int `json:"http_max_content_length_bytes,omitempty"`
HttpMaxHeaderSizeBytes *int `json:"http_max_header_size_bytes,omitempty"`
HttpMaxInitialLineLengthBytes *int `json:"http_max_initial_line_length_bytes,omitempty"`
IndicesQueryBoolMaxClauseCount *int `json:"indices_query_bool_max_clause_count,omitempty"`
IndicesFielddataCacheSizePercentage *int `json:"indices_fielddata_cache_size_percentage,omitempty"`
IndicesMemoryIndexBufferSizePercentage *int `json:"indices_memory_index_buffer_size_percentage,omitempty"`
IndicesMemoryMinIndexBufferSizeMb *int `json:"indices_memory_min_index_buffer_size_mb,omitempty"`
IndicesMemoryMaxIndexBufferSizeMb *int `json:"indices_memory_max_index_buffer_size_mb,omitempty"`
IndicesQueriesCacheSizePercentage *int `json:"indices_queries_cache_size_percentage,omitempty"`
IndicesRecoveryMaxMbPerSec *int `json:"indices_recovery_max_mb_per_sec,omitempty"`
IndicesRecoveryMaxConcurrentFileChunks *int `json:"indices_recovery_max_concurrent_file_chunks,omitempty"`
ThreadPoolSearchSize *int `json:"thread_pool_search_size,omitempty"`
ThreadPoolSearchThrottledSize *int `json:"thread_pool_search_throttled_size,omitempty"`
ThreadPoolGetSize *int `json:"thread_pool_get_size,omitempty"`
ThreadPoolAnalyzeSize *int `json:"thread_pool_analyze_size,omitempty"`
ThreadPoolWriteSize *int `json:"thread_pool_write_size,omitempty"`
ThreadPoolForceMergeSize *int `json:"thread_pool_force_merge_size,omitempty"`
ThreadPoolSearchQueueSize *int `json:"thread_pool_search_queue_size,omitempty"`
ThreadPoolSearchThrottledQueueSize *int `json:"thread_pool_search_throttled_queue_size,omitempty"`
ThreadPoolGetQueueSize *int `json:"thread_pool_get_queue_size,omitempty"`
ThreadPoolAnalyzeQueueSize *int `json:"thread_pool_analyze_queue_size,omitempty"`
ThreadPoolWriteQueueSize *int `json:"thread_pool_write_queue_size,omitempty"`
IsmEnabled *bool `json:"ism_enabled,omitempty"`
IsmHistoryEnabled *bool `json:"ism_history_enabled,omitempty"`
IsmHistoryMaxAgeHours *int `json:"ism_history_max_age_hours,omitempty"`
IsmHistoryMaxDocs *uint64 `json:"ism_history_max_docs,omitempty"`
IsmHistoryRolloverCheckPeriodHours *int `json:"ism_history_rollover_check_period_hours,omitempty"`
IsmHistoryRolloverRetentionPeriodDays *int `json:"ism_history_rollover_retention_period_days,omitempty"`
SearchMaxBuckets *int `json:"search_max_buckets,omitempty"`
ActionAutoCreateIndexEnabled *bool `json:"action_auto_create_index_enabled,omitempty"`
EnableSecurityAudit *bool `json:"enable_security_audit,omitempty"`
ActionDestructiveRequiresName *bool `json:"action_destructive_requires_name,omitempty"`
ClusterMaxShardsPerNode *int `json:"cluster_max_shards_per_node,omitempty"`
OverrideMainResponseVersion *bool `json:"override_main_response_version,omitempty"`
ScriptMaxCompilationsRate *string `json:"script_max_compilations_rate,omitempty"`
ClusterRoutingAllocationNodeConcurrentRecoveries *int `json:"cluster_routing_allocation_node_concurrent_recoveries,omitempty"`
ReindexRemoteWhitelist []string `json:"reindex_remote_whitelist,omitempty"`
}

type databaseUserRoot struct {
User *DatabaseUser `json:"user"`
}
Expand Down Expand Up @@ -1611,7 +1652,7 @@ func (svc *DatabasesServiceOp) UpdateKafkaConfig(ctx context.Context, databaseID
}
return resp, nil
}

// GetOpensearchConfig retrieves the config for a Opensearch database cluster.
func (svc *DatabasesServiceOp) GetOpensearchConfig(ctx context.Context, databaseID string) (*OpensearchConfig, *Response, error) {
path := fmt.Sprintf(databaseConfigPath, databaseID)
Expand Down Expand Up @@ -1915,44 +1956,3 @@ func (svc *DatabasesServiceOp) DeleteLogsink(ctx context.Context, databaseID, lo
}
return resp, nil
}

// OpensearchConfig holds advanced configurations for Opensearch database clusters.
type OpensearchConfig struct {
HttpMaxContentLengthBytes *int `json:"http_max_content_length_bytes,omitempty"`
HttpMaxHeaderSizeBytes *int `json:"http_max_header_size_bytes,omitempty"`
HttpMaxInitialLineLengthBytes *int `json:"http_max_initial_line_length_bytes,omitempty"`
IndicesQueryBoolMaxClauseCount *int `json:"indices_query_bool_max_clause_count,omitempty"`
IndicesFielddataCacheSizePercentage *int `json:"indices_fielddata_cache_size_percentage,omitempty"`
IndicesMemoryIndexBufferSizePercentage *int `json:"indices_memory_index_buffer_size_percentage,omitempty"`
IndicesMemoryMinIndexBufferSizeMb *int `json:"indices_memory_min_index_buffer_size_mb,omitempty"`
IndicesMemoryMaxIndexBufferSizeMb *int `json:"indices_memory_max_index_buffer_size_mb,omitempty"`
IndicesQueriesCacheSizePercentage *int `json:"indices_queries_cache_size_percentage,omitempty"`
IndicesRecoveryMaxMbPerSec *int `json:"indices_recovery_max_mb_per_sec,omitempty"`
IndicesRecoveryMaxConcurrentFileChunks *int `json:"indices_recovery_max_concurrent_file_chunks,omitempty"`
ThreadPoolSearchSize *int `json:"thread_pool_search_size,omitempty"`
ThreadPoolSearchThrottledSize *int `json:"thread_pool_search_throttled_size,omitempty"`
ThreadPoolGetSize *int `json:"thread_pool_get_size,omitempty"`
ThreadPoolAnalyzeSize *int `json:"thread_pool_analyze_size,omitempty"`
ThreadPoolWriteSize *int `json:"thread_pool_write_size,omitempty"`
ThreadPoolForceMergeSize *int `json:"thread_pool_force_merge_size,omitempty"`
ThreadPoolSearchQueueSize *int `json:"thread_pool_search_queue_size,omitempty"`
ThreadPoolSearchThrottledQueueSize *int `json:"thread_pool_search_throttled_queue_size,omitempty"`
ThreadPoolGetQueueSize *int `json:"thread_pool_get_queue_size,omitempty"`
ThreadPoolAnalyzeQueueSize *int `json:"thread_pool_analyze_queue_size,omitempty"`
ThreadPoolWriteQueueSize *int `json:"thread_pool_write_queue_size,omitempty"`
IsmEnabled *bool `json:"ism_enabled,omitempty"`
IsmHistoryEnabled *bool `json:"ism_history_enabled,omitempty"`
IsmHistoryMaxAgeHours *int `json:"ism_history_max_age_hours,omitempty"`
IsmHistoryMaxDocs *uint64 `json:"ism_history_max_docs,omitempty"`
IsmHistoryRolloverCheckPeriodHours *int `json:"ism_history_rollover_check_period_hours,omitempty"`
IsmHistoryRolloverRetentionPeriodDays *int `json:"ism_history_rollover_retention_period_days,omitempty"`
SearchMaxBuckets *int `json:"search_max_buckets,omitempty"`
ActionAutoCreateIndexEnabled *bool `json:"action_auto_create_index_enabled,omitempty"`
EnableSecurityAudit *bool `json:"enable_security_audit,omitempty"`
ActionDestructiveRequiresName *bool `json:"action_destructive_requires_name,omitempty"`
ClusterMaxShardsPerNode *int `json:"cluster_max_shards_per_node,omitempty"`
OverrideMainResponseVersion *bool `json:"override_main_response_version,omitempty"`
ScriptMaxCompilationsRate *string `json:"script_max_compilations_rate,omitempty"`
ClusterRoutingAllocationNodeConcurrentRecoveries *int `json:"cluster_routing_allocation_node_concurrent_recoveries,omitempty"`
ReindexRemoteWhitelist []string `json:"reindex_remote_whitelist,omitempty"`
}

0 comments on commit fab4b0b

Please sign in to comment.