firewalls

package
v0.0.0-...-a954aad Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFakeFirewallRules

func NewFakeFirewallRules() *fakeFirewallRules

NewFakeFirewallRules creates a fake for firewall rules.

Types

type Firewall

type Firewall interface {
	CreateFirewall(name, msgTag string, srcRange netset.IPNet, ports []int64, hosts []string) error
	GetFirewall(name string) (*compute.Firewall, error)
	DeleteFirewall(name string) error
	UpdateFirewall(name, msgTag string, srcRange netset.IPNet, ports []int64, hosts []string) error
}

Firewall interfaces with the GCE firewall api. This interface is a little different from the rest because it dovetails into the same firewall methods used by the TCPLoadBalancer.

type FirewallRules

type FirewallRules struct {
	// contains filtered or unexported fields
}

FirewallRules manages firewall rules.

func (*FirewallRules) GetFirewall

func (fr *FirewallRules) GetFirewall(name string) (*compute.Firewall, error)

GetFirewall just returns the firewall object corresponding to the given name. TODO: Currently only used in testing. Modify so we don't leak compute objects out of this interface by returning just the (src, ports, error).

func (*FirewallRules) Shutdown

func (fr *FirewallRules) Shutdown() error

Shutdown shuts down this firewall rules manager.

func (*FirewallRules) Sync

func (fr *FirewallRules) Sync(nodePorts []int64, nodeNames []string) error

Sync sync firewall rules with the cloud.

type SingleFirewallPool

type SingleFirewallPool interface {
	// TODO: Take a list of node ports for the firewall.
	Sync(nodePorts []int64, nodeNames []string) error
	Shutdown() error
}

SingleFirewallPool syncs the firewall rule for L7 traffic.

func NewFirewallPool

func NewFirewallPool(cloud Firewall, namer *utils.Namer) SingleFirewallPool

NewFirewallPool creates a new firewall rule manager. cloud: the cloud object implementing Firewall. namer: cluster namer.

Jump to

Keyboard shortcuts

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