pub struct AgentEngineFlags {
pub gcloud: GCloudFlags,
pub agent_engine: AgentEngineServiceFlags,
pub build: BuildFlags,
pub source: SourceFlags,
pub bin: String,
pub target: Option<CargoTarget>,
}Expand description
The flags of gadk deploy agentengine, plus gadk’s --bin and the resolved Cargo target.
Fields§
§gcloud: GCloudFlagsThe gcloud flags.
agent_engine: AgentEngineServiceFlagsThe Agent Engine service flags.
build: BuildFlagsThe build paths.
source: SourceFlagsThe source paths.
bin: Stringgadk’s --bin (not printed).
target: Option<CargoTarget>The Cargo target compute_flags resolved (not printed).
Implementations§
Source§impl AgentEngineFlags
impl AgentEngineFlags
Sourcepub fn environment_variables(&self) -> Result<Vec<EnvVar>, String>
pub fn environment_variables(&self) -> Result<Vec<EnvVar>, String>
Validates every --env entry (form NAME=VALUE, a name
matching [a-zA-Z_][a-zA-Z0-9_]*, no repeated name, a valid UTF-8 value), then returns
the defaults not overridden by an entry (when --default_env) followed by the entries
in flag order. Errors name the 1-based entry, never its contents.
Source§impl AgentEngineFlags
impl AgentEngineFlags
Sourcepub async fn compute_flags(&mut self, env: &Env) -> Result<(), String>
pub async fn compute_flags(&mut self, env: &Env) -> Result<(), String>
Computes the derived flags: the environment (validated first, before any other step),
target resolution, the shell-safe checks, the archive root,
the agentEngine_<local time>__* temp dir, the derived paths, the display name and the
--mem_model prefix. Every check runs before the temp dir is created.
Sourcepub async fn prepare_dockerfile(&self, env: &Env) -> Result<(), String>
pub async fn prepare_dockerfile(&self, env: &Env) -> Result<(), String>
Prepares the Dockerfile: reads only the receiver (the builder version from the
target’s workspace, WORKDIR /app/<workspace root below the archive root>, -p <package> --bin <exec_file>, EXPOSE/CMD from server_port), written with mode 0600.
Sourcepub async fn create_archive(&self, env: &Env) -> Result<(), String>
pub async fn create_archive(&self, env: &Env) -> Result<(), String>
Creates the archive: the sorted tar.gz of the archive root (without .git,
target, a nested temp dir and the root Dockerfile) with the generated Dockerfile
last.
Sourcepub fn memory_bank_context_spec(&self) -> Value
pub fn memory_bank_context_spec(&self) -> Value
The memory bank context spec as a ReasoningEngineContextSpec in JSON form:
memoryBankConfig.ttlConfig.defaultTtl = --mem_ttl, and
memoryBankConfig.generationConfig.model only for a non-empty --mem_model.
Sourcepub async fn deploy_to_agent_engine(&self, env: &Env) -> Result<(), String>
pub async fn deploy_to_agent_engine(&self, env: &Env) -> Result<(), String>
Creates the Reasoning Engine: CreateReasoningEngine under
projects/<p>/locations/<r>, then the operation awaited for at most 45 minutes.
Sourcepub async fn update_agent_engine(&self, env: &Env) -> Result<(), String>
pub async fn update_agent_engine(&self, env: &Env) -> Result<(), String>
Updates the Reasoning Engine: UpdateReasoningEngine of
projects/<p>/locations/<r>/reasoningEngines/<id> with the update mask in JSON
form (the environment only when AgentEngineServiceFlags::update_env, before the
memory bank’s spec.contextSpec), then the operation awaited for at most 45 minutes.
Trait Implementations§
Source§impl Clone for AgentEngineFlags
impl Clone for AgentEngineFlags
Source§impl Debug for AgentEngineFlags
impl Debug for AgentEngineFlags
Source§impl Default for AgentEngineFlags
impl Default for AgentEngineFlags
impl Eq for AgentEngineFlags
Source§impl PartialEq for AgentEngineFlags
impl PartialEq for AgentEngineFlags
impl StructuralPartialEq for AgentEngineFlags
Auto Trait Implementations§
impl Forget for AgentEngineFlags
impl Freeze for AgentEngineFlags
impl Move for AgentEngineFlags
impl RefUnwindSafe for AgentEngineFlags
impl Send for AgentEngineFlags
impl Sync for AgentEngineFlags
impl Unpin for AgentEngineFlags
impl UnsafeUnpin for AgentEngineFlags
impl UnwindSafe for AgentEngineFlags
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.