Documentation ¶
Index ¶
- func FilterRouteTables(f RouteTableFilter, tables []*ec2.RouteTable) []*ec2.RouteTable
- func RouteTableForSubnet(subnet string, tables []*ec2.RouteTable) *ec2.RouteTable
- type ManageRoutesSpec
- func (r *ManageRoutesSpec) StartHealthcheckListener(noop bool)
- func (r *ManageRoutesSpec) UpdateEc2RouteTables(rt []*ec2.RouteTable)
- func (r *ManageRoutesSpec) UpdateRemoteHealthchecks()
- func (r *ManageRoutesSpec) Validate(meta instancemetadata.InstanceMetadata, manager RouteTableManager, name string, ...) error
- type MetadataFetcher
- type MyEC2Conn
- type RouteTableFilter
- type RouteTableFilterAlways
- type RouteTableFilterAnd
- type RouteTableFilterDestinationCidrBlock
- type RouteTableFilterMain
- type RouteTableFilterNever
- type RouteTableFilterNot
- type RouteTableFilterOr
- type RouteTableFilterSubnet
- type RouteTableFilterTagMatch
- type RouteTableFilterTagRegexMatch
- type RouteTableManager
- type RouteTableManagerEC2
- func (r RouteTableManagerEC2) DeleteInstanceRoute(routeTableId *string, route *ec2.Route, cidr string, instance string, ...) error
- func (r RouteTableManagerEC2) GetRouteTables() ([]*ec2.RouteTable, error)
- func (r RouteTableManagerEC2) InstanceIsRouter(instanceID string) bool
- func (r RouteTableManagerEC2) ManageInstanceRoute(rtb ec2.RouteTable, rs ManageRoutesSpec, noop bool) error
- func (r RouteTableManagerEC2) ReplaceInstanceRoute(routeTableId *string, route *ec2.Route, rs ManageRoutesSpec, noop bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterRouteTables ¶
func FilterRouteTables(f RouteTableFilter, tables []*ec2.RouteTable) []*ec2.RouteTable
func RouteTableForSubnet ¶
func RouteTableForSubnet(subnet string, tables []*ec2.RouteTable) *ec2.RouteTable
FIXME weird function
Types ¶
type ManageRoutesSpec ¶
type ManageRoutesSpec struct { Cidr string `yaml:"cidr"` Instance string `yaml:"instance"` InstanceIsSelf bool `yaml:"-"` HealthcheckName string `yaml:"healthcheck"` RemoteHealthcheckName string `yaml:"remote_healthcheck"` IfUnhealthy bool `yaml:"if_unhealthy"` Manager RouteTableManager `yaml:"-"` NeverDelete bool `yaml:"never_delete"` RunBeforeReplaceRoute []string `yaml:"run_before_replace_route"` RunAfterReplaceRoute []string `yaml:"run_after_replace_route"` RunBeforeDeleteRoute []string `yaml:"run_before_delete_route"` RunAfterDeleteRoute []string `yaml:"run_after_delete_route"` // contains filtered or unexported fields }
func (*ManageRoutesSpec) StartHealthcheckListener ¶
func (r *ManageRoutesSpec) StartHealthcheckListener(noop bool)
func (*ManageRoutesSpec) UpdateEc2RouteTables ¶
func (r *ManageRoutesSpec) UpdateEc2RouteTables(rt []*ec2.RouteTable)
func (*ManageRoutesSpec) UpdateRemoteHealthchecks ¶ added in v0.0.7
func (r *ManageRoutesSpec) UpdateRemoteHealthchecks()
func (*ManageRoutesSpec) Validate ¶
func (r *ManageRoutesSpec) Validate(meta instancemetadata.InstanceMetadata, manager RouteTableManager, name string, healthchecks map[string]*healthcheck.Healthcheck, remotehealthchecks map[string]*healthcheck.Healthcheck) error
type MetadataFetcher ¶
func NewMetadataFetcher ¶
func NewMetadataFetcher(debug bool) MetadataFetcher
type MyEC2Conn ¶
type MyEC2Conn interface { CreateRoute(*ec2.CreateRouteInput) (*ec2.CreateRouteOutput, error) ReplaceRoute(*ec2.ReplaceRouteInput) (*ec2.ReplaceRouteOutput, error) DescribeRouteTables(*ec2.DescribeRouteTablesInput) (*ec2.DescribeRouteTablesOutput, error) DeleteRoute(*ec2.DeleteRouteInput) (*ec2.DeleteRouteOutput, error) DescribeNetworkInterfaces(*ec2.DescribeNetworkInterfacesInput) (*ec2.DescribeNetworkInterfacesOutput, error) DescribeInstanceAttribute(*ec2.DescribeInstanceAttributeInput) (*ec2.DescribeInstanceAttributeOutput, error) DescribeInstanceStatus(*ec2.DescribeInstanceStatusInput) (*ec2.DescribeInstanceStatusOutput, error) }
type RouteTableFilter ¶
type RouteTableFilter interface {
Keep(*ec2.RouteTable) bool
}
type RouteTableFilterAlways ¶
type RouteTableFilterAlways struct{}
func (RouteTableFilterAlways) Keep ¶
func (fs RouteTableFilterAlways) Keep(rt *ec2.RouteTable) bool
type RouteTableFilterAnd ¶
type RouteTableFilterAnd struct {
RouteTableFilters []RouteTableFilter
}
func (RouteTableFilterAnd) Keep ¶
func (fs RouteTableFilterAnd) Keep(rt *ec2.RouteTable) bool
type RouteTableFilterDestinationCidrBlock ¶
type RouteTableFilterDestinationCidrBlock struct { DestinationCidrBlock string ViaIGW bool ViaInstance bool InstanceNotActive bool }
func (RouteTableFilterDestinationCidrBlock) Keep ¶
func (fs RouteTableFilterDestinationCidrBlock) Keep(rt *ec2.RouteTable) bool
type RouteTableFilterMain ¶
type RouteTableFilterMain struct{}
func (RouteTableFilterMain) Keep ¶
func (fs RouteTableFilterMain) Keep(rt *ec2.RouteTable) bool
type RouteTableFilterNever ¶
type RouteTableFilterNever struct{}
func (RouteTableFilterNever) Keep ¶
func (fs RouteTableFilterNever) Keep(rt *ec2.RouteTable) bool
type RouteTableFilterNot ¶ added in v0.0.2
type RouteTableFilterNot struct {
Filter RouteTableFilter
}
func (RouteTableFilterNot) Keep ¶ added in v0.0.2
func (fs RouteTableFilterNot) Keep(rt *ec2.RouteTable) bool
type RouteTableFilterOr ¶
type RouteTableFilterOr struct {
RouteTableFilters []RouteTableFilter
}
func (RouteTableFilterOr) Keep ¶
func (fs RouteTableFilterOr) Keep(rt *ec2.RouteTable) bool
type RouteTableFilterSubnet ¶
type RouteTableFilterSubnet struct {
SubnetId string
}
func (RouteTableFilterSubnet) Keep ¶
func (fs RouteTableFilterSubnet) Keep(rt *ec2.RouteTable) bool
type RouteTableFilterTagMatch ¶
func (RouteTableFilterTagMatch) Keep ¶
func (fs RouteTableFilterTagMatch) Keep(rt *ec2.RouteTable) bool
type RouteTableFilterTagRegexMatch ¶ added in v0.1.5
func (RouteTableFilterTagRegexMatch) Keep ¶ added in v0.1.5
func (fs RouteTableFilterTagRegexMatch) Keep(rt *ec2.RouteTable) bool
type RouteTableManager ¶
type RouteTableManager interface { GetRouteTables() ([]*ec2.RouteTable, error) ManageInstanceRoute(ec2.RouteTable, ManageRoutesSpec, bool) error InstanceIsRouter(string) bool }
type RouteTableManagerEC2 ¶
type RouteTableManagerEC2 struct { Region string // contains filtered or unexported fields }
func NewRouteTableManagerEC2 ¶ added in v0.2.0
func NewRouteTableManagerEC2(region string, debug bool) *RouteTableManagerEC2
func (RouteTableManagerEC2) DeleteInstanceRoute ¶
func (RouteTableManagerEC2) GetRouteTables ¶
func (r RouteTableManagerEC2) GetRouteTables() ([]*ec2.RouteTable, error)
func (RouteTableManagerEC2) InstanceIsRouter ¶ added in v0.0.7
func (r RouteTableManagerEC2) InstanceIsRouter(instanceID string) bool
InstanceIsRouter when source destination check is disabled on any interface.
func (RouteTableManagerEC2) ManageInstanceRoute ¶
func (r RouteTableManagerEC2) ManageInstanceRoute(rtb ec2.RouteTable, rs ManageRoutesSpec, noop bool) error
func (RouteTableManagerEC2) ReplaceInstanceRoute ¶
func (r RouteTableManagerEC2) ReplaceInstanceRoute(routeTableId *string, route *ec2.Route, rs ManageRoutesSpec, noop bool) error
Click to show internal directories.
Click to hide internal directories.