config

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EgressChanged = iota
	EgressUnchanged
)
View Source
const (
	ResourceChanged = iota
	ResourceUnchanged
)
View Source
const (
	NoEgress = NoResource
)
View Source
const (
	// NoResource signals that the broker hasn't been found.
	NoResource = -1
)

Variables

This section is empty.

Functions

func AddOrUpdateEgressConfig added in v0.20.0

func AddOrUpdateEgressConfig(ct *contract.Contract, resourceIndex int, egress *contract.Egress, egressIndex int) int

AddOrUpdateEgressConfig adds or updates the given egress to the given contract at the specified indexes.

func AddOrUpdateEgressConfigForResource added in v0.27.0

func AddOrUpdateEgressConfigForResource(resource *contract.Resource, egress *contract.Egress, egressIndex int) int

AddOrUpdateEgressConfigForResource adds or updates the given egress to the given contract at the specified indexes.

func AddOrUpdateResourceConfig added in v0.18.0

func AddOrUpdateResourceConfig(contract *contract.Contract, resource *contract.Resource, index int, logger *zap.Logger) int

AddOrUpdateResourceConfig adds or updates the given resourceConfig to the given resources at the specified index.

func BackoffPolicyFromString added in v0.19.0

func BackoffPolicyFromString(backoffPolicy *duck.BackoffPolicyType) contract.BackoffPolicy

BackoffPolicyFromString returns the BackoffPolicy from the given string.

Default value is contract.BackoffPolicy_Exponential.

func ContentModeFromString added in v0.18.0

func ContentModeFromString(mode string) contract.ContentMode

ContentModeFromString returns the ContentMode from the given string.

func DeleteResource added in v0.18.0

func DeleteResource(ct *contract.Contract, index int)

DeleteResource deletes the resource at the given index from Resources.

func DurationMillisFromISO8601String added in v0.24.0

func DurationMillisFromISO8601String(durationStr *string, defaultDurationMillis uint64) (uint64, error)

DurationMillisFromISO8601String returns the duration in milliseconds from the given string.

Default value is the specified defaultDelay.

func EgressConfigFromDelivery added in v0.21.0

func EgressConfigFromDelivery(
	ctx context.Context,
	resolver *resolver.URIResolver,
	parent metav1.Object,
	delivery *duck.DeliverySpec,
	defaultBackoffDelayMs uint64,
) (*contract.EgressConfig, error)

func FindEgress added in v0.18.0

func FindEgress(egresses []*contract.Egress, egress types.UID) int

FindEgress finds the egress with the given UID in the given egresses list.

func FindResource added in v0.18.0

func FindResource(contract *contract.Contract, resource types.UID) int

FindResource finds the resource with the given UID in the given resources list.

func IncrementContractGeneration added in v0.21.0

func IncrementContractGeneration(ct *contract.Contract)

Increment contract.Contract.Generation.

func KeyTypeFromString added in v0.27.0

func KeyTypeFromString(s string) contract.KeyType

KeyTypeFromString returns the contract.KeyType associated to a given string.

func MergeEgressConfig added in v0.25.0

func MergeEgressConfig(e0, e1 *contract.EgressConfig) *contract.EgressConfig

MergeEgressConfig merges the 2 given egress configs into one egress config prioritizing e0 values.

func SetDeadLetterSinkURIFromEgressConfig added in v0.27.0

func SetDeadLetterSinkURIFromEgressConfig(dStatus *eventingduck.DeliveryStatus, egressConfig *contract.EgressConfig)

SetDeadLetterSinkURIFromEgressConfig sets eventingduck.DeliveryStatus.DeadLetterSinkURI from a provided contract.EgressConfig.

func SetResourceEgressesFromContract added in v0.28.0

func SetResourceEgressesFromContract(contract *contract.Contract, resource *contract.Resource, index int)

Types

This section is empty.

Jump to

Keyboard shortcuts

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