Documentation
¶
Index ¶
- func GetBlockSize(filesize int64, minBlockSize int64) (blockSize int64)
- func GetKVSecret(kvURL, kvSecretName string) (secret string, err error)
- func HTTPClientFactory(client *http.Client) pipeline.FactoryFunc
- func InitJobLogger(minimumLevelToLog pipeline.LogLevel)
- func Log(logLevel pipeline.LogLevel, msg string)
- func NewAzCopyLogSanitizer() pipeline.LogSanitizer
- func NewPipeline(ctx context.Context, c azblob.Credential, p Pacer, o azblob.PipelineOptions) pipeline.Pipeline
- func NewRateLimiterPolicy(ctx context.Context, pacer Pacer) pipeline.Factory
- func NewReadLogFunc(redactedURL string) func(int, error, int64, int64, bool)
- func NewTokenBucketPacer(bytesPerSecond int64, expectedBytesPerCoarseRequest int64) *tokenBucketPacer
- type ILogger
- type Pacer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBlockSize ¶
func GetKVSecret ¶
GetKVSecret returns string secret by name 'kvSecretName' in keyvault 'kvName' Uses MSI auth to login
func HTTPClientFactory ¶
func HTTPClientFactory(client *http.Client) pipeline.FactoryFunc
HTTPClientFactory returns http sender with given client
func InitJobLogger ¶
func NewAzCopyLogSanitizer ¶
func NewAzCopyLogSanitizer() pipeline.LogSanitizer
func NewPipeline ¶
func NewPipeline(ctx context.Context, c azblob.Credential, p Pacer, o azblob.PipelineOptions) pipeline.Pipeline
NewPipeline creates a blobpipeline with these options
func NewRateLimiterPolicy ¶
func NewTokenBucketPacer ¶
func NewTokenBucketPacer(bytesPerSecond int64, expectedBytesPerCoarseRequest int64) *tokenBucketPacer
* NewTokenBucketPacer creates a new pacer with given config
Types ¶
type Pacer ¶
type Pacer interface { // RequestTrafficAllocation blocks until the caller is allowed to process byteCount bytes. RequestTrafficAllocation(ctx context.Context, byteCount int64) error // UndoRequest reverses a previous request to process n bytes. Is used when // the caller did not need all of the allocation they previously requested // e.g. when they asked for enough for a big buffer, but never filled it, they would // call this method to return the unused portion. UndoRequest(byteCount int64) // GetTotalTraffic returns the cumulative count of all traffic that has been processed GetTotalTraffic() int64 Close() error }
pacer is used by callers whose activity must be controlled to a certain pace
Click to show internal directories.
Click to hide internal directories.