Add fields to AccessInfo struct
authorLukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Mon, 16 Oct 2017 08:23:52 +0000 (10:23 +0200)
committerLukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Fri, 27 Apr 2018 15:14:51 +0000 (17:14 +0200)
Added fields define required connection data for the request owner
who want to connect to the Dryad running job.

Change-Id: I372abac096d5b1cacc2744cbbbce2d1b0740cf81
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
boruta.go

index 85ed9ce..a65a699 100644 (file)
--- a/boruta.go
+++ b/boruta.go
@@ -23,6 +23,7 @@ package boruta
 
 import (
        "crypto/rsa"
+       "net"
        "time"
 )
 
@@ -112,6 +113,7 @@ type WorkerUUID string
 
 // JobInfo describes the Job.
 type JobInfo struct {
+       // WorkerUUID identifies worker that runs the job.
        WorkerUUID WorkerUUID
        // Timeout after which this Job will be terminated.
        Timeout time.Time
@@ -124,7 +126,14 @@ type Group string
 type Groups []Group
 
 // AccessInfo contains necessary information to access the Worker.
-type AccessInfo struct{}
+type AccessInfo struct {
+       // Addr is necessary information to connect to a tunnel to Dryad.
+       Addr net.Addr
+       // Key is private RSA key of the job session.
+       Key rsa.PrivateKey
+       // Username is a login name for the job session.
+       Username string
+}
 
 // WorkerInfo describes the Worker.
 type WorkerInfo struct {