globalcache

package
v2.29.3 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CacheCmd = &cobra.Command{
	Use:               "global-cache",
	Short:             "Global Cache related commands",
	Long:              `Use this command to interact with Aperture's Global Cache.`,
	SilenceErrors:     true,
	PersistentPreRunE: controller.PreRunE,
	PersistentPostRun: controller.PostRun,
}

CacheCmd is the command to observe Flow Control control points.

View Source
var DeleteCommand = &cobra.Command{
	Use:   "delete",
	Short: "Delete a global cache entry",
	Long:  `Delete a global cache entry`,
	RunE: func(_ *cobra.Command, _ []string) error {
		client, err := controller.IntrospectionClient()
		if err != nil {
			return err
		}

		input := utils.CacheDeleteInput{
			AgentGroup: agentGroup,
			Key:        key,
		}

		return utils.ParseGlobalCacheDelete(client, input)
	},
}
View Source
var GetCommand = &cobra.Command{
	Use:   "get",
	Short: "Get a global cache entry",
	Long:  `Get a global cache entry`,
	RunE: func(_ *cobra.Command, _ []string) error {
		client, err := controller.IntrospectionClient()
		if err != nil {
			return err
		}

		input := utils.CacheLookupInput{
			AgentGroup: agentGroup,
			Key:        key,
		}

		return utils.ParseGlobalCacheLookup(client, input)
	},
}
View Source
var SetCommand = &cobra.Command{
	Use:   "set",
	Short: "Set a global cache entry",
	Long:  `Set a global cache entry`,
	RunE: func(_ *cobra.Command, _ []string) error {
		client, err := controller.IntrospectionClient()
		if err != nil {
			return err
		}

		input := utils.CacheUpsertInput{
			AgentGroup: agentGroup,
			Key:        key,
			Value:      value,
			TTL:        time.Duration(ttl) * time.Second,
		}

		return utils.ParseGlobalCacheUpsert(client, input)
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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