From 47528bfcb847a1c558db6a232837b52400aaef53 Mon Sep 17 00:00:00 2001 From: Tim Pepper Date: Fri, 26 Aug 2016 11:36:23 -0700 Subject: [PATCH] ssntp: add client getter for role This will enable for example launcher to understand if it is a net node, a compute node, or both and thus conditionally take applicable actions. Signed-off-by: Tim Pepper --- ssntp/client.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ssntp/client.go b/ssntp/client.go index 2e9114cfe..c068a8cbd 100644 --- a/ssntp/client.go +++ b/ssntp/client.go @@ -482,6 +482,11 @@ func (client *Client) SendTracedError(error Error, payload []byte, trace *TraceC return client.sendError(error, payload, trace) } +// Role exports the SSNTP client role. +func (client *Client) Role() Role { + return client.role +} + // UUID exports the SSNTP client Universally Unique ID. func (client *Client) UUID() string { return client.uuid.String()