github.com/Jeffail/benthos/v3@v3.65.0/lib/stream/docs.go (about)

     1  package stream
     2  
     3  import (
     4  	"github.com/Jeffail/benthos/v3/internal/docs"
     5  )
     6  
     7  // Spec returns a docs.FieldSpec for a stream configuration.
     8  func Spec() docs.FieldSpecs {
     9  	return docs.FieldSpecs{
    10  		docs.FieldCommon("input", "An input to source messages from.").HasType(docs.FieldTypeInput),
    11  		docs.FieldCommon("buffer", "An optional buffer to store messages during transit.").HasType(docs.FieldTypeBuffer),
    12  		docs.FieldCommon("pipeline", "Describes optional processing pipelines used for mutating messages.").WithChildren(
    13  			docs.FieldInt("threads", "The number of threads to execute processing pipelines across.").HasDefault(1),
    14  			docs.FieldCommon("processors", "A list of processors to apply to messages.").Array().HasType(docs.FieldTypeProcessor),
    15  		),
    16  		docs.FieldCommon("output", "An output to sink messages to.").HasType(docs.FieldTypeOutput),
    17  	}
    18  }