Documentation ¶
Index ¶
Constants ¶
View Source
const ( DirectoryFieldName = "buffer.file.directory" NamePatternFieldName = "buffer.file.name_pattern" RotationStrategyFieldName = "buffer.file.rotation.strategy" RotationSizeHumanReadableFieldName = "buffer.file.rotation.size" CompressorFieldName = "buffer.file.compressor" AutoDeleteFieldName = "buffer.file.auto_delete" DayRotationStrategy = "day" HourRotationStrategy = "hour" SizeRotationStrategy = "size" CompressorNone = "none" CompressorTrue = "true" CompressorTarGZ = "tar_gz" CompressorZIP = "zip" CompressorLZ4 = "lz4" NamePatternDefault = "data_" + namer.UnixTimeNanoPattern + ".bin" RotationStrategyDefault = SizeRotationStrategy RotationSizeDefault = 10 * size.MiB CompressorDefault = CompressorNone AutoDeleteDefault = false )
View Source
const ( ActionFieldNameMetric = "action" CompressorFieldNameMetric = "compressor" NameFieldNameMetric = "name" ActionWriteMetric = "write" ActionReadMetric = "read" )
Variables ¶
View Source
var ( DirectoryDefault = filepath.Join(os.TempDir(), "go_app") RotationSizeHumanReadableDefault = size.FormatBinary(RotationSizeDefault) )
Functions ¶
func NewWithConfigurator ¶
func NewWithConfigurator( ctx context.Context, config *Config, configurator configurator.Configurator, appConfig *app.Config, ) (*file.File, error)
Types ¶
type Config ¶
type Config struct { Directory string NamePattern string NameForMetric string RotationStrategy string RotationSizeHumanReadable string RotationSize uint64 Compressor string AutoDelete bool }
func Configuration ¶
func Configuration(config *Config, configurator configurator.Configurator) (*Config, error)
Click to show internal directories.
Click to hide internal directories.