Enforce local KV write capabilities
This commit is contained in:
parent
1ab24631cd
commit
5751748458
8 changed files with 118 additions and 10 deletions
|
|
@ -285,6 +285,8 @@ pub enum KvCommand {
|
|||
name: String,
|
||||
key: String,
|
||||
value: String,
|
||||
#[arg(long)]
|
||||
subject: Option<String>,
|
||||
},
|
||||
Get {
|
||||
name: String,
|
||||
|
|
@ -564,7 +566,17 @@ fn request_for_command(command: Command) -> Result<ControlRequest> {
|
|||
},
|
||||
Command::Kv { command } => match command {
|
||||
KvCommand::Create { name } => ControlRequest::KvCreate { name },
|
||||
KvCommand::Set { name, key, value } => ControlRequest::KvSet { name, key, value },
|
||||
KvCommand::Set {
|
||||
name,
|
||||
key,
|
||||
value,
|
||||
subject,
|
||||
} => ControlRequest::KvSet {
|
||||
name,
|
||||
key,
|
||||
value,
|
||||
subject,
|
||||
},
|
||||
KvCommand::Get { name, key } => ControlRequest::KvGet { name, key },
|
||||
},
|
||||
Command::Pubsub { command } => match command {
|
||||
|
|
|
|||
Loading…
Reference in a new issue