Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StripDefaultNS ¶
StripDefaultNS strips the default namespace from an argument. For now, the API and lookups strip this value from string output so we strip it.
Types ¶
type Finder ¶
type Finder struct { // Client is the API client to use for any requests. Client *api.Client // contains filtered or unexported fields }
Finder finds intentions by a src/dst exact match. There is currently no direct API to do this so this struct downloads all intentions and caches them once, and searches in-memory for this. For now this works since even with a very large number of intentions, the size of the data gzipped over HTTP will be relatively small.
The Finder will only download the intentions one time. This struct is not expected to be used over a long period of time. Though it may be reused multile times, the intentions list is only downloaded once.