cache

package
v0.0.0-...-66e36ac Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IpService

type IpService struct {
	// map[string]types.NamespacedName
	IpToService sync.Map
	// map[types.NamespacedName][]string
	ServiceToIps sync.Map
	config.Server
}

func NewIpService

func NewIpService(server config.Server) *IpService

func (*IpService) FetchDestinationSvc

func (i *IpService) FetchDestinationSvc(entry *data_accesslog.HTTPAccessLogEntry) (destSvc string, err error)

func (*IpService) FetchSourceIp

func (i *IpService) FetchSourceIp(entry *data_accesslog.HTTPAccessLogEntry) (sourceIp string, err error)

func (*IpService) FetchSourceSvc

func (i *IpService) FetchSourceSvc(sourceIp string) (*types.NamespacedName, error)

func (*IpService) Start

func (i *IpService) Start(ctx context.Context) error

type Namespace

type Namespace struct {
	// map[namespaceName]struct{}
	Disable sync.Map
	// map[namespaceName]struct{}
	Enabled sync.Map
	config.Server
}

func NewNamespace

func NewNamespace(server config.Server) *Namespace

func (*Namespace) Delete

func (ns *Namespace) Delete(name string)

func (*Namespace) IsDisable

func (ns *Namespace) IsDisable(name string) bool

func (*Namespace) IsEnabled

func (ns *Namespace) IsEnabled(name string) bool

func (*Namespace) SetDisable

func (ns *Namespace) SetDisable(name string)

func (*Namespace) SetEnabled

func (ns *Namespace) SetEnabled(name string)

func (*Namespace) Start

func (ns *Namespace) Start(ctx context.Context) error

type Service

type Service struct {
	// map[types.NamespacedName]struct{}
	Data sync.Map
	config.Server
}

func NewService

func NewService(server config.Server) *Service

func (*Service) Delete

func (sc *Service) Delete(nn types.NamespacedName)

func (*Service) ExistNcName

func (sc *Service) ExistNcName(nn types.NamespacedName) bool

func (*Service) Set

func (sc *Service) Set(nn types.NamespacedName)

func (*Service) Start

func (sc *Service) Start(ctx context.Context) error

Jump to

Keyboard shortcuts

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