diff --git a/internal/scheduler/scheduler.go b/internal/scheduler/scheduler.go index 08a6abf..16581c8 100644 --- a/internal/scheduler/scheduler.go +++ b/internal/scheduler/scheduler.go @@ -2,6 +2,7 @@ package scheduler import "github.com/go-co-op/gocron" +// Scheduler schedules go cron jobs type Scheduler interface { Every(interval uint64) *gocron.Scheduler Do(jobFun interface{}, params ...interface{}) (*gocron.Job, error) diff --git a/internal/tunnel/tunnel.go b/internal/tunnel/tunnel.go index 40a1c45..afecf68 100644 --- a/internal/tunnel/tunnel.go +++ b/internal/tunnel/tunnel.go @@ -17,12 +17,17 @@ const ( RemoteAddr = "0.0.0.0:AUTO" ) +// Tunnel is tunnel connection with load balancer type Tunnel struct { NodeRPCURL *url.URL } +// Tunneler defines methods for connecting to load balancer tunnel type Tunneler interface { - // StartTunnel connects to load balancer tunnel port and creates connection + // StartTunnel connects to load balancer tunnel port and creates connection. + // nodeID is id that is passed in daemon, + // tunnelServerAddress is public address of load balancer tunnel server and + // token is jwt token given when registering with load balancer. StartTunnel(nodeID string, tunnelServerAddress string, token string) }