_id
stringlengths
2
7
text
stringlengths
6
2.61k
title
stringclasses
1 value
c7000
// Unregister unregisters a pu from the registry.
c7001
// RetrieveServiceByID retrieves a service by the PU ID. Returns error if not found.
c7002
// RetrieveExposedServiceContext retrieves a service by the provided IP and or port. This // is called by the network side of processing to find the context.
c7003
// updateExposedPortAssociations will insert the association between a port // and a service in the global exposed service cache. This is needed // for all incoming connections, so that can determine both the type // of proxy as well the correct policy for this connection. This // association cannot have overlaps.
c7004
// buildExposedServices builds the caches for the exposed services. It assumes that an authorization
c7005
// updateDependentServices will update all the information in the // ServiceContext for the dependent services.
c7006
// resync adds new port for the PU and removes the stale ports
c7007
// FlattenClaim flattes all the generic claims in a flat array for strings.
c7008
// SetupConfig provides a configuration to implmentations. Every implementation // can have its own config type.
c7009
// Run will start the DockerPolicy Enforcement. // It applies a policy to each Container already Up and Running. // It listens to all ContainerEvents
c7010
// sendRequestToQueue sends a request to a channel based on a hash function
c7011
// eventProcessor processes docker events. We are processing multiple // queues in parallel so that we can activate containers as fast // as possible.
c7012
// eventListener listens to Docker events from the daemon and passes to // to the processor through a buffered channel. This minimizes the chances // that we will miss events because the processor is delayed
c7013
// Resync resyncs all the existing containers on the Host, using the // same process as when a container is initially spawn up
c7014
//container.HostConfig.NetworkMode == constants.DockerHostMode
c7015
// setupHostMode sets up the net_cls cgroup for the host mode
c7016
// ExtractMetadata generates the RuntimeInfo based on Docker primitive
c7017
// handleCreateEvent generates a create event type. We extract the metadata // and start the policy resolution at the create event. No need to wait // for the start event.
c7018
// handleStartEvent will notify the policy engine immediately about the event in order // to start the implementation of the functions. At this point we know the process ID // that is needed for the remote enforcers.
c7019
// handleDestroyEvent handles destroy events from Docker. It generated a "Destroy event"
c7020
// handlePauseEvent generates a create event type.
c7021
// handleCreateEvent generates a create event type.
c7022
// waitForDockerDaemon is a blocking call which will try to bring up docker, if not return err // with timeout
c7023
// NewSecrets creates a new set of secrets based on the type.
c7024
// NewTable creates a new table
c7025
// Add adds a service into the cache. Returns error of if any overlap has been detected.
c7026
// Find searches for a matching service, given an IP and port. Caller must specify // the local or remote context.
c7027
// FindListeningServicesForPU returns a service that is found and the associated // portSpecifications that refer to this service.
c7028
// DeleteByID will delete all entries related to this ID from all references.
c7029
// addPorts will only work for local ports.
c7030
// Supervise just keeps track of the active remotes so that it can initiate updates.
c7031
// NewMockMonitor creates a new mock instance // nolint
c7032
// NewMockImplementation creates a new mock instance // nolint
c7033
// SetupConfig mocks base method // nolint
c7034
// SetupConfig indicates an expected call of SetupConfig // nolint
c7035
// SetupHandlers mocks base method // nolint
c7036
// SetupHandlers indicates an expected call of SetupHandlers // nolint
c7037
// NewIpset returns an IpsetProvider interface based on the go-ipset // external package.
c7038
// GetIpset gets the ipset object from the name.
c7039
// DestroyAll destroys all the ipsets - it will fail if there are existing references
c7040
// UpdateConfiguration updates the configuration of the monitors.
c7041
// Resync resyncs the monitor
c7042
// Enforce implements the Enforce interface method and configures the data path for a new PU
c7043
// Unenforce removes the configuration for the given PU
c7044
// SetTargetNetworks sets new target networks used by datapath
c7045
// Run starts the application and network interceptors
c7046
// contextFromIP returns the PU context from the default IP if remote. Otherwise // it returns the context from the port or mark values of the packet. Synack // packets are again special and the flow is reversed. If a container doesn't supply // its IP information, we use the default IP. This will only work with remotes // and Linux processes.
c7047
//AssignMark writes the mark value to net_cls.classid file.
c7048
// AddProcess adds the process to the net_cls group
c7049
//RemoveProcess removes the process from the cgroup by writing the pid to the //top of net_cls cgroup cgroup.procs
c7050
// DeleteCgroup assumes the cgroup is already empty and destroys the directory structure. // It will return an error if the group is not empty. Use RempoveProcess to remove all processes // Before we try deletion
c7051
//Deletebasepath removes the base aporeto directory which comes as a separate event when we are not managing any processes
c7052
// ListCgroupProcesses returns lists of processes in the cgroup
c7053
// ListAllCgroups returns a list of the cgroups that are managed in the Trireme path
c7054
// NewDockerCgroupNetController returns a handle to call functions on the cgroup net_cls controller
c7055
//NewCgroupNetController returns a handle to call functions on the cgroup net_cls controller
c7056
// NewVerifier creates a new Aporeto JWT Verifier. The globalCertificate is optional // and is needed for configurations that do not transmit the token over the wire.
c7057
// UpdateSecrets updates the secrets of the token Verifier.
c7058
// CreateAndSign creates a new JWT token based on the Aporeto identities.
c7059
// generateContextID creates the contextID from the event information
c7060
// NewClient creates a new flow tracking client. s
c7061
// UpdateApplicationFlowMark will update the mark for a flow based on the packet information // received from an application. It will use the forward entries of conntrack for that.
c7062
// newReplyFlow will create a flow based on the reply tuple only. This will help us // update the mark without requiring knowledge of nats.
c7063
// String returns the configuration in string
c7064
// IsComplete checks if configuration is complete
c7065
// CollectFlowEvent collects a new flow event and adds it to a local list it shares with SendStats
c7066
// CollectUserEvent collects a new user event and adds it to a local cache.
c7067
// CollectTraceEvent collect trace events
c7068
// NewKubeClient Generate and initialize a Kubernetes client based on the parameter kubeconfig
c7069
// CreateLocalPodController creates a controller specifically for Pods.
c7070
// Pod returns the full pod object.
c7071
// DialMarkedWithContext dials a TCP connection and associates a mark. Propagates the context.
c7072
// NewSocketListener creates a socket listener with marked connections.
c7073
// GetOriginalDestination sets the original destination of the connection.
c7074
// Read implements the read interface of the connection.
c7075
// RemoteAddr implements the RemoteAddr interface of the connection. // This is the main change where we actually use the FD of the unix // socket to find the remote UID.
c7076
// SetDeadline implements the SetDeadLine interface.
c7077
// SetReadDeadline implements the SetReadDeadling interface
c7078
// SetWriteDeadline implements the SetWriteDeadline method of the interface.
c7079
// newPortAction parses a port spec and creates the action
c7080
// DefaultHostMetadataExtractor is a host specific metadata extractor
c7081
// ProcessInfo returns all metadata captured by a process
c7082
// libs returns the list of dynamic library dependencies of an executable
c7083
// IsHostPU returns true if puType stored by policy extensions is host PU
c7084
// NewAppProxy creates a new instance of the application proxy.
c7085
// Unenforce implements enforcer.Enforcer interface. It will shutdown the app side // of the proxy.
c7086
// UpdateSecrets updates the secrets of running enforcers managed by trireme. Remote enforcers will // get the secret updates with the next policy push.
c7087
// registerAndRun registers a new listener of the given type and runs the corresponding server
c7088
// processCertificateUpdates processes the certificate information and updates // the servers.
c7089
// startNetworkInterceptor will the process that processes packets from the network // Still has one more copy than needed. Can be improved.
c7090
// startApplicationInterceptor will create a interceptor that processes // packets originated from a local application
c7091
// NewPURuntime Generate a new RuntimeInfo
c7092
// MarshalJSON Marshals this struct.
c7093
// UnmarshalJSON Unmarshals this struct.
c7094
// Pid returns the PID
c7095
// SetPid sets the PID
c7096
// NSPath returns the NSPath
c7097
// SetNSPath sets the NSPath
c7098
// SetOptions sets the Options
c7099
// Name returns the PID