Class: Turbopuffer::Models::NamespaceMetadata

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/turbopuffer/models/namespace_metadata.rb,
sig/turbopuffer/models/namespace_metadata.rbs

Overview

See Also:

  • Turbopuffer::Resources::Namespaces#metadata

Defined Under Namespace

Modules: Index Classes: Pinning

Constant Summary collapse

Turbopuffer =

Returns:

  • (:ShardingConfig)

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(unindexed_bytes:, status: :updating) ⇒ Object

Some parameter documentations has been truncated, see Turbopuffer::Models::NamespaceMetadata::Index::IndexUpdating for more details.

Parameters:

  • unindexed_bytes (Integer)

    The number of bytes in the namespace that are in the write-ahead log but have no

  • status (Symbol, :updating) (defaults to: :updating)


# File 'lib/turbopuffer/models/namespace_metadata.rb', line 64

Instance Attribute Details

#approx_logical_bytesInteger

The approximate number of logical bytes in the namespace.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


11
# File 'lib/turbopuffer/models/namespace_metadata.rb', line 11

required :approx_logical_bytes, Integer

#approx_row_countInteger

The approximate number of rows in the namespace.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


17
# File 'lib/turbopuffer/models/namespace_metadata.rb', line 17

required :approx_row_count, Integer

#created_atTime

The timestamp when the namespace was created.

Parameters:

  • value (Time)

Returns:

  • (Time)


23
# File 'lib/turbopuffer/models/namespace_metadata.rb', line 23

required :created_at, Time

#encryptionTurbopuffer::Models::Encryption::CustomerManaged, Turbopuffer::Models::Encryption::Default

The encryption configuration for a namespace.

Parameters:

  • value (Turbopuffer::Models::encryption)

Returns:



29
# File 'lib/turbopuffer/models/namespace_metadata.rb', line 29

required :encryption, union: -> { Turbopuffer::Encryption }

#indexTurbopuffer::Models::NamespaceMetadata::Index::IndexUpToDate, Turbopuffer::Models::NamespaceMetadata::Index::IndexUpdating

Parameters:

  • value (Turbopuffer::Models::NamespaceMetadata::index)

Returns:



34
# File 'lib/turbopuffer/models/namespace_metadata.rb', line 34

required :index, union: -> { Turbopuffer::NamespaceMetadata::Index }

#pinningTurbopuffer::Models::NamespaceMetadata::Pinning?

Configuration for namespace pinning, along with the current status of the pinned namespace.



53
# File 'lib/turbopuffer/models/namespace_metadata.rb', line 53

optional :pinning, -> { Turbopuffer::NamespaceMetadata::Pinning }

#schemaHash{Symbol=>Turbopuffer::Models::AttributeSchemaConfig}

The schema of the namespace.

Parameters:

Returns:



40
# File 'lib/turbopuffer/models/namespace_metadata.rb', line 40

required :schema, -> { Turbopuffer::Internal::Type::HashOf[Turbopuffer::AttributeSchemaConfig] }

#shardingTurbopuffer::Models::ShardingConfig?

Configuration for namespace sharding, which partitions a namespace's documents across multiple internal shards to scale indexing and query throughput beyond a single machine. Sharding can only be configured on a namespace's inaugural write, and cannot be added to or changed on an existing namespace.



62
# File 'lib/turbopuffer/models/namespace_metadata.rb', line 62

optional :sharding, -> { Turbopuffer::ShardingConfig }

#updated_atTime

The timestamp when the namespace was last modified by a write operation.

Parameters:

  • value (Time)

Returns:

  • (Time)


46
# File 'lib/turbopuffer/models/namespace_metadata.rb', line 46

required :updated_at, Time

Instance Method Details

#to_hash{

Returns:

  • ({)


55
# File 'sig/turbopuffer/models/namespace_metadata.rbs', line 55

def to_hash: -> {