workload

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AddressType       = "type.googleapis.com/istio.workload.Address"
	AuthorizationType = "type.googleapis.com/istio.security.Authorization"
)
View Source
const (
	LbPolicyRandom    = 0
	KmeshWaypointPort = 15019 // use this fixed port instead of the HboneMtlsPort in kmesh
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	Stream           discoveryv3.AggregatedDiscoveryService_DeltaAggregatedResourcesClient
	Processor        *Processor
	Rbac             *auth.Rbac
	MetricController *telemetry.MetricController
	// contains filtered or unexported fields
}

func NewController

func NewController(bpfWorkload *bpfwl.BpfWorkload, enableAccesslog bool) *Controller

func (*Controller) GetAccesslogTrigger

func (c *Controller) GetAccesslogTrigger() bool

func (*Controller) HandleWorkloadStream

func (c *Controller) HandleWorkloadStream() error

func (*Controller) Run

func (c *Controller) Run(ctx context.Context)

func (*Controller) SetAccesslogTrigger

func (c *Controller) SetAccesslogTrigger(info bool)

func (*Controller) WorkloadStreamCreateAndSend

func (c *Controller) WorkloadStreamCreateAndSend(client discoveryv3.AggregatedDiscoveryServiceClient, ctx context.Context) error

type HashName

type HashName struct {
	// contains filtered or unexported fields
}

HashName converts a string to a uint32 integer as the key of bpf map

func NewHashName

func NewHashName() *HashName

func (*HashName) Delete

func (h *HashName) Delete(str string)

func (*HashName) Hash

func (h *HashName) Hash(str string) uint32

func (*HashName) NumToStr

func (h *HashName) NumToStr(num uint32) string

func (*HashName) Reset

func (h *HashName) Reset()

Should only be used by test

type Processor

type Processor struct {
	WorkloadCache cache.WorkloadCache
	ServiceCache  cache.ServiceCache
	// contains filtered or unexported fields
}

func NewProcessor

func NewProcessor(workloadMap bpf2go.KmeshCgroupSockWorkloadMaps) *Processor

func (*Processor) GetBpfCache

func (p *Processor) GetBpfCache() *bpf.Cache

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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