aws

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2018 License: Apache-2.0 Imports: 16 Imported by: 4

Documentation

Index

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

type MetadataFetcher interface {
	Available() bool
	GetMetadata(string) (string, error)
}

func NewMetadataFetcher

func NewMetadataFetcher(debug bool) MetadataFetcher

type RouteTableFilter

type RouteTableFilter interface {
	Keep(*ec2.RouteTable) bool
}

type RouteTableFilterAlways

type RouteTableFilterAlways struct{}

func (RouteTableFilterAlways) Keep

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

type RouteTableFilterMain

type RouteTableFilterMain struct{}

func (RouteTableFilterMain) Keep

func (fs RouteTableFilterMain) Keep(rt *ec2.RouteTable) bool

type RouteTableFilterNever

type RouteTableFilterNever struct{}

func (RouteTableFilterNever) Keep

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

type RouteTableFilterTagMatch

type RouteTableFilterTagMatch struct {
	Key   string
	Value string
}

func (RouteTableFilterTagMatch) Keep

type RouteTableFilterTagRegexMatch added in v0.1.5

type RouteTableFilterTagRegexMatch struct {
	Key    string
	Regexp *regexp.Regexp
}

func (RouteTableFilterTagRegexMatch) Keep added in v0.1.5

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 (r RouteTableManagerEC2) DeleteInstanceRoute(routeTableId *string, route *ec2.Route, cidr string, instance string, noop bool) error

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL