pub struct HttpGraphProvider { /* private fields */ }Expand description
Pulls GraphConfig from {base}/api/v1/designer/agent-graphs/{graph_id}.
Construct via HttpGraphProvider::new; call
HttpGraphProvider::graph_config per request. The inherent method
(rather than a trait) keeps this struct in greentic-aw-runtime, away from
the GraphConfigSource trait that lives in runner-host. The trait adapter
is a 5-line impl GraphConfigSource for HttpGraphProvider in runner-host’s
graph_node.rs.
Implementations§
Source§impl HttpGraphProvider
impl HttpGraphProvider
Sourcepub fn new(base_url: impl Into<String>, token: impl Into<String>) -> Self
pub fn new(base_url: impl Into<String>, token: impl Into<String>) -> Self
base_url is the admin origin (no trailing slash needed); token is a
tenant gtc_live_* key.
Mirrors crate::http_provider::HttpConfigProvider::new exactly:
10s per-request timeout, unwrap_or_default fallback on client build.
Sourcepub async fn graph_config(
&self,
_tenant: &TenantContext,
graph_id: &str,
) -> Result<GraphConfig, ConfigError>
pub async fn graph_config( &self, _tenant: &TenantContext, graph_id: &str, ) -> Result<GraphConfig, ConfigError>
Fetch the graph document for graph_id from the admin registry.
tenant is accepted for API symmetry with ConfigProvider::agent_config
but not used in the request URL (the bearer token already scopes the
request to the correct tenant, matching the agent-config provider’s
behaviour).
Auto Trait Implementations§
impl !RefUnwindSafe for HttpGraphProvider
impl !UnwindSafe for HttpGraphProvider
impl Freeze for HttpGraphProvider
impl Send for HttpGraphProvider
impl Sync for HttpGraphProvider
impl Unpin for HttpGraphProvider
impl UnsafeUnpin for HttpGraphProvider
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request