cache

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Impl

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

Impl is the implementation of Iter8Cache

func (*Impl) DeploymentToExperiment

func (c *Impl) DeploymentToExperiment(targetName, targetNamespace string) (string, string, bool)

DeploymentToExperiment returns the experiment key given name and namespace of target deployment

func (*Impl) MarkTargetDeploymentFound

func (c *Impl) MarkTargetDeploymentFound(targetName, targetNamespace string) bool

func (*Impl) MarkTargetDeploymentMissing

func (c *Impl) MarkTargetDeploymentMissing(targetName, targetNamespace string) bool

func (*Impl) MarkTargetServiceFound

func (c *Impl) MarkTargetServiceFound(targetName, targetNamespace string) bool

func (*Impl) MarkTargetServiceMissing

func (c *Impl) MarkTargetServiceMissing(targetName, targetNamespace string) bool

func (*Impl) RegisterExperiment

func (c *Impl) RegisterExperiment(ctx context.Context, instance *iter8v1alpha1.Experiment) (context.Context, error)

RegisterExperiment creates new abstracts into the cache and snapshot the abstract into context

func (*Impl) RemoveExperiment

func (c *Impl) RemoveExperiment(instance *iter8v1alpha1.Experiment)

RemoveExperiment removes the experiment abstract from the cache

func (*Impl) ServiceToExperiment

func (c *Impl) ServiceToExperiment(targetName, targetNamespace string) (string, string, bool)

ServiceToExperiment returns the experiment key given name and namespace of target service

type Interface

type Interface interface {
	// Given name and namespace of the target deployment, return the experiment key
	DeploymentToExperiment(name, namespace string) (experiment, experimentNamespace string, exist bool)
	// Given name and namespace of the target service, return the experiment key
	ServiceToExperiment(name, namespace string) (experiment, experimentNamespace string, exist bool)
	RegisterExperiment(context context.Context, instance *iter8v1alpha1.Experiment) (context.Context, error)
	RemoveExperiment(instance *iter8v1alpha1.Experiment)

	MarkTargetDeploymentFound(name, namespace string) bool
	MarkTargetServiceFound(name, namespace string) bool

	MarkTargetDeploymentMissing(name, namespace string) bool
	MarkTargetServiceMissing(name, namespace string) bool
}

Interface defines the interface for iter8cache

func New

func New(logger logr.Logger) Interface

New returns a new iter8cache implementation

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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