import { schema } from '@kbn/config-schema' ; import { RollingStrategy } from './strategy' ; import { NumericRollingStrategy , NumericRollingStrategyConfig , numericRollingStrategyConfigSchema , } from './numeric' ; import { RollingFileContext } from '../rolling_file_context' ; export type { RollingStrategy } from './strategy' ; export type RollingStrategyConfig = NumericRollingStrategyConfig ; const defaultStrategy = { type : 'numeric' , pattern : '-%i' , max : 7 , } ; export const rollingStrategyConfigSchema = schema . oneOf ( [ numericRollingStrategyConfigSchema ] , { defaultValue : defaultStrategy , } ) ; export const createRollingStrategy = ( config , context ) : RollingStrategy => { return new NumericRollingStrategy ( config , context ) ; } ;