github.com/NVIDIA/aistore@v1.3.23-0.20240517131212-7df6609be51d/cmn/cos/context.go (about)

     1  // Package cos provides common low-level types and utilities for all aistore projects.
     2  /*
     3   * Copyright (c) 2018-2021, NVIDIA CORPORATION. All rights reserved.
     4   */
     5  package cos
     6  
     7  import (
     8  	"io"
     9  )
    10  
    11  type (
    12  	// Declare a new type for Context field names.
    13  	contextID string
    14  
    15  	ReadWrapperFunc func(r io.ReadCloser) io.ReadCloser
    16  	SetSizeFunc     func(size int64)
    17  )
    18  
    19  const (
    20  	CtxReadWrapper contextID = "readWrapper" // context key for ReadWrapperFunc
    21  	CtxSetSize     contextID = "setSize"     // context key for SetSizeFunc
    22  	CtxOriginalURL contextID = "origURL"     // context key for OriginalURL for HTTP cloud
    23  )