github.com/m3db/m3@v1.5.1-0.20231129193456-75a402aa583b/src/dbnode/generated/proto/namespace/namespace.proto (about)

     1  syntax = "proto3";
     2  
     3  package namespace;
     4  
     5  import "google/protobuf/struct.proto";
     6  import "google/protobuf/wrappers.proto";
     7  import "github.com/m3db/m3/src/dbnode/generated/proto/namespace/schema.proto";
     8  
     9  message RetentionOptions {
    10      int64 retentionPeriodNanos                     = 1;
    11      int64 blockSizeNanos                           = 2;
    12      int64 bufferFutureNanos                        = 3;
    13      int64 bufferPastNanos                          = 4;
    14      bool  blockDataExpiry                          = 5;
    15      int64 blockDataExpiryAfterNotAccessPeriodNanos = 6;
    16      int64 futureRetentionPeriodNanos               = 7;
    17  }
    18  
    19  message IndexOptions {
    20      bool  enabled        = 1;
    21      int64 blockSizeNanos = 2;
    22  }
    23  
    24  message NamespaceOptions {
    25      bool bootstrapEnabled                           = 1;
    26      bool flushEnabled                               = 2;
    27      bool writesToCommitLog                          = 3;
    28      bool cleanupEnabled                             = 4;
    29      bool repairEnabled                              = 5;
    30      RetentionOptions retentionOptions               = 6;
    31      bool snapshotEnabled                            = 7;
    32      IndexOptions indexOptions                       = 8;
    33      SchemaOptions schemaOptions                     = 9;
    34      bool coldWritesEnabled                          = 10;
    35      NamespaceRuntimeOptions runtimeOptions          = 11;
    36      google.protobuf.BoolValue cacheBlocksOnRetrieve = 12;
    37      AggregationOptions aggregationOptions           = 13;
    38      StagingState stagingState                       = 14;
    39  
    40      // Use larger field ID to ensure new fields are always added before extended options.
    41      ExtendedOptions extendedOptions                 = 1000;
    42  }
    43  
    44  // AggregationOptions is a set of options for aggregating data
    45  // within the namespace.
    46  message AggregationOptions {
    47      // aggregations is a repeated field to support the ability to send aggregated data
    48      // to a namespace also receiving unaggregated data. In this case, the namespace will
    49      // have one Aggregation with aggregated set to false and another with aggregated set to true.
    50      repeated Aggregation aggregations = 1;
    51  }
    52  
    53  // Aggregation describes data points within the namespace.
    54  message Aggregation {
    55      // aggregated is true if data points are aggregated, false otherwise.
    56      bool aggregated = 1;
    57  
    58      // attributes specifies how to aggregate data when aggregated is set to true.
    59      // This field is ignored when aggregated is false and required when aggregated
    60      // is true.
    61      AggregatedAttributes attributes = 2;
    62  }
    63  
    64  // AggregatedAttributes describe how to aggregate data.
    65  message AggregatedAttributes {
    66      // resolutionNanos is the time range to aggregate data across.
    67      int64 resolutionNanos = 1;
    68      DownsampleOptions downsampleOptions = 2;
    69  }
    70  
    71  // DownsampleOptions is a set of options related to downsampling data.
    72  message DownsampleOptions {
    73      // all indicates whether to send data points to this namespace. If false,
    74      // data points must be sent via rollup/recording rules. Defaults to true.
    75      bool all = 1;
    76  }
    77  
    78  // StagingState is state related to the namespace's availability for
    79  // reads and writes.
    80  message StagingState {
    81      StagingStatus status = 1;
    82  }
    83  
    84  // StagingStatus represents the current status of the namespace.
    85  enum StagingStatus {
    86      // Namespace has an unknown staging status.
    87      UNKNOWN      = 0;
    88      // Namespace is being initialized and is not ready to receive traffic.
    89      INITIALIZING = 1;
    90      // Namespace is ready to receive traffic.
    91      READY        = 2;
    92  }
    93  
    94  message Registry {
    95      map<string, NamespaceOptions> namespaces = 1;
    96  }
    97  
    98  message NamespaceRuntimeOptions {
    99      google.protobuf.DoubleValue writeIndexingPerCPUConcurrency = 1;
   100      google.protobuf.DoubleValue flushIndexingPerCPUConcurrency = 2;
   101  }
   102  
   103  message ExtendedOptions {
   104      string type                    = 1;
   105      google.protobuf.Struct options = 2;
   106  }