Documentation
¶
Index ¶
- Constants
- Variables
- type Destinations
- type Droplet
- func (r *Droplet) Actual(immutable *cluster.Cluster) (*cluster.Cluster, cloud.Resource, error)
- func (r *Droplet) Apply(actual, expected cloud.Resource, immutable *cluster.Cluster) (*cluster.Cluster, cloud.Resource, error)
- func (r *Droplet) Delete(actual cloud.Resource, immutable *cluster.Cluster) (*cluster.Cluster, cloud.Resource, error)
- func (r *Droplet) Expected(immutable *cluster.Cluster) (*cluster.Cluster, cloud.Resource, error)
- type Firewall
- func (r *Firewall) Actual(immutable *cluster.Cluster) (*cluster.Cluster, cloud.Resource, error)
- func (r *Firewall) Apply(actual, expected cloud.Resource, immutable *cluster.Cluster) (*cluster.Cluster, cloud.Resource, error)
- func (r *Firewall) Delete(actual cloud.Resource, immutable *cluster.Cluster) (*cluster.Cluster, cloud.Resource, error)
- func (r *Firewall) Expected(immutable *cluster.Cluster) (*cluster.Cluster, cloud.Resource, error)
- type InboundRule
- type OutboundRule
- type SSH
- func (r *SSH) Actual(immutable *cluster.Cluster) (*cluster.Cluster, cloud.Resource, error)
- func (r *SSH) Apply(actual, expected cloud.Resource, immutable *cluster.Cluster) (*cluster.Cluster, cloud.Resource, error)
- func (r *SSH) Delete(actual cloud.Resource, immutable *cluster.Cluster) (*cluster.Cluster, cloud.Resource, error)
- func (r *SSH) Expected(immutable *cluster.Cluster) (*cluster.Cluster, cloud.Resource, error)
- type Shared
- type Sources
Constants ¶
View Source
const ( MasterIPAttempts = 100 MasterIPSleepSecondsPerAttempt = 5 DeleteAttempts = 25 DeleteSleepSecondsPerAttempt = 3 )
Variables ¶
View Source
var Sdk *godoSdk.Sdk
Functions ¶
This section is empty.
Types ¶
type Destinations ¶
type Destinations struct { Addresses []string `json:"addresses,omitempty"` Tags []string `json:"tags,omitempty"` DropletIDs []int `json:"droplet_ids,omitempty"` LoadBalancerUIDs []string `json:"load_balancer_uids,omitempty"` }
Destinations DO Firewall destination parameters.
type Droplet ¶
type Droplet struct { Region string Size string Image string Count int SSHFingerprint string BootstrapScripts []string ServerPool *cluster.ServerPool }
type Firewall ¶
type Firewall struct { InboundRules []InboundRule `json:"inbound_rules,omitempty"` OutboundRules []OutboundRule `json:"outbound_rules,omitempty"` DropletIDs []int `json:"droplet_ids,omitempty"` Tags []string `json:"tags,omitempty"` // Droplet tags FirewallID string `json:"id,omitempty"` Status string `json:"status,omitempty"` Created string `json:"created_at,omitempty"` ServerPool *cluster.ServerPool }
Firewall holds all the data for DO firewalls. We preserve the same tags as DO apis for json marshal and unmarhsalling data.
func (*Firewall) Actual ¶
Actual calls DO firewall Api and returns the actual state of firewall in the cloud.
func (*Firewall) Apply ¶
func (r *Firewall) Apply(actual, expected cloud.Resource, immutable *cluster.Cluster) (*cluster.Cluster, cloud.Resource, error)
Apply will compare the actual and expected firewall config, if needed it will create the firewall.
type InboundRule ¶
type InboundRule struct { Protocol string `json:"protocol,omitempty"` PortRange string `json:"ports,omitempty"` Source *Sources `json:"sources,omitempty"` }
InboundRule DO Firewall InboundRule rule.
type OutboundRule ¶
type OutboundRule struct { Protocol string `json:"protocol,omitempty"` PortRange string `json:"ports,omitempty"` Destinations *Destinations `json:"destinations,omitempty"` }
OutboundRule DO Firewall outbound rule.
Click to show internal directories.
Click to hide internal directories.