Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrEmptyConfig1 = errutil.NewFactory("empty config %q")
)
errors
View Source
var Module = &cobrather.Module{ Use: "gogstash", Short: "Logstash like, written in golang", Commands: []*cobrather.Module{ cobrather.VersionModule, }, Flags: []cobrather.Flag{ flagDebug, flagInput, flagInputBasicAuthUsername, flagInputBasicAuthPassword, flagOutput, flagOutputBasicAuthUsername, flagOutputBasicAuthPassword, flagScroll, flagBulkActions, flagBulkSize, flagBulkFlushInterval, flagDelete, flagCompress, flagMaxRows, }, RunE: func(ctx context.Context, cmd *cobra.Command, args []string) error { inputElasticURL := flagInput.String() if inputElasticURL == "" { return ErrEmptyConfig1.New(nil, flagInput.Name) } outputElasticURL := flagOutput.String() if outputElasticURL == "" { return ErrEmptyConfig1.New(nil, flagOutput.Name) } scroll := int(flagScroll.Int64()) bulkActions := int(flagBulkActions.Int64()) if bulkActions < 1 { bulkActions = scroll } return esdump.ElasticDump(esdump.Options{ Debug: flagDebug.Bool(), InputElasticURL: inputElasticURL, InputBasicAuth: esdump.AuthOptions{BasicUsername: flagInputBasicAuthUsername.String(), BasicPassword: flagInputBasicAuthPassword.String()}, InputElasticSniff: false, OutputElasticURL: outputElasticURL, OutputBasicAuth: esdump.AuthOptions{BasicUsername: flagOutputBasicAuthUsername.String(), BasicPassword: flagOutputBasicAuthPassword.String()}, OutputElasticSniff: false, ScrollSize: scroll, BulkActions: bulkActions, BulkSize: int(flagBulkSize.Int64()) << 20, BulkFlushInterval: time.Duration(flagBulkFlushInterval.Int64()) * time.Second, Delete: flagDelete.Bool(), Compress: flagCompress.Bool(), MaxRows: flagMaxRows.Int64(), }) }, }
Module info
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.