resultcache

package
v2.34.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CacheCmd = &cobra.Command{
	Use:               "result-cache",
	Short:             "Result Cache related commands",
	Long:              `Use this command to interact with Aperture's Result 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 result cache entry",
	Long:  `Delete a result cache entry`,
	RunE: func(_ *cobra.Command, _ []string) error {
		client, err := controller.IntrospectionClient()
		if err != nil {
			return err
		}

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

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

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

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

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

		return utils.ParseResultCacheUpsert(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