/// <summary> /// Creates a new ElasticsearchSink instance with the provided options /// </summary> /// <param name="options">Options configuring how the sink behaves, may NOT be null</param> public ElasticsearchSink(ElasticsearchSinkOptions options) : base(options.BatchPostingLimit, options.Period, options.QueueSizeLimit) { _state = ElasticsearchSinkState.Create(options); _state.DiscoverClusterVersion(); _state.RegisterTemplateIfNeeded(); }
public DurableElasticsearchSink(ElasticsearchSinkOptions options) { _state = ElasticsearchSinkState.Create(options); if (string.IsNullOrWhiteSpace(options.BufferBaseFilename)) { throw new ArgumentException("Cannot create the durable ElasticSearch sink without a buffer base file name!"); } _sink = new RollingFileSink( options.BufferBaseFilename + FileNameSuffix, _state.DurableFormatter, options.BufferFileSizeLimitBytes, null); _shipper = new ElasticsearchLogShipper(_state); }
/// <summary> /// Creates a new ElasticsearchSink instance with the provided options /// </summary> /// <param name="options">Options configuring how the sink behaves, may NOT be null</param> public ElasticsearchSink(ElasticsearchSinkOptions options) : base(options.BatchPostingLimit, options.Period) { _state = ElasticsearchSinkState.Create(options); _state.RegisterTemplateIfNeeded(); }
/// <summary> /// Creates a new ElasticsearchSink instance with the provided options /// </summary> /// <param name="options">Options configuring how the sink behaves, may NOT be null</param> public ElasticsearchSink(ElasticsearchSinkOptions options) : base(options.BatchPostingLimit, options.Period) { _state = ElasticsearchSinkState.Create(options); }