Documentation
¶
Index ¶
- Variables
- func DBConnection() *mgo.Database
- func DocExists(id string, collName string) bool
- func EnsureHostIndex() error
- func GetDnsByFqdn(fqdn string) (*[]DNSDoc, error)
- func GetHosts(query string) (*[]NodeDoc, error)
- func GetLbsByHostId(id string) (*[]LBDoc, error)
- func InsertMany(Docs []interface{}, collName string, wg *sync.WaitGroup)
- type DNSDoc
- type LBDoc
- type NodeDoc
- type Tags
Constants ¶
This section is empty.
Variables ¶
View Source
var MongoSession *mgo.Session
Functions ¶
func DBConnection ¶
func GetLbsByHostId ¶
Get the loadbalancer by host id
func InsertMany ¶
Write many docs in to mongodb
Types ¶
type DNSDoc ¶
type DNSDoc struct {
ID string `bson:"_id"`
Name string `bson:"name"`
Type string `bson:"type"`
Records []string `bson:"records"`
CloudProvider string `bson:"cloud_provider"`
}
Describes an DNS record
type LBDoc ¶
type LBDoc struct {
ID string `bson:"_id"`
Name string `bson:"name"`
LaunchTime time.Time `bson:"launch_time"`
DataCenter []string `bson:"data_center"`
CloudProvider string `bson:"cloud_provider"`
Backends []string `bson:"backends"`
PublicDns string `bson:"public_dns"`
}
Describes an load balancer
type NodeDoc ¶
type NodeDoc struct {
ID string `bson:"_id"`
State string `bson:"state"`
Virtualization string `bson:"virtualization"`
Architecture string `bson:"arch"`
RootDevice string `bson:"root_device"`
Type string `bson:"type"`
DataCenter string `bson:"data_center"`
SecurityGroup []string `bson:"security_group"`
CloudProvider string `bson:"cloud_provider"`
SshKeyName string `bson:"ssh_key_name"`
Tags []Tags `bson:"tags"`
IamProfile string `bson:"iam_profile,omitempty"`
LaunchTime time.Time `bson:"launch_time"`
PublicDns string `bson:"public_dns"`
PrivateDns string `bson:"private_dns"`
PublicIp string `bson:"public_ip"`
PrivateIp string `bson:"private_ip"`
}
Describes an machine
func GetHostByFqdn ¶
Get the host document by FQDN
Click to show internal directories.
Click to hide internal directories.