github.com/NVIDIA/aistore@v1.3.23-0.20240517131212-7df6609be51d/ext/dsort/shard/shard.go (about)

     1  // Package shard provides Extract(shard), Create(shard), and associated methods
     2  // across all suppported archival formats (see cmn/archive/mime.go)
     3  /*
     4   * Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved.
     5   */
     6  package shard
     7  
     8  import "encoding/json"
     9  
    10  //
    11  // NOTE: changes in this source MAY require re-running `msgp` code generation - see docs/msgp.md for details.
    12  //
    13  
    14  // interface guard
    15  var (
    16  	_ json.Marshaler   = (*Shard)(nil)
    17  	_ json.Unmarshaler = (*Shard)(nil)
    18  )
    19  
    20  type (
    21  	// Shard represents the metadata required to construct a single shard (aka an archive file).
    22  	Shard struct {
    23  		// Size is total size of shard to be created.
    24  		Size int64 `msg:"s"`
    25  		// Records contains all metadata to construct the shard.
    26  		Records *Records `msg:"r"`
    27  		// Name determines the output name of the shard.
    28  		Name string `msg:"n"`
    29  	}
    30  )
    31  
    32  func (*Shard) MarshalJSON() ([]byte, error) { panic("should not be used") }
    33  func (*Shard) UnmarshalJSON([]byte) error   { panic("should not be used") }