configfetcher

package
v3.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KongRawStateToKongState

func KongRawStateToKongState(rawstate *utils.KongRawState) *kongstate.KongState

KongRawStateToKongState converts a Deck kongRawState to a KIC KongState.

Types

type DefaultKongLastGoodConfigFetcher

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

func NewDefaultKongLastGoodConfigFetcher

func NewDefaultKongLastGoodConfigFetcher(fillIDs bool, workspace string) *DefaultKongLastGoodConfigFetcher

func (*DefaultKongLastGoodConfigFetcher) LastValidConfig

func (cf *DefaultKongLastGoodConfigFetcher) LastValidConfig() (*kongstate.KongState, bool)

func (*DefaultKongLastGoodConfigFetcher) StoreLastValidConfig

func (cf *DefaultKongLastGoodConfigFetcher) StoreLastValidConfig(s *kongstate.KongState)

func (*DefaultKongLastGoodConfigFetcher) TryFetchingValidConfigFromGateways

func (cf *DefaultKongLastGoodConfigFetcher) TryFetchingValidConfigFromGateways(
	ctx context.Context,
	logger logr.Logger,
	gatewayClients []*adminapi.Client,
) error

type LastValidConfigFetcher

type LastValidConfigFetcher interface {
	// TryFetchingValidConfigFromGateways tries to fetch a valid configuration from all gateways and persists it if found.
	TryFetchingValidConfigFromGateways(ctx context.Context, logger logr.Logger, gatewayClients []*adminapi.Client) error

	// LastValidConfig returns the last valid config and true if there's one available. Otherwise, second return value is false.
	LastValidConfig() (*kongstate.KongState, bool)

	// StoreLastValidConfig stores a given configuration as the last valid config. Should be used when the configuration was successfully accepted by a gateway.
	StoreLastValidConfig(s *kongstate.KongState)
}

Jump to

Keyboard shortcuts

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