rules

package
v0.0.1-cli Latest Latest
Warning

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

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

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Enforcer

type Enforcer struct {
	Logger lager.Logger
	// contains filtered or unexported fields
}

func NewEnforcer

func NewEnforcer(logger lager.Logger, timestamper TimeStamper, ipt IPTables) *Enforcer

func (*Enforcer) Enforce

func (e *Enforcer) Enforce(chainPrefix string, rules []Rule) error

type GenericRule

type GenericRule struct {
	Properties []string
}

func (GenericRule) Enforce

func (r GenericRule) Enforce(chain string, iptables IPTables, logger lager.Logger) error

type IPTables

type IPTables interface {
	Exists(table, chain string, rulespec ...string) (bool, error)
	Insert(table, chain string, pos int, rulespec ...string) error
	AppendUnique(table, chain string, rulespec ...string) error
	Delete(table, chain string, rulespec ...string) error
	List(table, chain string) ([]string, error)
	NewChain(table, chain string) error
	ClearChain(table, chain string) error
	DeleteChain(table, chain string) error
}

type Rule

type Rule interface {
	Enforce(string, IPTables, lager.Logger) error
}

type RuleEnforcer

type RuleEnforcer interface {
	Enforce(chain string, r []Rule) error
}

type TimeStamper

type TimeStamper interface {
	CurrentTime() int
}

type Timestamper

type Timestamper struct{}

func (Timestamper) CurrentTime

func (_ Timestamper) CurrentTime() int

type Updater

type Updater struct {
	Logger lager.Logger

	VNI          int
	LocalSubnet  string
	RuleEnforcer RuleEnforcer
	// contains filtered or unexported fields
}

func New

func New(logger lager.Logger, storeReader storeReader, policyClient policyClient, vni int, localSubnet string, ruleEnforcer RuleEnforcer) *Updater

func (*Updater) DefaultRules

func (u *Updater) DefaultRules() []Rule

func (*Updater) Rules

func (u *Updater) Rules() ([]Rule, error)

func (*Updater) Update

func (u *Updater) Update() error

Jump to

Keyboard shortcuts

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