EveClient
NexusLabs.Eve¶
EveClient Class¶
Calls the stable HTTP routes exposed by one deployed eve agent.
Inheritance System.Object 🡒 EveClient
Constructors¶
EveClient(HttpMessageInvoker, EveClientOptions) Constructor¶
Initializes a client with a caller-owned HTTP transport.
public EveClient(System.Net.Http.HttpMessageInvoker transport, NexusLabs.Eve.EveClientOptions options);
Parameters¶
transport System.Net.Http.HttpMessageInvoker
The transport used for all requests. The caller retains ownership and must keep it alive while sessions or response streams are active.
options EveClientOptions
The host, authentication, headers, and retry options.
Methods¶
EveClient.CreateSession() Method¶
Creates a handle for a fresh conversation.
Returns¶
EveSession
A session whose first send creates the remote run.
EveClient.CreateSession(EveSessionState) Method¶
Creates a handle from a previously persisted session cursor.
Parameters¶
state EveSessionState
The session state to resume.
Returns¶
EveSession
A session initialized from the supplied cursor.
EveClient.CreateSession(string) Method¶
Creates a session from a continuation token when no stream cursor was persisted.
Parameters¶
continuationToken System.String
The channel-owned continuation token.
Returns¶
EveSession
A resumable session with a zero stream cursor.
EveClient.GetHealthAsync(CancellationToken) Method¶
Checks whether the eve deployment is ready.
public System.Threading.Tasks.Task<NexusLabs.Eve.EveHealthStatus> GetHealthAsync(System.Threading.CancellationToken cancellationToken);
Parameters¶
cancellationToken System.Threading.CancellationToken
Cancels the request.
Returns¶
System.Threading.Tasks.Task<EveHealthStatus>
The validated health payload.
Exceptions¶
EveClientException
The server returned a non-successful status.
EveProtocolException
The response did not match the health contract.
EveClient.GetInfoAsync(CancellationToken) Method¶
Fetches and validates the agent inspection payload.
public System.Threading.Tasks.Task<NexusLabs.Eve.EveAgentInfo> GetInfoAsync(System.Threading.CancellationToken cancellationToken);
Parameters¶
cancellationToken System.Threading.CancellationToken
Cancels the request.
Returns¶
System.Threading.Tasks.Task<EveAgentInfo>
Validated identity fields and the complete raw agent-info document.
Exceptions¶
EveClientException
The server returned a non-successful status.
EveProtocolException
The body was not a recognized agent-info payload.
EveClient.SendRawAsync(HttpRequestMessage, CancellationToken) Method¶
Sends a caller-owned request against a relative path on this eve target. Client headers and authentication are applied before sending.
public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> SendRawAsync(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken);
Parameters¶
request System.Net.Http.HttpRequestMessage
The request to send. Its URI must be relative. The request remains owned by the caller.
cancellationToken System.Threading.CancellationToken
Cancels the request.
Returns¶
System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
The raw response. The caller must dispose it. Non-successful statuses are returned unchanged.