cache

package
Version: v3.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheType

type CacheType string
const (
	// Only config maps are currently supported for caching
	ConfigMapCache CacheType = "ConfigMapCache"
)

type Entry

type Entry struct {
	NodeID            string        `json:"nodeID"`
	Outputs           *wfv1.Outputs `json:"outputs"`
	CreationTimestamp metav1.Time   `json:"creationTimestamp"`
}

func (*Entry) GetOutputs

func (e *Entry) GetOutputs() *wfv1.Outputs

func (*Entry) GetOutputsWithMaxAge

func (e *Entry) GetOutputsWithMaxAge(maxAge time.Duration) (*wfv1.Outputs, bool)

func (*Entry) Hit

func (e *Entry) Hit() bool

type Factory

type Factory interface {
	GetCache(ct CacheType, name string) MemoizationCache
}

func NewCacheFactory

func NewCacheFactory(ki kubernetes.Interface, ns string) Factory

type MemoizationCache

type MemoizationCache interface {
	Load(ctx context.Context, key string) (*Entry, error)
	Save(ctx context.Context, key string, nodeId string, value *wfv1.Outputs) error
}

func NewConfigMapCache

func NewConfigMapCache(ns string, ki kubernetes.Interface, n string) MemoizationCache

Jump to

Keyboard shortcuts

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