mirror of
https://github.com/postmannen/ctrl.git
synced 2024-12-14 12:37:31 +00:00
Removed some remaings after REQToFileNACK
This commit is contained in:
parent
5c921f0eb4
commit
4a413baf9f
4 changed files with 1 additions and 24 deletions
14
README.md
14
README.md
|
@ -327,19 +327,7 @@ The flow will be like this:
|
|||
|
||||
### Flags and configuration file
|
||||
|
||||
ctrl supports both the use of flags with values set at startup, and the use of a config file.
|
||||
|
||||
- A default config file will be created at first startup if one does not exist
|
||||
- The default config will contain default values.
|
||||
- Any value also provided via a flag will also be written to the config file.
|
||||
- If **ctrl** is restarted, the current content of the config file will be used as the new defaults.
|
||||
- If you restart ctrl without any flags specified, the values of the last run will be read from the config file.
|
||||
- If new values are provided via CLI flags, they will take **precedence** over the ones currently in the config file.
|
||||
- The new CLI flag values will be written to the config, making it the default for the next restart.
|
||||
- The config file can be edited directly, removing the need for CLI flag use.
|
||||
- To create a default config, simply:
|
||||
1. Remove the current config file (or move it).
|
||||
2. Restart ctrl. A new default config file, with default values, will be created.
|
||||
ctrl supports both the use of flags with env variables. An .env file can also be used.
|
||||
|
||||
### Schema for the messages to send into ctrl via the API's
|
||||
|
||||
|
|
|
@ -118,8 +118,6 @@ type Configuration struct {
|
|||
StartSubREQToFileAppend bool `comment:"Start subscriber for text logging"`
|
||||
// Start subscriber for writing to file
|
||||
StartSubREQToFile bool `comment:"Start subscriber for writing to file"`
|
||||
// Start subscriber for writing to file without ACK
|
||||
StartSubREQToFileNACK bool `comment:"Start subscriber for writing to file without ACK"`
|
||||
// Start subscriber for reading files to copy
|
||||
StartSubREQCopySrc bool `comment:"Start subscriber for reading files to copy"`
|
||||
// Start subscriber for writing copied files to disk
|
||||
|
@ -199,7 +197,6 @@ func NewConfiguration() *Configuration {
|
|||
flag.BoolVar(&c.StartSubREQHello, "startSubREQHello", CheckEnv("START_SUB_REQ_HELLO", c.StartSubREQHello).(bool), "true/false")
|
||||
flag.BoolVar(&c.StartSubREQToFileAppend, "startSubREQToFileAppend", CheckEnv("START_SUB_REQ_TO_FILE_APPEND", c.StartSubREQToFileAppend).(bool), "true/false")
|
||||
flag.BoolVar(&c.StartSubREQToFile, "startSubREQToFile", CheckEnv("START_SUB_REQ_TO_FILE", c.StartSubREQToFile).(bool), "true/false")
|
||||
flag.BoolVar(&c.StartSubREQToFileNACK, "startSubREQToFileNACK", CheckEnv("START_SUB_REQ_TO_FILE_NACK", c.StartSubREQToFileNACK).(bool), "true/false")
|
||||
flag.BoolVar(&c.StartSubREQCopySrc, "startSubREQCopySrc", CheckEnv("START_SUB_REQ_COPY_SRC", c.StartSubREQCopySrc).(bool), "true/false")
|
||||
flag.BoolVar(&c.StartSubREQCopyDst, "startSubREQCopyDst", CheckEnv("START_SUB_REQ_COPY_DST", c.StartSubREQCopyDst).(bool), "true/false")
|
||||
flag.BoolVar(&c.StartSubREQCliCommand, "startSubREQCliCommand", CheckEnv("START_SUB_REQ_CLI_COMMAND", c.StartSubREQCliCommand).(bool), "true/false")
|
||||
|
@ -273,7 +270,6 @@ func newConfigurationDefaults() Configuration {
|
|||
StartSubREQHello: true,
|
||||
StartSubREQToFileAppend: true,
|
||||
StartSubREQToFile: true,
|
||||
StartSubREQToFileNACK: true,
|
||||
StartSubREQCopySrc: true,
|
||||
StartSubREQCopyDst: true,
|
||||
StartSubREQCliCommand: true,
|
||||
|
|
|
@ -105,10 +105,6 @@ func (p *processes) Start(proc process) {
|
|||
proc.startup.subscriber(proc, REQToFile, nil)
|
||||
}
|
||||
|
||||
if proc.configuration.StartSubREQToFileNACK {
|
||||
proc.startup.subscriber(proc, REQToFileNACK, nil)
|
||||
}
|
||||
|
||||
if proc.configuration.StartSubREQCopySrc {
|
||||
proc.startup.subscriber(proc, REQCopySrc, nil)
|
||||
}
|
||||
|
|
|
@ -95,8 +95,6 @@ const (
|
|||
// The data field is a slice of strings where the values of the
|
||||
// slice will be written to the file.
|
||||
REQToFile Method = "REQToFile"
|
||||
// REQToFileNACK same as REQToFile but NACK.
|
||||
REQToFileNACK Method = "REQToFileNACK"
|
||||
// Initiated by the user.
|
||||
REQCopySrc Method = "REQCopySrc"
|
||||
// Initial request for file copying.
|
||||
|
@ -184,7 +182,6 @@ func (m Method) GetMethodsAvailable() MethodsAvailable {
|
|||
REQToConsole: HandlerFunc(methodREQToConsole),
|
||||
REQToFileAppend: HandlerFunc(methodREQToFileAppend),
|
||||
REQToFile: HandlerFunc(methodREQToFile),
|
||||
REQToFileNACK: HandlerFunc(methodREQToFile),
|
||||
REQCopySrc: HandlerFunc(methodREQCopySrc),
|
||||
REQCopyDst: HandlerFunc(methodREQCopyDst),
|
||||
REQSUBCopySrc: HandlerFunc(methodREQSUB),
|
||||
|
|
Loading…
Reference in a new issue