summaryrefslogtreecommitdiff
path: root/crates/vcs_actions/src/actions/local_actions.rs
blob: 0e210a7f67bb5d8bf596485a8905856337e9a599 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::net::SocketAddr;

use action_system::{action::ActionContext, action_gen};
use tcp_connection::error::TcpTargetError;

#[action_gen(local)]
pub async fn set_upstream_vault_action(
    ctx: ActionContext,
    _upstream: SocketAddr,
) -> Result<(), TcpTargetError> {
    if ctx.is_remote() {
        return Err(TcpTargetError::NotLocal(
            "Action was not invoked on the local machine".to_string(),
        ));
    }
    Ok(())
}