Here are the prototypes with comments:

/**
 * This function retrieves an array of lookup keys for client contexts
loaded in
 * traffic server. Given a 2-level mapping for client contexts, every 2
lookup keys
 * can be used to locate and identify 1 context.
 * @param n Allocated size for result array.
 * @param result Const char pointer arrays to be filled with lookup keys.
 * @param actual Total number of lookup keys.
 */
TSReturnCode TSSslClientContextsGet(int n, const char **result, int
*actual);

/**
 * This function returns the client context corresponding to the lookup
keys provided.
 * User should call TSSslClientContextsGet() first to determine which
lookup keys are
 * present before querying for them.
 * Returns valid TSSslContext on success and nullptr on failure.
 * @param first_key Key string for the top level.
 * @param second_key Key string for the second level.
 */
TSSslContext TSSslClientContextFind(const char *first_key, const char
*second_key);


[image: work-eat-sleep--400090.jpg]

*Zeyuan Yu*
Software Development Engineer, Verizon Media Group

work: 217.369.5086

personal: 217.898.1085


On Wed, May 1, 2019 at 4:59 PM Alan Carroll
<solidwallofc...@verizonmedia.com.invalid> wrote:

> Um, any detail on what the parameters are? Doxygen comments should be the
> minimum provided.
>
> On Wed, May 1, 2019 at 2:55 PM Zeyuan Yu <zeyu...@gmail.com> wrote:
>
> > Alan and Walt pointed out the API needs to be C. Here are the new
> > prototypes:
> >
> > TSReturnCode TSSslClientContextsGet(int n, const char **result, int
> > *actual)
> > ;
> > TSSslContext TSSslClientContextFind(const char *name);
> >
> >
> > [image: work-eat-sleep--400090.jpg]
> >
> > *Zeyuan Yu*
> > Software Development Engineer, Verizon Media Group
> >
> > work: 217.369.5086
> >
> > personal: 217.898.1085
> >
> >
> > On Wed, May 1, 2019 at 2:07 PM Zeyuan Yu <zeyu...@gmail.com> wrote:
> >
> > >
> > > vector<string> TSSslClientContextsGet();
> > > TSSslContext TSSslClientContextFind(const string name);
> > >
> > > ATS has APIs for server context retrieval (TSSslContextFindByName(),
> > > TSSslContextFindByAddr()). It would be useful to expose client context
> > via
> > > APIs too.
> > >
> > >
> > > I would like to propose new APIs for this purpose. Given client context
> > > are stored in unordered_map, TSSslClientContextsGet() will return all
> > keys
> > > (essentially the path to CA/cert files) in a vector;
> > > TSSslClientContextFid() will return the context corresponding to the
> > input
> > > string.
> > >
> > >
> > >
> > >
> > > [image: work-eat-sleep--400090.jpg]
> > >
> > > *Zeyuan Yu*
> > > Software Development Engineer, Verizon Media Group
> > >
> > > work: 217.369.5086
> > >
> > > personal: 217.898.1085
> > >
> >
>

Reply via email to