policy

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2018 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ActionAllow action for the policy
	ActionAllow string = "allow"
	// ActionDeny action for the policy
	ActionDeny string = "deny"
)
View Source
const (
	StrStack   string = "stack"
	StrService string = "service"
	StrLinked  string = "linked"
)

StrStack for 'stack' string StrService for 'service' string StrLink for 'link' string

Variables

This section is empty.

Functions

func Watch

func Watch(c metadata.Client, exitCh chan int, doCleanup bool) error

Watch is used to monitor metadata for changes

Types

type NetworkPolicy

type NetworkPolicy struct {
	DefaultAction string
	Rules         []NetworkPolicyRule
}

NetworkPolicy ...

func NewNetworkPolicy

func NewNetworkPolicy(network *metadata.Network) (*NetworkPolicy, error)

NewNetworkPolicy takes in the metadata type and converts to local type

func ParseNetworkPolicyStr

func ParseNetworkPolicyStr(npStr string) (*NetworkPolicy, error)

ParseNetworkPolicyStr is used to parse the input yaml representation of the network policy and perform basic validations

func (*NetworkPolicy) Validate

func (np *NetworkPolicy) Validate() error

Validate runs basic validations on the network policy

type NetworkPolicyRule

type NetworkPolicyRule struct {
	metadata.NetworkPolicyRule
}

NetworkPolicyRule ...

func (*NetworkPolicyRule) Validate

func (rule *NetworkPolicyRule) Validate() error

Validate runs basic validations on the policy

type Rule

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

Rule is used to store the info need to be a iptables rule

Jump to

Keyboard shortcuts

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