forked from gliderlabs/registrator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.go
61 lines (52 loc) · 1.08 KB
/
types.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
53
54
55
56
57
58
59
60
61
//go:generate go-extpoints . AdapterFactory
package bridge
import (
"net/url"
dockerapi "github.com/fsouza/go-dockerclient"
)
type AdapterFactory interface {
New(uri *url.URL) RegistryAdapter
}
type RegistryAdapter interface {
Ping() error
Register(service *Service) error
Deregister(service *Service) error
Refresh(service *Service) error
Services() ([]*Service, error)
}
type Config struct {
HostIp string
Internal bool
Explicit bool
UseIpFromLabel string
ForceTags string
RefreshTtl int
RefreshInterval int
DeregisterCheck string
Cleanup bool
}
type Service struct {
ID string
Name string
Port int
IP string
Tags []string
Attrs map[string]string
TTL int
Origin ServicePort
}
type DeadContainer struct {
TTL int
Services []*Service
}
type ServicePort struct {
HostPort string
HostIP string
ExposedPort string
ExposedIP string
PortType string
ContainerHostname string
ContainerID string
ContainerName string
container *dockerapi.Container
}