<<

NAME

Inca::AgentClient - Handles communication with Inca Agent.

SYNOPSIS

  use Inca::AgentClient;
  use Inca::ReporterManager;

  my $rm = new Inca::ReporterManager();
  # configure $rm
  my $client = new Inca::AgentClient( $rm, "inca://localhost:8090", %creds );
  my $status = $client->register();
  # will not return until Agent closes connection or fatal error

DESCRIPTION

Handles communication between the Inca reporter manager and the Inca agent. Specifically this module provides the ability to connect to an Inca agent and register the provided reporter manager via the register method. Then it waits for commands from the agent (e.g., execute suite, install reporter packages, etc.) and relays the agent's requests to the passed Inca::ReporterManager object.

CLASS METHODS

new( $rm, $uri, %args )

Class constructor which returns a new Inca::AgentClient object. The constructor must be called with a $uri to the server. The constructor may be called with any of the following attributes.

Arguments:

rm

An object of type Inca::ReporterManager which will be used to service the requests from the Inca agent.

uri

A string in the format of <scheme>://<path> containing the uri to the Inca agent where

scheme

The type of URI being represented by the string (either file, inca, or incas)

path

The location of the URI being represented (e.g., localhost:7070)

args

A list of follow on arguments for the uri type (e.g., cert, key, and trusted certificate directory for the SSL connection).

register( $id )

Register with the designated reporter agent and service commands.

Returns:

Returns true if the connection with the agent was terminated without error; false otherwise.

AUTHOR

Shava Smallen <ssmallen@sdsc.edu>

CAVEATS/WARNINGS

Describe any known problems.

<<