Documentation ¶
Index ¶
- type PUContext
- func (p *PUContext) Annotations() *policy.TagStore
- func (p *PUContext) ApplicationACLPolicyFromAddr(addr net.IP, port uint16) (report *policy.FlowPolicy, action *policy.FlowPolicy, err error)
- func (p *PUContext) Autoport() bool
- func (p *PUContext) CacheExternalFlowPolicy(packet *packet.Packet, plc interface{})
- func (p *PUContext) CompressedTags() *policy.TagStore
- func (p *PUContext) Counters() *counters.Counters
- func (p *PUContext) CreateRcvRules(policyRules policy.TagSelectorList)
- func (p *PUContext) CreateTxtRules(policyRules policy.TagSelectorList)
- func (p *PUContext) GetCachedTokenAndServiceContext() ([]byte, []byte, error)
- func (p *PUContext) GetJWT() (string, error)
- func (p *PUContext) GetPolicyFromFQDN(fqdn string) ([]policy.PortProtocolPolicy, error)
- func (p *PUContext) GetProcessKeys() (string, []string, []string)
- func (p *PUContext) HashID() string
- func (p *PUContext) ID() string
- func (p *PUContext) Identity() *policy.TagStore
- func (p *PUContext) ManagementID() string
- func (p *PUContext) ManagementNamespace() string
- func (p *PUContext) Mark() string
- func (p *PUContext) NetworkACLPolicy(packet *packet.Packet) (report *policy.FlowPolicy, action *policy.FlowPolicy, err error)
- func (p *PUContext) NetworkACLPolicyFromAddr(addr net.IP, port uint16) (report *policy.FlowPolicy, action *policy.FlowPolicy, err error)
- func (p *PUContext) RemoveApplicationACL(addr net.IP, mask int)
- func (p *PUContext) RetrieveCachedExternalFlowPolicy(id string) (interface{}, error)
- func (p *PUContext) Scopes() []string
- func (p *PUContext) SearchRcvRules(tags *policy.TagStore) (report *policy.FlowPolicy, packet *policy.FlowPolicy)
- func (p *PUContext) SearchTxtRules(tags *policy.TagStore, skipRejectPolicies bool) (report *policy.FlowPolicy, packet *policy.FlowPolicy)
- func (p *PUContext) SynServiceContext() []byte
- func (p *PUContext) TCPPorts() []string
- func (p *PUContext) Type() common.PUType
- func (p *PUContext) UDPPorts() []string
- func (p *PUContext) UpdateApplicationACLs(rules policy.IPRuleList) error
- func (p *PUContext) UpdateCachedTokenAndServiceContext(token []byte, serviceContext []byte)
- func (p *PUContext) UpdateJWT(jwt string, expiration time.Time)
- func (p *PUContext) UpdateNetworkACLs(rules policy.IPRuleList) error
- func (p *PUContext) UpdateSynServiceContext(synServiceContext []byte)
- func (p *PUContext) Username() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PUContext ¶
type PUContext struct { ApplicationACLs *acls.ACLCache DNSACLs policy.DNSRuleList DNSProxyPort string Extension interface{} sync.RWMutex // contains filtered or unexported fields }
PUContext holds data indexed by the PU ID
func (*PUContext) Annotations ¶
Annotations returns the annotations
func (*PUContext) ApplicationACLPolicyFromAddr ¶
func (p *PUContext) ApplicationACLPolicyFromAddr(addr net.IP, port uint16) (report *policy.FlowPolicy, action *policy.FlowPolicy, err error)
ApplicationACLPolicyFromAddr retrieve the policy given an address and port.
func (*PUContext) CacheExternalFlowPolicy ¶
CacheExternalFlowPolicy will cache an external flow
func (*PUContext) CompressedTags ¶
CompressedTags returns the compressed tags.
func (*PUContext) CreateRcvRules ¶
func (p *PUContext) CreateRcvRules(policyRules policy.TagSelectorList)
CreateRcvRules create receive rules for this PU based on the update of the policy.
func (*PUContext) CreateTxtRules ¶
func (p *PUContext) CreateTxtRules(policyRules policy.TagSelectorList)
CreateTxtRules create receive rules for this PU based on the update of the policy.
func (*PUContext) GetCachedTokenAndServiceContext ¶
GetCachedTokenAndServiceContext returns the cached syn packet token
func (*PUContext) GetJWT ¶
GetJWT retrieves the JWT if it exists in the cache. Returns error otherwise.
func (*PUContext) GetPolicyFromFQDN ¶
func (p *PUContext) GetPolicyFromFQDN(fqdn string) ([]policy.PortProtocolPolicy, error)
GetPolicyFromFQDN gets the list of policies that are mapped with the hostname
func (*PUContext) GetProcessKeys ¶
GetProcessKeys returns the cache keys for a process
func (*PUContext) ManagementID ¶
ManagementID returns the management ID
func (*PUContext) ManagementNamespace ¶
ManagementNamespace returns the management namespace
func (*PUContext) NetworkACLPolicy ¶
func (p *PUContext) NetworkACLPolicy(packet *packet.Packet) (report *policy.FlowPolicy, action *policy.FlowPolicy, err error)
NetworkACLPolicy retrieves the policy based on ACLs
func (*PUContext) NetworkACLPolicyFromAddr ¶
func (p *PUContext) NetworkACLPolicyFromAddr(addr net.IP, port uint16) (report *policy.FlowPolicy, action *policy.FlowPolicy, err error)
NetworkACLPolicyFromAddr retrieve the policy given an address and port.
func (*PUContext) RemoveApplicationACL ¶
RemoveApplicationACL removes the application ACLs which are indexed with (ip, mask) key
func (*PUContext) RetrieveCachedExternalFlowPolicy ¶
RetrieveCachedExternalFlowPolicy returns the policy for an external IP
func (*PUContext) SearchRcvRules ¶
func (p *PUContext) SearchRcvRules( tags *policy.TagStore, ) (report *policy.FlowPolicy, packet *policy.FlowPolicy)
SearchRcvRules searches both receive and observed receive rules and returns the index and action
func (*PUContext) SearchTxtRules ¶
func (p *PUContext) SearchTxtRules( tags *policy.TagStore, skipRejectPolicies bool, ) (report *policy.FlowPolicy, packet *policy.FlowPolicy)
SearchTxtRules searches both receive and observed transmit rules and returns the index and action
func (*PUContext) SynServiceContext ¶
SynServiceContext returns synServiceContext
func (*PUContext) UpdateApplicationACLs ¶
func (p *PUContext) UpdateApplicationACLs(rules policy.IPRuleList) error
UpdateApplicationACLs updates the application ACL policy
func (*PUContext) UpdateCachedTokenAndServiceContext ¶
UpdateCachedTokenAndServiceContext updates the local cached token
func (*PUContext) UpdateNetworkACLs ¶
func (p *PUContext) UpdateNetworkACLs(rules policy.IPRuleList) error
UpdateNetworkACLs updates the network ACL policy
func (*PUContext) UpdateSynServiceContext ¶
UpdateSynServiceContext updates the synServiceContext