Documentation ¶
Index ¶
- func Help()
- func New(cfg *config.Arc) (*arc, error)
- func RegisterClusterFactory(name string, f ClusterFactory)
- func RegisterInstanceFactory(name string, f InstanceFactory)
- func RegisterPodFactory(name string, f PodFactory)
- type Cluster
- func (c *Cluster) Audit(flags ...string) error
- func (c *Cluster) Compute() resource.Compute
- func (c *Cluster) Create(req *route.Request) route.Response
- func (c *Cluster) Derived() resource.Cluster
- func (c *Cluster) Destroy(req *route.Request) route.Response
- func (c *Cluster) FindInstance(name string) resource.Instance
- func (c *Cluster) FindInstanceByIP(ip string) resource.Instance
- func (c *Cluster) FindPod(name string) resource.Pod
- func (c *Cluster) MidAudit(flags ...string) error
- func (c *Cluster) Pods() resource.Pods
- func (c *Cluster) PostAudit(flags ...string) error
- func (c *Cluster) PostCreate(req *route.Request) route.Response
- func (c *Cluster) PostDestroy(req *route.Request) route.Response
- func (c *Cluster) PostProvision(req *route.Request) route.Response
- func (c *Cluster) PostReplace(req *route.Request) route.Response
- func (c *Cluster) PostRestart(req *route.Request) route.Response
- func (c *Cluster) PostStart(req *route.Request) route.Response
- func (c *Cluster) PostStop(req *route.Request) route.Response
- func (c *Cluster) PreAudit(flags ...string) error
- func (c *Cluster) PreCreate(req *route.Request) route.Response
- func (c *Cluster) PreDestroy(req *route.Request) route.Response
- func (c *Cluster) PreProvision(req *route.Request) route.Response
- func (c *Cluster) PreReplace(req *route.Request) route.Response
- func (c *Cluster) PreRestart(req *route.Request) route.Response
- func (c *Cluster) PreStart(req *route.Request) route.Response
- func (c *Cluster) PreStop(req *route.Request) route.Response
- func (c *Cluster) Provision(req *route.Request) route.Response
- func (c *Cluster) Replace(req *route.Request) route.Response
- func (c *Cluster) Restart(req *route.Request) route.Response
- func (c *Cluster) Route(req *route.Request) route.Response
- func (c *Cluster) SetDerived(d resource.Cluster)
- func (c *Cluster) Start(req *route.Request) route.Response
- func (c *Cluster) Stop(req *route.Request) route.Response
- type ClusterFactory
- type Instance
- func (i *Instance) Audit(flags ...string) error
- func (i *Instance) Create(req *route.Request) route.Response
- func (i *Instance) Created() bool
- func (i *Instance) Derived() resource.Instance
- func (i *Instance) Destroy(req *route.Request) route.Response
- func (i *Instance) Destroyed() bool
- func (i *Instance) Dns() resource.Dns
- func (i *Instance) FQDNMatch(fqdns []string) bool
- func (i *Instance) Id() string
- func (i *Instance) ImageId() string
- func (i *Instance) KeyName() string
- func (i *Instance) KeyPair() resource.KeyPair
- func (i *Instance) MidAudit(flags ...string) error
- func (i *Instance) Network() resource.Network
- func (i *Instance) Pod() resource.Pod
- func (i *Instance) PostAudit(flags ...string) error
- func (i *Instance) PostCreate(req *route.Request) route.Response
- func (i *Instance) PostDestroy(req *route.Request) route.Response
- func (i *Instance) PostProvision(req *route.Request) route.Response
- func (i *Instance) PostReplace(req *route.Request) route.Response
- func (i *Instance) PostRestart(req *route.Request) route.Response
- func (i *Instance) PostStart(req *route.Request) route.Response
- func (i *Instance) PostStop(req *route.Request) route.Response
- func (i *Instance) PreAudit(flags ...string) error
- func (i *Instance) PreCreate(req *route.Request) route.Response
- func (i *Instance) PreDestroy(req *route.Request) route.Response
- func (i *Instance) PreProvision(req *route.Request) route.Response
- func (i *Instance) PreReplace(req *route.Request) route.Response
- func (i *Instance) PreRestart(req *route.Request) route.Response
- func (i *Instance) PreStart(req *route.Request) route.Response
- func (i *Instance) PreStop(req *route.Request) route.Response
- func (i *Instance) PrivateDnsARecord() resource.DnsRecord
- func (i *Instance) PrivateFQDN() string
- func (i *Instance) PrivateHostname() string
- func (i *Instance) PrivateIPAddress() string
- func (i *Instance) ProviderRoleIdentifier() resource.ProviderRoleIdentifier
- func (i *Instance) ProviderVolumes() []resource.ProviderVolume
- func (i *Instance) Provision(req *route.Request) route.Response
- func (i *Instance) PublicDnsARecord() resource.DnsRecord
- func (i *Instance) PublicFQDN() string
- func (i *Instance) PublicHostname() string
- func (i *Instance) PublicIPAddress() string
- func (i *Instance) Replace(req *route.Request) route.Response
- func (i *Instance) Restart(req *route.Request) route.Response
- func (i *Instance) RootUser() string
- func (i *Instance) Route(req *route.Request) route.Response
- func (i *Instance) SecurityGroups() []resource.SecurityGroup
- func (i *Instance) SetDerived(d resource.Instance)
- func (i *Instance) SetTags(t map[string]string) error
- func (i *Instance) Start(req *route.Request) route.Response
- func (i *Instance) StartPaging(req *route.Request) route.Response
- func (i *Instance) Started() bool
- func (i *Instance) State() string
- func (i *Instance) Stop(req *route.Request) route.Response
- func (i *Instance) StopPaging(req *route.Request) route.Response
- func (i *Instance) Stopped() bool
- func (i *Instance) Subnet() resource.Subnet
- func (i *Instance) UserUpdate(req *route.Request) route.Response
- type InstanceFactory
- type Pod
- func (p *Pod) Audit(flags ...string) error
- func (p *Pod) Cluster() resource.Cluster
- func (p *Pod) Create(req *route.Request) route.Response
- func (p *Pod) Derived() resource.Pod
- func (p *Pod) Destroy(req *route.Request) route.Response
- func (p *Pod) DnsCNameRecords() []resource.DnsRecord
- func (p *Pod) FindInstance(name string) resource.Instance
- func (p *Pod) FindInstanceByIP(ip string) resource.Instance
- func (p *Pod) Instances() resource.Instances
- func (p *Pod) MidAudit(flags ...string) error
- func (p *Pod) PkgName() string
- func (p *Pod) PostAudit(flags ...string) error
- func (p *Pod) PostCreate(req *route.Request) route.Response
- func (p *Pod) PostDestroy(req *route.Request) route.Response
- func (p *Pod) PostProvision(req *route.Request) route.Response
- func (p *Pod) PostReplace(req *route.Request) route.Response
- func (p *Pod) PostRestart(req *route.Request) route.Response
- func (p *Pod) PostStart(req *route.Request) route.Response
- func (p *Pod) PostStop(req *route.Request) route.Response
- func (p *Pod) PreAudit(flags ...string) error
- func (p *Pod) PreCreate(req *route.Request) route.Response
- func (p *Pod) PreDestroy(req *route.Request) route.Response
- func (p *Pod) PreProvision(req *route.Request) route.Response
- func (p *Pod) PreReplace(req *route.Request) route.Response
- func (p *Pod) PreRestart(req *route.Request) route.Response
- func (p *Pod) PreStart(req *route.Request) route.Response
- func (p *Pod) PreStop(req *route.Request) route.Response
- func (p *Pod) PrimaryCname() resource.DnsRecord
- func (p *Pod) PrimaryInstance() resource.Instance
- func (p *Pod) Provision(req *route.Request) route.Response
- func (p *Pod) Replace(req *route.Request) route.Response
- func (p *Pod) Restart(req *route.Request) route.Response
- func (p *Pod) Route(req *route.Request) route.Response
- func (p *Pod) SecondaryInstances() []resource.Instance
- func (p *Pod) SetDerived(d resource.Pod)
- func (p *Pod) Start(req *route.Request) route.Response
- func (p *Pod) Stop(req *route.Request) route.Response
- type PodFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterClusterFactory ¶
func RegisterClusterFactory(name string, f ClusterFactory)
func RegisterInstanceFactory ¶
func RegisterInstanceFactory(name string, f InstanceFactory)
func RegisterPodFactory ¶
func RegisterPodFactory(name string, f PodFactory)
Types ¶
type Cluster ¶
type Cluster struct { *resource.Resources *config.Cluster // contains filtered or unexported fields }
func NewDefaultCluster ¶
func NewDefaultCluster(compute resource.Compute, prov provider.DataCenter, cfg *config.Cluster) (*Cluster, error)
newDefaultCluster is the default cluster contructor.
func (*Cluster) Compute ¶
Compute provides access to Cluster's parent. Compute satisfies the resource.Cluster interface.
func (*Cluster) FindInstance ¶
FindInstance finds an instance from this cluster by name. Instances must be uniquely named. The instance name convention is "<pod name>-<instance number>". FindInstance satisfies the resource.Cluster interface.
func (*Cluster) FindInstanceByIP ¶
FindInstanceByIP find and instance from this cluster by ip address. FindInstaneByIP satisfies the resource.Cluster interface.
func (*Cluster) FindPod ¶
Find pod by name. This implies pods are named uniquely. FindPod satisfies the resource.Cluster interface.
func (*Cluster) Pods ¶
Pods provides access to Compute's child pods. Pods satisfies the resource.Cluster interface.
func (*Cluster) Route ¶
Route satisfies the embedded resource.Resource interface in resource.Cluster. Cluster handles load, create, destroy, start, stop, replace, help, config and info requests in order to manage the cluster. All other commands are routed to the cluster's pods.
func (*Cluster) SetDerived ¶
type ClusterFactory ¶
type Instance ¶
func NewDefaultInstance ¶
func NewDefaultInstance( pod resource.Pod, subnet resource.Subnet, keypair resource.KeyPair, prov provider.DataCenter, cfg *config.Instance, ) (*Instance, error)
newDefaultInstance is the default instance contructor.
func (*Instance) Created ¶
Created returns true is the instance has been created in the provider. This satisfies the resource.Resource interface.
func (*Instance) Destroyed ¶
Destroyed returns true is the instance has not been created in the provider. This satisfies the resource.Resource interface.
func (*Instance) FQDNMatch ¶
FQDNMatch returns true if the given list of fqdns contains a match to either the private or public fqdn.
func (*Instance) KeyPair ¶
KeyPair provides access to the keypair that will be assigned to this instance.
func (*Instance) Pod ¶
Pod provides access to Instance's parent. Pod satisfies the resource.Instance interface.
func (*Instance) PostProvision ¶
func (*Instance) PrivateDnsARecord ¶
PrivateDnsARecord returns the dns a record associated with this instance.
func (*Instance) PrivateFQDN ¶
PrivateFQDN returns the FQDN associated with the private ip address of the instance.
func (*Instance) PrivateHostname ¶
PrivateHostname returns the hostname (without the domain name) associated with the private ip address of the instance.
func (*Instance) PrivateIPAddress ¶
func (*Instance) ProviderRoleIdentifier ¶
func (i *Instance) ProviderRoleIdentifier() resource.ProviderRoleIdentifier
func (*Instance) ProviderVolumes ¶
func (i *Instance) ProviderVolumes() []resource.ProviderVolume
func (*Instance) PublicDnsARecord ¶
PublicDnsARecord return the dns a record associated with the public ip address of this instance. If this instance doesn't have a public ip address (most don't) this will return nil.
func (*Instance) PublicFQDN ¶
PublicFQDN returns the FQDN associated with the public ip address of the instance. If this instance doesn't have a public ip address (most don't) this will return an empty string "".
func (*Instance) PublicHostname ¶
PublicHostname returns the hostname (without the domain name) associated with the public ip address of the instance.
func (*Instance) PublicIPAddress ¶
func (*Instance) SecurityGroups ¶
func (i *Instance) SecurityGroups() []resource.SecurityGroup
SecurityGroups provides access to the security groups to which instance is associated.
func (*Instance) SetDerived ¶
type InstanceFactory ¶
type Pod ¶
func NewDefaultPod ¶
func NewDefaultPod(cluster resource.Cluster, prov provider.DataCenter, cfg *config.Pod) (*Pod, error)
newDefaultPod is the default pod contructor.
func (*Pod) Cluster ¶
Cluster provides access to Pod's parent. Cluster satisfies the resource.Pod interface.
func (*Pod) DnsCNameRecords ¶
DnsCNameRecord returns the configred dns cname record associated with this pod. If this pod doesn't have configured cname record, this will return nil.
func (*Pod) FindInstance ¶
FindInstance finds the instance in this pod by name. This implies instances are named uniquely. The name takes the form "<pod name>-<instance number>". Find instance satisfies the resource.Pod interface.
func (*Pod) FindInstanceByIP ¶
FindInstanceByIP finds the instance in this pod by ip address. Find instance satisfies the resource.Pod interface.
func (*Pod) Instances ¶
Instances provides access to Pod's child instances. Instances satisfies the resource.Pod interface.
func (*Pod) PkgName ¶
PkgName returns the name of the servertype rpm or deb associated with this pod.
func (*Pod) PrimaryCname ¶
func (*Pod) PrimaryInstance ¶
PrimaryInstance returns the instance associated with the cname record for this pod. If this pod doesn't have a configured cname record or cannot find a primary instance this will return nil.
func (*Pod) Route ¶
Route satisfies the embedded resource.Resource interface in resource.Pod. Pod handles load, create, destroy, start, stop, replace, help, config and info requests in order to manage the pod. All other commands are routed to the pod's instances.
func (*Pod) SecondaryInstances ¶
SecondaryInstances return the instances not associated with the cname record for this pod. If this pod doesn't have a configured cname record or cannot find a primary instance this will return nil.
func (*Pod) SetDerived ¶
Source Files ¶
- arc.go
- cluster.go
- clusters.go
- compute.go
- container_service.go
- database.go
- database_service.go
- datacenter.go
- dns.go
- dns_record.go
- dns_records.go
- elastic_ip.go
- instance.go
- instance_audit.go
- instance_create.go
- instance_destroy.go
- instance_dns.go
- instance_paging.go
- instance_provision.go
- instance_replace.go
- instance_restart.go
- instance_users.go
- instances.go
- keypair.go
- network.go
- pod.go
- pods.go
- role_identifier.go
- security_group.go
- security_groups.go
- subnet.go
- subnet_group.go
- subnet_groups.go
- volume.go
- volumes.go