trireme-lib: go.aporeto.io/trireme-lib/controller/internal/enforcer/applicationproxy/servicecache Index | Files

package servicecache

import "go.aporeto.io/trireme-lib/controller/internal/enforcer/applicationproxy/servicecache"

Index

Package Files

servicecache.go

type ServiceCache Uses

type ServiceCache struct {
    sync.RWMutex
    // contains filtered or unexported fields
}

ServiceCache is a new service cache

func NewTable Uses

func NewTable() *ServiceCache

NewTable creates a new table

func (*ServiceCache) Add Uses

func (s *ServiceCache) Add(e *common.Service, id string, data interface{}, local bool) error

Add adds a service into the cache. Returns error of if any overlap has been detected.

func (*ServiceCache) DeleteByID Uses

func (s *ServiceCache) DeleteByID(id string, local bool)

DeleteByID will delete all entries related to this ID from all references.

func (*ServiceCache) Find Uses

func (s *ServiceCache) Find(ip net.IP, port int, host string, local bool) interface{}

Find searches for a matching service, given an IP and port. Caller must specify the local or remote context.

func (*ServiceCache) FindListeningServicesForPU Uses

func (s *ServiceCache) FindListeningServicesForPU(id string) (interface{}, *portspec.PortSpec)

FindListeningServicesForPU returns a service that is found and the associated portSpecifications that refer to this service.

Package servicecache imports 6 packages (graph) and is imported by 2 packages. Updated 2019-08-06. Refresh now. Tools for package owners.