github.com/NVIDIA/aistore@v1.3.23-0.20240517131212-7df6609be51d/core/meta/jsp.go (about)

     1  // Package meta: cluster-level metadata
     2  /*
     3   * Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved.
     4   */
     5  package meta
     6  
     7  import (
     8  	"github.com/NVIDIA/aistore/cmn"
     9  	"github.com/NVIDIA/aistore/cmn/jsp"
    10  )
    11  
    12  // interface guards
    13  var (
    14  	_ jsp.Opts = (*Smap)(nil)
    15  	_ jsp.Opts = (*BMD)(nil)
    16  	_ jsp.Opts = (*RMD)(nil)
    17  )
    18  
    19  // Compress, Checksum, Sign (CCS)
    20  
    21  var (
    22  	bmdJspOpts = jsp.CCSign(cmn.MetaverBMD) // ditto
    23  	rmdJspOpts = jsp.CCSign(cmn.MetaverRMD) // ditto
    24  )
    25  
    26  func (*Smap) JspOpts() jsp.Options {
    27  	opts := jsp.CCSign(cmn.MetaverSmap)
    28  	opts.OldMetaverOk = 1
    29  	return opts
    30  }
    31  
    32  func (*BMD) JspOpts() jsp.Options { return bmdJspOpts }
    33  func (*RMD) JspOpts() jsp.Options { return rmdJspOpts }