github.com/kubeshop/testkube@v1.17.23/cmd/tcl/testworkflow-toolkit/artifacts/direct_processor.go (about)

     1  // Copyright 2024 Testkube.
     2  //
     3  // Licensed as a Testkube Pro file under the Testkube Community
     4  // License (the "License"); you may not use this file except in compliance with
     5  // the License. You may obtain a copy of the License at
     6  //
     7  //	https://github.com/kubeshop/testkube/blob/main/licenses/TCL.txt
     8  
     9  package artifacts
    10  
    11  import (
    12  	"io/fs"
    13  )
    14  
    15  func NewDirectProcessor() Processor {
    16  	return &directProcessor{}
    17  }
    18  
    19  type directProcessor struct {
    20  }
    21  
    22  func (d *directProcessor) Start() error {
    23  	return nil
    24  }
    25  
    26  func (d *directProcessor) Add(uploader Uploader, path string, file fs.File, stat fs.FileInfo) error {
    27  	return uploader.Add(path, file, stat.Size())
    28  }
    29  
    30  func (d *directProcessor) End() error {
    31  	return nil
    32  }