-
Notifications
You must be signed in to change notification settings - Fork 9
/
seleniferous.go
52 lines (47 loc) · 1.13 KB
/
seleniferous.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package seleniferous
import (
"time"
"github.com/sirupsen/logrus"
"k8s.io/client-go/kubernetes"
)
//Config basic config
type Config struct {
BrowserPort string
ProxyPath string
Hostname string
Namespace string
IdleTimeout time.Duration
ShutdownTimeout time.Duration
Storage *Storage
Logger *logrus.Logger
Client *kubernetes.Clientset
Quit chan error
}
//App ...
type App struct {
browserPort string
proxyPath string
hostname string
namespace string
idleTimeout time.Duration
shutdownTimeout time.Duration
bucket *Storage
logger *logrus.Logger
client *kubernetes.Clientset
quit chan error
}
//New ...
func New(conf *Config) *App {
return &App{
browserPort: conf.BrowserPort,
proxyPath: conf.ProxyPath,
hostname: conf.Hostname,
namespace: conf.Namespace,
idleTimeout: conf.IdleTimeout,
shutdownTimeout: conf.ShutdownTimeout,
bucket: conf.Storage,
logger: conf.Logger,
client: conf.Client,
quit: conf.Quit,
}
}