Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ForwardingPolicy

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

ForwardingPolicy is an instance of the forwarding policy

type PolicyDB

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

PolicyDB is the structure of a policy

func NewPolicyDB

func NewPolicyDB() (m *PolicyDB)

NewPolicyDB creates a new PolicyDB for efficient search of policies

func (*PolicyDB) AddPolicy

func (m *PolicyDB) AddPolicy(selector policy.TagSelector) (policyID int)

AddPolicy adds a policy to the database

func (*PolicyDB) PrintPolicyDB

func (m *PolicyDB) PrintPolicyDB()

PrintPolicyDB is a debugging function to dump the map

func (*PolicyDB) Search

func (m *PolicyDB) Search(tags *policy.TagStore) (int, interface{})

Search searches for a set of tags in the database to find a policy match

Source Files