Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PerformUpdate ¶
func PerformUpdate(ctx context.Context, log logrus.FieldLogger, kongConfig *Kong, inMemory bool, reverseSync bool, targetContent *file.Content, selectorTags []string, customEntities []byte, oldSHA []byte, skipUpdateCR bool, promMetrics *metrics.CtrlFuncMetrics) ([]byte, error)
PerformUpdate writes `targetContent` and `customEntities` to Kong Admin API specified by `kongConfig`.
func UpdateKongAdminSimple ¶
func UpdateKongAdminSimple(ctx context.Context, lastConfigSHA []byte, cache *store.CacheStores, ingressClassName string, deprecatedLogger logrus.FieldLogger, kongConfig Kong, enableReverseSync bool, diagnostic util.ConfigDumpDiagnostic, proxyRequestTimeout time.Duration, promMetrics *metrics.CtrlFuncMetrics, ) ([]byte, error)
UpdateKongAdminSimple is a helper function for the most common usage of PerformUpdate() with only minimal upfront configuration required. This function is specialized and highly opinionated.
If you're implementation needs to expand on the configuration and usage of the following inner components:
- store.Storer
- kongstate.Kong
- deckgen.ToDeckContent()
- sendconfig.PerformUpdate()
Or any other encapsulated components this function makes all of that opaque to the caller. Treat this function as a very specific "workflow" to update the Kong Admin API, and use it as a reference to implement the workflow you need.
Types ¶
type Kong ¶
type Kong struct { URL string FilterTags []string // Headers are injected into every request to Kong's Admin API // to help with authorization/authentication. Client *kong.Client PluginSchemaStore *util.PluginSchemaStore InMemory bool // DeprecatedHasTagSupport is not used in KIC 2.x. // If the gateway instance does not support tags, pass an empty FilterTags slice instead. DeprecatedHasTagSupport bool Enterprise bool Version semver.Version Concurrency int // configuration update ConfigDone chan file.Content }
Kong Represents a Kong client and connection information