synthetic

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container added in v0.1.0

type Container struct {
	Port     int
	Protocol v1.Protocol
}

type Namespace

type Namespace struct {
	Labels map[string]string
}

type Pod

type Pod struct {
	Namespace  string
	Name       string
	Labels     map[string]string
	IP         string
	Containers []*Container
}

func (*Pod) PodString

func (p *Pod) PodString() utils.PodString

func (*Pod) SetLabels added in v0.1.0

func (p *Pod) SetLabels(labels map[string]string) *Pod

type Request

type Request struct {
	Protocol  v1.Protocol
	Port      int
	Policies  *matcher.Policy
	Resources *Resources
}

type Resources

type Resources struct {
	Namespaces map[string]map[string]string
	Pods       []*Pod
}

func NewResources

func NewResources(namespaces map[string]map[string]string, pods []*Pod) (*Resources, error)

func (*Resources) NewTruthTable

func (r *Resources) NewTruthTable() *utils.TruthTable

func (*Resources) SetPodLabels added in v0.1.0

func (r *Resources) SetPodLabels(ns string, podName string, labels map[string]string) (*Resources, error)

UpdatePodLabel returns a new object with an updated pod. It should not affect the original Resources object.

func (*Resources) UpdateNamespaceLabels added in v0.1.0

func (r *Resources) UpdateNamespaceLabels(ns string, labels map[string]string) (*Resources, error)

UpdateNamespaceLabels returns a new object with an updated namespace. It should not affect the original Resources object.

type Result

type Result struct {
	Request  *Request
	Ingress  *utils.TruthTable
	Egress   *utils.TruthTable
	Combined *utils.TruthTable
}

func RunSyntheticProbe

func RunSyntheticProbe(request *Request) *Result

Jump to

Keyboard shortcuts

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