Documentation ¶
Index ¶
- func DoOrDie(err error)
- func PrintJson(obj interface{})
- type Peer
- type PodString
- type TruthTable
- func (tt *TruthTable) Compare(other *TruthTable) *TruthTable
- func (tt *TruthTable) Get(from string, to string) bool
- func (tt *TruthTable) IsComplete() bool
- func (tt *TruthTable) Set(from string, to string, value bool)
- func (tt *TruthTable) Table() *tablewriter.Table
- func (tt *TruthTable) ValueCounts(ignoreLoopback bool) *TruthTableSummary
- type TruthTableSummary
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Peer ¶
Peer is used for matching pods by either or both of the pod's namespace and name.
type PodString ¶
type PodString string
PodString represents a namespace 'x' + pod 'a' as "x/a".
func NewPodString ¶
NewPodString instantiates a PodString from the given namespace and name.
type TruthTable ¶
type TruthTable struct { Froms []string Tos []string Values map[string]map[string]bool // contains filtered or unexported fields }
TruthTable takes in n items and maintains an n x n table of booleans for each ordered pair
func NewTruthTable ¶
func NewTruthTable(froms []string, tos []string, defaultValue *bool) *TruthTable
NewTruthTable creates a new truth table with froms and tos
func NewTruthTableFromItems ¶
func NewTruthTableFromItems(items []string, defaultValue *bool) *TruthTable
NewTruthTableFromItems creates a new truth table with items
func (*TruthTable) Compare ¶
func (tt *TruthTable) Compare(other *TruthTable) *TruthTable
Compare is used to check two truth tables for equality, returning its result in the form of a third truth table. Both tables are expected to have identical items.
func (*TruthTable) Get ¶
func (tt *TruthTable) Get(from string, to string) bool
Get gets the specified value
func (*TruthTable) IsComplete ¶
func (tt *TruthTable) IsComplete() bool
IsComplete returns true if there's a value set for every single pair of items, otherwise it returns false.
func (*TruthTable) Set ¶
func (tt *TruthTable) Set(from string, to string, value bool)
Set sets the value for from->to
func (*TruthTable) Table ¶
func (tt *TruthTable) Table() *tablewriter.Table
func (*TruthTable) ValueCounts ¶
func (tt *TruthTable) ValueCounts(ignoreLoopback bool) *TruthTableSummary