intentsstore

package
v0.0.0-...-3bed8a6 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GroupIntentsBySource

func GroupIntentsBySource(intents []TimestampedIntent) []model.ServiceIntents

Types

type IntentsHolder

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

func NewIntentsHolder

func NewIntentsHolder() *IntentsHolder

func (*IntentsHolder) AddIntent

func (i *IntentsHolder) AddIntent(newTimestamp time.Time, intent model.Intent, sourcePorts []int64)

func (*IntentsHolder) GetIntents

func (i *IntentsHolder) GetIntents(
	namespaces []string,
	includeLabels []string,
	excludeServiceWithLabels []string,
	includeAllLabels bool,
	serverFilter *model.ServerFilter,
) ([]TimestampedIntent, error)

func (*IntentsHolder) GetNewIntentsSinceLastGet

func (i *IntentsHolder) GetNewIntentsSinceLastGet() []TimestampedIntent

func (*IntentsHolder) PeriodicIntentsUpload

func (i *IntentsHolder) PeriodicIntentsUpload(ctx context.Context, interval time.Duration)

func (*IntentsHolder) RegisterNotifyIntents

func (i *IntentsHolder) RegisterNotifyIntents(callback func(context.Context, []TimestampedIntent))

func (*IntentsHolder) Reset

func (i *IntentsHolder) Reset()

type IntentsStore

type IntentsStore map[IntentsStoreKey]TimestampedIntent

type IntentsStoreKey

type IntentsStoreKey struct {
	Source      types.NamespacedName
	Destination types.NamespacedName
	Type        model.IntentType
}

type TimestampedIntent

type TimestampedIntent struct {
	Timestamp        time.Time
	ConnectionsCount *cloudclient.ConnectionsCount
	Intent           model.Intent
}

Jump to

Keyboard shortcuts

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