diff --git a/libbeat/feature/bundle.go b/libbeat/feature/bundle.go index 28e5753e182e..2014dc63e5b2 100644 --- a/libbeat/feature/bundle.go +++ b/libbeat/feature/bundle.go @@ -70,7 +70,7 @@ func MustBundle(bundle ...bundleable) *Bundle { func HasStabilityPred(stabilities ...Stability) FilterFunc { return func(f Featurable) bool { for _, s := range stabilities { - if s == f.Description().Stability() { + if s == f.Description().Stability { return true } } diff --git a/libbeat/feature/bundle_test.go b/libbeat/feature/bundle_test.go index 2e65363ea147..48555524707b 100644 --- a/libbeat/feature/bundle_test.go +++ b/libbeat/feature/bundle_test.go @@ -26,9 +26,9 @@ import ( func TestBundle(t *testing.T) { factory := func() {} features := []Featurable{ - New("libbeat.outputs", "elasticsearch", factory, &Details{stability: Stable}), - New("libbeat.outputs", "edge", factory, &Details{stability: Experimental}), - New("libbeat.input", "tcp", factory, &Details{stability: Beta}), + New("libbeat.outputs", "elasticsearch", factory, Details{Stability: Stable}), + New("libbeat.outputs", "edge", factory, Details{Stability: Experimental}), + New("libbeat.input", "tcp", factory, Details{Stability: Beta}), } t.Run("Creates a new Bundle", func(t *testing.T) { @@ -36,29 +36,29 @@ func TestBundle(t *testing.T) { assert.Equal(t, 3, len(b.Features())) }) - t.Run("Filters feature based on stability", func(t *testing.T) { + t.Run("Filters feature based on Stability", func(t *testing.T) { b := NewBundle(features...) new := b.Filter(Experimental) assert.Equal(t, 1, len(new.Features())) }) - t.Run("Filters feature based on multiple different stability", func(t *testing.T) { + t.Run("Filters feature based on multiple different Stability", func(t *testing.T) { b := NewBundle(features...) new := b.Filter(Experimental, Stable) assert.Equal(t, 2, len(new.Features())) }) t.Run("Creates a new Bundle from specified feature", func(t *testing.T) { - f1 := New("libbeat.outputs", "elasticsearch", factory, &Details{stability: Stable}) + f1 := New("libbeat.outputs", "elasticsearch", factory, Details{Stability: Stable}) b := MustBundle(f1) assert.Equal(t, 1, len(b.Features())) }) t.Run("Creates a new Bundle with grouped features", func(t *testing.T) { - f1 := New("libbeat.outputs", "elasticsearch", factory, &Details{stability: Stable}) - f2 := New("libbeat.outputs", "edge", factory, &Details{stability: Experimental}) - f3 := New("libbeat.input", "tcp", factory, &Details{stability: Beta}) - f4 := New("libbeat.input", "udp", factory, &Details{stability: Beta}) + f1 := New("libbeat.outputs", "elasticsearch", factory, Details{Stability: Stable}) + f2 := New("libbeat.outputs", "edge", factory, Details{Stability: Experimental}) + f3 := New("libbeat.input", "tcp", factory, Details{Stability: Beta}) + f4 := New("libbeat.input", "udp", factory, Details{Stability: Beta}) b := MustBundle( MustBundle(f1), diff --git a/libbeat/feature/details.go b/libbeat/feature/details.go index 2454158b4455..cb9d76c79430 100644 --- a/libbeat/feature/details.go +++ b/libbeat/feature/details.go @@ -19,59 +19,24 @@ package feature import "fmt" -// Describer contains general information for a specific feature, the fields will be used to report -// useful information by the factories or any future CLI. -type Describer interface { - // Stability is the stability of the Feature, this allow the user to filter embedded functionality - // by their maturity at runtime. - // Example: Beta, Experimental, Stable or Undefined. - Stability() Stability - - // Doc is a one liner describing the current feature. - // Example: Dissect allows to define patterns to extract useful information from a string. - Doc() string - - // FullName is the human readable name of the feature. - // Example: Jolokia Discovery - FullName() string -} - // Details minimal information that you must provide when creating a feature. type Details struct { - stability Stability - doc string - fullName string -} - -// Stability is the stability of the Feature, this allow the user to filter embedded functionality -// by their maturity at runtime. -// Example: Beta, Experimental, Stable or Undefined. -func (d *Details) Stability() Stability { - return d.stability -} - -// Doc is a one liner describing the current feature. -// Example: Dissect allows to define patterns to extract useful information from a string. -func (d *Details) Doc() string { - return d.doc -} - -// FullName is the human readable name of the feature. -// Example: Jolokia Discovery -func (d *Details) FullName() string { - return d.fullName + Name string + Stability Stability + Deprecated bool + Info string // short info string + Doc string // long doc string } -func (d *Details) String() string { - return fmt.Sprintf( - "name: %s, description: %s (stability: %s)", - d.fullName, - d.doc, - d.stability, - ) +func (d Details) String() string { + fmtStr := "name: %s, description: %s (%s)" + if d.Deprecated { + fmtStr = "name: %s, description: %s (deprecated, %s)" + } + return fmt.Sprintf(fmtStr, d.Name, d.Info, d.Stability) } -// NewDetails return the minimal information a new feature must provide. -func NewDetails(fullName string, doc string, stability Stability) *Details { - return &Details{fullName: fullName, doc: doc, stability: stability} +// MakeDetails return the minimal information a new feature must provide. +func MakeDetails(fullName string, doc string, stability Stability) Details { + return Details{Name: fullName, Info: doc, Stability: stability} } diff --git a/libbeat/feature/feature.go b/libbeat/feature/feature.go index b051f07c8ca1..ec82fa2122c1 100644 --- a/libbeat/feature/feature.go +++ b/libbeat/feature/feature.go @@ -43,7 +43,7 @@ type Featurable interface { Factory() interface{} // Description return the avaiable information for a specific feature. - Description() Describer + Description() Details String() string } @@ -53,7 +53,7 @@ type Feature struct { namespace string name string factory interface{} - description Describer + description Details } // Namespace return the namespace of the feature. @@ -72,7 +72,7 @@ func (f *Feature) Factory() interface{} { } // Description return the avaiable information for a specific feature. -func (f *Feature) Description() Describer { +func (f *Feature) Description() Details { return f.description } @@ -87,7 +87,7 @@ func (f *Feature) String() string { } // New returns a new Feature. -func New(namespace, name string, factory interface{}, description Describer) *Feature { +func New(namespace, name string, factory interface{}, description Details) *Feature { return &Feature{ namespace: namespace, name: name, diff --git a/libbeat/feature/registry_test.go b/libbeat/feature/registry_test.go index 03da4c471d6d..7882e44cc4f8 100644 --- a/libbeat/feature/registry_test.go +++ b/libbeat/feature/registry_test.go @@ -23,7 +23,7 @@ import ( "github.com/stretchr/testify/assert" ) -var defaultDetails = &Details{stability: Stable} +var defaultDetails = Details{Stability: Stable} func TestRegister(t *testing.T) { f := func() {} diff --git a/libbeat/management/management.go b/libbeat/management/management.go index 5725eea77157..8299365bfe3e 100644 --- a/libbeat/management/management.go +++ b/libbeat/management/management.go @@ -52,7 +52,7 @@ type FactoryFunc func(*common.Config, *reload.Registry, uuid.UUID) (ConfigManage // Register a config manager func Register(name string, fn FactoryFunc, stability feature.Stability) { - f := feature.New(Namespace, name, fn, feature.NewDetails(name, "", stability)) + f := feature.New(Namespace, name, fn, feature.MakeDetails(name, "", stability)) feature.MustRegister(f) } diff --git a/libbeat/publisher/queue/memqueue/broker.go b/libbeat/publisher/queue/memqueue/broker.go index 34cefd6ef2a3..de0b54caba23 100644 --- a/libbeat/publisher/queue/memqueue/broker.go +++ b/libbeat/publisher/queue/memqueue/broker.go @@ -30,7 +30,7 @@ import ( // Feature exposes a memory queue. var Feature = queue.Feature("mem", create, - feature.NewDetails( + feature.MakeDetails( "Memory queue", "Buffer events in memory before sending to the output.", feature.Stable), diff --git a/libbeat/publisher/queue/queue_reg.go b/libbeat/publisher/queue/queue_reg.go index 2703bcd75878..d7690c006f3b 100644 --- a/libbeat/publisher/queue/queue_reg.go +++ b/libbeat/publisher/queue/queue_reg.go @@ -26,7 +26,7 @@ var Namespace = "libbeat.queue" // RegisterType registers a new queue type. func RegisterType(name string, fn Factory) { - f := Feature(name, fn, feature.NewDetails(name, "", feature.Undefined)) + f := Feature(name, fn, feature.MakeDetails(name, "", feature.Undefined)) feature.MustRegister(f) } @@ -45,6 +45,6 @@ func FindFactory(name string) Factory { } // Feature creates a new type of queue. -func Feature(name string, factory Factory, description feature.Describer) *feature.Feature { +func Feature(name string, factory Factory, description feature.Details) *feature.Feature { return feature.New(Namespace, name, factory, description) } diff --git a/libbeat/publisher/queue/spool/module.go b/libbeat/publisher/queue/spool/module.go index 71a43c421ecb..6e76d8033065 100644 --- a/libbeat/publisher/queue/spool/module.go +++ b/libbeat/publisher/queue/spool/module.go @@ -29,7 +29,7 @@ import ( // Feature exposes a spooling to disk queue. var Feature = queue.Feature("spool", create, - feature.NewDetails( + feature.MakeDetails( "Memory queue", "Buffer events in memory before sending to the output.", feature.Beta), diff --git a/x-pack/functionbeat/function/provider/feature.go b/x-pack/functionbeat/function/provider/feature.go index b5e56389fd2d..25e29e3788d2 100644 --- a/x-pack/functionbeat/function/provider/feature.go +++ b/x-pack/functionbeat/function/provider/feature.go @@ -17,8 +17,8 @@ func getNamespace(provider string) string { // Feature creates a new Provider feature to be added to the global registry. // The namespace will be 'functionbeat.provider' in the registry. -func Feature(name string, factory Factory, description feature.Describer) *feature.Feature { - return feature.New(namespace, name, factory, description) +func Feature(name string, factory Factory, details feature.Details) *feature.Feature { + return feature.New(namespace, name, factory, details) } // FunctionFeature Feature creates a new function feature to be added to the global registry @@ -26,9 +26,9 @@ func Feature(name string, factory Factory, description feature.Describer) *featu func FunctionFeature( provider, name string, factory FunctionFactory, - description feature.Describer, + details feature.Details, ) *feature.Feature { - return feature.New(getNamespace(provider), name, factory, description) + return feature.New(getNamespace(provider), name, factory, details) } // Builder is used to have a fluent interface to build a set of function for a specific provider, it @@ -41,8 +41,8 @@ type Builder struct { // MustCreate creates a new provider builder, it is used to define a provider and the function // it supports. -func MustCreate(name string, factory Factory, description feature.Describer) *Builder { - return &Builder{name: name, bundle: feature.NewBundle(Feature(name, factory, description))} +func MustCreate(name string, factory Factory, details feature.Details) *Builder { + return &Builder{name: name, bundle: feature.NewBundle(Feature(name, factory, details))} } // Bundle transforms the provider and the functions into a bundle feature. @@ -54,8 +54,8 @@ func (b *Builder) Bundle() *feature.Bundle { func (b *Builder) MustAddFunction( name string, factory FunctionFactory, - description feature.Describer, + details feature.Details, ) *Builder { - b.bundle = feature.MustBundle(b.bundle, FunctionFeature(b.name, name, factory, description)) + b.bundle = feature.MustBundle(b.bundle, FunctionFeature(b.name, name, factory, details)) return b } diff --git a/x-pack/functionbeat/function/provider/feature_test.go b/x-pack/functionbeat/function/provider/feature_test.go index 7873604c2edc..4a5c3056cf6f 100644 --- a/x-pack/functionbeat/function/provider/feature_test.go +++ b/x-pack/functionbeat/function/provider/feature_test.go @@ -26,12 +26,12 @@ func TestBuilder(t *testing.T) { b := MustCreate( provider, providerFactory, - feature.NewDetails("myprovider", "myprovider", feature.Experimental), + feature.MakeDetails("myprovider", "myprovider", feature.Experimental), ).MustAddFunction( "f1", fnFactory1, - feature.NewDetails("fn1 description", "fn1", feature.Experimental), - ).MustAddFunction("f2", fnFactory2, feature.NewDetails( + feature.MakeDetails("fn1 description", "fn1", feature.Experimental), + ).MustAddFunction("f2", fnFactory2, feature.MakeDetails( "fn1 description", "fn1", feature.Experimental, diff --git a/x-pack/functionbeat/function/provider/registry_test.go b/x-pack/functionbeat/function/provider/registry_test.go index 84ac481a88bd..a20925911c32 100644 --- a/x-pack/functionbeat/function/provider/registry_test.go +++ b/x-pack/functionbeat/function/provider/registry_test.go @@ -63,7 +63,7 @@ func testProviderLookup(t *testing.T) { f := Feature( name, providerFn, - feature.NewDetails(name, "provider for testing", feature.Experimental), + feature.MakeDetails(name, "provider for testing", feature.Experimental), ) t.Run("adding and retrieving a provider", withRegistry(func( @@ -115,7 +115,7 @@ func testFunctionLookup(t *testing.T) { f := Feature( name, providerFn, - feature.NewDetails(name, "provider for testing", feature.Experimental), + feature.MakeDetails(name, "provider for testing", feature.Experimental), ) fnName := "myfunc" @@ -124,7 +124,7 @@ func testFunctionLookup(t *testing.T) { return myfunction, nil } - fnFeature := FunctionFeature(name, fnName, functionFn, feature.NewDetails( + fnFeature := FunctionFeature(name, fnName, functionFn, feature.MakeDetails( name, "provider for testing", feature.Experimental, @@ -252,14 +252,14 @@ func TestFindFunctionByName(t *testing.T) { providerFn := func(log *logp.Logger, registry *Registry, config *common.Config) (Provider, error) { return myprovider, nil } - f := Feature(name, providerFn, feature.NewDetails(name, "provider for testing", feature.Experimental)) + f := Feature(name, providerFn, feature.MakeDetails(name, "provider for testing", feature.Experimental)) myfunction := &mockFunction{name} functionFn := func(provider Provider, config *common.Config) (Function, error) { return myfunction, nil } - fnFeature := FunctionFeature(name, fnName, functionFn, feature.NewDetails( + fnFeature := FunctionFeature(name, fnName, functionFn, feature.MakeDetails( name, "provider for testing", feature.Experimental, diff --git a/x-pack/functionbeat/manager/aws/aws.go b/x-pack/functionbeat/manager/aws/aws.go index 4d8f34c726b5..8e470afda76c 100644 --- a/x-pack/functionbeat/manager/aws/aws.go +++ b/x-pack/functionbeat/manager/aws/aws.go @@ -14,7 +14,7 @@ import ( var Bundle = provider.MustCreate( "aws", provider.NewDefaultProvider("aws", NewCLI, NewTemplateBuilder), - feature.NewDetails("AWS Lambda", "listen to events on AWS lambda", feature.Stable), + feature.MakeDetails("AWS Lambda", "listen to events on AWS lambda", feature.Stable), ).MustAddFunction("cloudwatch_logs", aws.NewCloudwatchLogs, aws.CloudwatchLogsDetails(), diff --git a/x-pack/functionbeat/manager/gcp/gcp.go b/x-pack/functionbeat/manager/gcp/gcp.go index f9ced9ef5d38..38d1f39b1bbe 100644 --- a/x-pack/functionbeat/manager/gcp/gcp.go +++ b/x-pack/functionbeat/manager/gcp/gcp.go @@ -14,7 +14,7 @@ import ( var Bundle = provider.MustCreate( "gcp", provider.NewDefaultProvider("gcp", NewCLI, NewTemplateBuilder), - feature.NewDetails("Google Cloud Functions", "listen to events on Google Cloud", feature.Stable), + feature.MakeDetails("Google Cloud Functions", "listen to events on Google Cloud", feature.Stable), ).MustAddFunction("pubsub", gcp.NewPubSub, gcp.PubSubDetails(), diff --git a/x-pack/functionbeat/provider/aws/aws/api_gateway_proxy.go b/x-pack/functionbeat/provider/aws/aws/api_gateway_proxy.go index 7f2aff3ee31d..8a77a3835d32 100644 --- a/x-pack/functionbeat/provider/aws/aws/api_gateway_proxy.go +++ b/x-pack/functionbeat/provider/aws/aws/api_gateway_proxy.go @@ -40,8 +40,8 @@ func NewAPIGatewayProxy(provider provider.Provider, config *common.Config) (prov } // APIGatewayProxyDetails returns the details of the feature. -func APIGatewayProxyDetails() *feature.Details { - return feature.NewDetails("API Gateway proxy trigger", "receive events from the api gateway proxy", feature.Experimental) +func APIGatewayProxyDetails() feature.Details { + return feature.MakeDetails("API Gateway proxy trigger", "receive events from the api gateway proxy", feature.Experimental) } // Run starts the lambda function and wait for web triggers. diff --git a/x-pack/functionbeat/provider/aws/aws/cloudwatch_kinesis.go b/x-pack/functionbeat/provider/aws/aws/cloudwatch_kinesis.go index 67f124e7dc70..c2e4ced04411 100644 --- a/x-pack/functionbeat/provider/aws/aws/cloudwatch_kinesis.go +++ b/x-pack/functionbeat/provider/aws/aws/cloudwatch_kinesis.go @@ -65,8 +65,8 @@ func defaultCloudwatchKinesisConfig() *CloudwatchKinesisConfig { } // CloudwatchKinesisDetails returns the details of the feature. -func CloudwatchKinesisDetails() *feature.Details { - return feature.NewDetails("Cloudwatch logs via Kinesis trigger", "receive Cloudwatch logs from a Kinesis stream", feature.Experimental) +func CloudwatchKinesisDetails() feature.Details { + return feature.MakeDetails("Cloudwatch logs via Kinesis trigger", "receive Cloudwatch logs from a Kinesis stream", feature.Experimental) } // Run starts the lambda function and wait for web triggers. diff --git a/x-pack/functionbeat/provider/aws/aws/cloudwatch_logs.go b/x-pack/functionbeat/provider/aws/aws/cloudwatch_logs.go index 6dd48802a229..d885899bd610 100644 --- a/x-pack/functionbeat/provider/aws/aws/cloudwatch_logs.go +++ b/x-pack/functionbeat/provider/aws/aws/cloudwatch_logs.go @@ -101,8 +101,8 @@ func NewCloudwatchLogs(provider provider.Provider, cfg *common.Config) (provider } // CloudwatchLogsDetails returns the details of the feature. -func CloudwatchLogsDetails() *feature.Details { - return feature.NewDetails("Cloudwatch Logs trigger", "receive events from cloudwatch logs.", feature.Stable) +func CloudwatchLogsDetails() feature.Details { + return feature.MakeDetails("Cloudwatch Logs trigger", "receive events from cloudwatch logs.", feature.Stable) } // Run start the AWS lambda handles and will transform any events received to the pipeline. diff --git a/x-pack/functionbeat/provider/aws/aws/kinesis.go b/x-pack/functionbeat/provider/aws/aws/kinesis.go index f91cbe3a0c2e..8732703106d8 100644 --- a/x-pack/functionbeat/provider/aws/aws/kinesis.go +++ b/x-pack/functionbeat/provider/aws/aws/kinesis.go @@ -128,8 +128,8 @@ func NewKinesis(provider provider.Provider, cfg *common.Config) (provider.Functi } // KinesisDetails returns the details of the feature. -func KinesisDetails() *feature.Details { - return feature.NewDetails("Kinesis trigger", "receive events from a Kinesis stream", feature.Stable) +func KinesisDetails() feature.Details { + return feature.MakeDetails("Kinesis trigger", "receive events from a Kinesis stream", feature.Stable) } // Run starts the lambda function and wait for web triggers. diff --git a/x-pack/functionbeat/provider/aws/aws/sqs.go b/x-pack/functionbeat/provider/aws/aws/sqs.go index da20e66b6443..47209fae01ad 100644 --- a/x-pack/functionbeat/provider/aws/aws/sqs.go +++ b/x-pack/functionbeat/provider/aws/aws/sqs.go @@ -63,8 +63,8 @@ func NewSQS(provider provider.Provider, cfg *common.Config) (provider.Function, } // SQSDetails returns the details of the feature. -func SQSDetails() *feature.Details { - return feature.NewDetails("SQS trigger", "receive events from a SQS queue", feature.Stable) +func SQSDetails() feature.Details { + return feature.MakeDetails("SQS trigger", "receive events from a SQS queue", feature.Stable) } // Run starts the lambda function and wait for web triggers. diff --git a/x-pack/functionbeat/provider/aws/include/feature.go b/x-pack/functionbeat/provider/aws/include/feature.go index b1c797b1afe6..0b9fd8e35d23 100644 --- a/x-pack/functionbeat/provider/aws/include/feature.go +++ b/x-pack/functionbeat/provider/aws/include/feature.go @@ -14,7 +14,7 @@ import ( var bundle = provider.MustCreate( "aws", provider.NewDefaultProvider("aws", provider.NewNullCli, provider.NewNullTemplateBuilder), - feature.NewDetails("AWS Lambda", "listen to events on AWS lambda", feature.Stable), + feature.MakeDetails("AWS Lambda", "listen to events on AWS lambda", feature.Stable), ).MustAddFunction("cloudwatch_logs", aws.NewCloudwatchLogs, aws.CloudwatchLogsDetails(), diff --git a/x-pack/functionbeat/provider/gcp/gcp/pubsub.go b/x-pack/functionbeat/provider/gcp/gcp/pubsub.go index 42bcbe2a2fe9..ab5959e8cf3b 100644 --- a/x-pack/functionbeat/provider/gcp/gcp/pubsub.go +++ b/x-pack/functionbeat/provider/gcp/gcp/pubsub.go @@ -98,8 +98,8 @@ func (p *PubSub) getEventDataFromContext(ctx context.Context) (PubSubEvent, erro } // PubSubDetails returns the details of the feature. -func PubSubDetails() *feature.Details { - return feature.NewDetails("Google Pub/Sub trigger", "receive messages from Google Pub/Sub.", feature.Stable) +func PubSubDetails() feature.Details { + return feature.MakeDetails("Google Pub/Sub trigger", "receive messages from Google Pub/Sub.", feature.Stable) } // Name returns the name of the function. diff --git a/x-pack/functionbeat/provider/gcp/gcp/storage.go b/x-pack/functionbeat/provider/gcp/gcp/storage.go index d58a45a9b4d1..08d497aa1db0 100644 --- a/x-pack/functionbeat/provider/gcp/gcp/storage.go +++ b/x-pack/functionbeat/provider/gcp/gcp/storage.go @@ -98,8 +98,8 @@ func (s *Storage) getEventDataFromContext(ctx context.Context) (StorageEventWith } // StorageDetails returns the details of the feature. -func StorageDetails() *feature.Details { - return feature.NewDetails("Google Cloud Storage trigger", "receive events from Google Cloud Storage.", feature.Stable) +func StorageDetails() feature.Details { + return feature.MakeDetails("Google Cloud Storage trigger", "receive events from Google Cloud Storage.", feature.Stable) } // Name returns the name of the function. diff --git a/x-pack/functionbeat/provider/gcp/include/feature.go b/x-pack/functionbeat/provider/gcp/include/feature.go index bb4e0b82ccba..5f14dd24c0b8 100644 --- a/x-pack/functionbeat/provider/gcp/include/feature.go +++ b/x-pack/functionbeat/provider/gcp/include/feature.go @@ -14,7 +14,7 @@ import ( var bundle = provider.MustCreate( "gcp", provider.NewDefaultProvider("gcp", provider.NewNullCli, provider.NewNullTemplateBuilder), - feature.NewDetails("Google Cloud Platform", "listen to events from Google Cloud Platform", feature.Stable), + feature.MakeDetails("Google Cloud Platform", "listen to events from Google Cloud Platform", feature.Stable), ).MustAddFunction("pubsub", gcp.NewPubSub, gcp.PubSubDetails(), diff --git a/x-pack/functionbeat/provider/local/local/local.go b/x-pack/functionbeat/provider/local/local/local.go index 0e456af87701..2efb8df02ef6 100644 --- a/x-pack/functionbeat/provider/local/local/local.go +++ b/x-pack/functionbeat/provider/local/local/local.go @@ -24,11 +24,11 @@ const stdinName = "stdin" var Bundle = provider.MustCreate( "local", provider.NewDefaultProvider("local", provider.NewNullCli, provider.NewNullTemplateBuilder), - feature.NewDetails("local events", "allows to trigger events locally.", feature.Experimental), + feature.MakeDetails("local events", "allows to trigger events locally.", feature.Experimental), ).MustAddFunction( stdinName, NewStdinFunction, - feature.NewDetails(stdinName, "read events from stdin", feature.Experimental), + feature.MakeDetails(stdinName, "read events from stdin", feature.Experimental), ).Bundle() // StdinFunction reads events from STIN and terminates when stdin is completed.