new BackupScheduler( cron, mocksDir, grpcMocksDir, grpcProtosDir, wsMocksDir, key, cert, configFilePath )

Description

Define a schedule and implementation for backup using config.backup.cron

Parameters
Name Type Description
cron string

cron schedule

mocksDir string

location of http mockdir to be backed up

grpcMocksDir string

location of grpc mockdir to be backed up

grpcProtosDir string

location of grpc protos dir to be backed up

wsMocksDir string

location of ws mockdir to be backed up

key string

location of server.key to be backed up

cert string

location of server.cert to be backed up

configFilePath string

location of config file to be backed up

Methods


schedule( enableHttps, enableHttp2, enablegRPC, enableWs )

Description

Create an initial back up while starting the application. Schedule further backup as specified by cron schedule in config

Parameters
Name Type Description
enableHttps boolean

Indicates whether HTTPs is enabled/disabled

enableHttp2 boolean

Indicates whether HTTP2 is enabled/disabled

enablegRPC boolean

Indicates whether gRPC is enabled/disabled

enableWs boolean

Indicates whether Websocket is enabled/disabled


createBackup( enableHttps, enableHttp2, enablegRPC, enableWs )

Description

If following protocols are not enabled, camouflage will not look for directories specific to these protocols, such as certs and grpc/mocks or grpc/protos while creating a backup Copy mocks directory, grpc/mocks and grpc/protos directories, certs directory and config file to backup folder in users' home directory

Parameters
Name Type Description
enableHttps boolean

Indicates whether HTTPs is enabled/disabled

enableHttp2 boolean

Indicates whether HTTP2 is enabled/disabled

enablegRPC boolean

Indicates whether gRPC is enabled/disabled

enableWs boolean

Indicates whether Websocket is enabled/disabled