Documentation
¶
Index ¶
- Constants
- Variables
- func CacheSmokeTest(t *testing.T, c CacheSystem)
- func IntOptional(i int) *int
- func RunTestCacheSystem(t *testing.T, c CacheSystem)
- type AWSEFSCache
- func (A *AWSEFSCache) Clear() error
- func (A *AWSEFSCache) Delete(path string) error
- func (A *AWSEFSCache) Deploy() error
- func (A *AWSEFSCache) Flush(fs corfs.FileSystem) error
- func (A *AWSEFSCache) FunctionInjector() CacheConfigIncector
- func (A *AWSEFSCache) Init() error
- func (A *AWSEFSCache) Join(elem ...string) string
- func (A *AWSEFSCache) ListFiles(path string) ([]corfs.FileInfo, error)
- func (A *AWSEFSCache) OpenReader(path string, startAt int64) (io.ReadCloser, error)
- func (A *AWSEFSCache) OpenWriter(path string) (io.WriteCloser, error)
- func (A *AWSEFSCache) Split(path string) []string
- func (A *AWSEFSCache) Stat(path string) (corfs.FileInfo, error)
- func (A *AWSEFSCache) Undeploy() error
- type AWSEFSCacheConfigInjector
- type CacheConfigIncector
- type CacheSystem
- type CacheSystemType
- type ClientConfig
- type DeploymentStrategy
- type DeploymentType
- type KubernetesRedisDeploymentStrategy
- type LocalCache
- func (l *LocalCache) Clear() error
- func (l *LocalCache) Delete(path string) error
- func (l *LocalCache) Deploy() error
- func (l *LocalCache) Flush(fs corfs.FileSystem) error
- func (l *LocalCache) FunctionInjector() CacheConfigIncector
- func (l *LocalCache) Init() error
- func (l *LocalCache) Join(elem ...string) string
- func (l *LocalCache) ListFiles(path string) ([]corfs.FileInfo, error)
- func (l *LocalCache) OpenReader(path string, startAt int64) (io.ReadCloser, error)
- func (l *LocalCache) OpenWriter(path string) (io.WriteCloser, error)
- func (l *LocalCache) Split(path string) []string
- func (l *LocalCache) Stat(path string) (corfs.FileInfo, error)
- func (l *LocalCache) Undeploy() error
- type LocalRedisDeploymentStrategy
- type RedisBackedCache
- func (r *RedisBackedCache) Clear() error
- func (r *RedisBackedCache) Delete(filePath string) error
- func (r *RedisBackedCache) Deploy() error
- func (r *RedisBackedCache) Flush(fs corfs.FileSystem) error
- func (r *RedisBackedCache) FunctionInjector() CacheConfigIncector
- func (r *RedisBackedCache) Init() error
- func (r *RedisBackedCache) Join(elem ...string) string
- func (r *RedisBackedCache) ListFiles(pathGlob string) ([]corfs.FileInfo, error)
- func (r *RedisBackedCache) OpenReader(filePath string, startAt int64) (io.ReadCloser, error)
- func (r *RedisBackedCache) OpenWriter(filePath string) (io.WriteCloser, error)
- func (r *RedisBackedCache) Split(path string) []string
- func (r *RedisBackedCache) Stat(filePath string) (corfs.FileInfo, error)
- func (r *RedisBackedCache) Undeploy() error
- type RedisCacheConfigInjector
- type WriteCloser
Constants ¶
View Source
const RedisKubernetesChart = "groundhog2k/redis"
View Source
const RedisKubernetesDeploymentName = "corral-redis"
Variables ¶
View Source
var RedisKubernetesChartRepo = repo.Entry{
Name: "groundhog2k",
URL: "https://groundhog2k.github.io/helm-charts/",
}
TODO:
Functions ¶
func CacheSmokeTest ¶
func CacheSmokeTest(t *testing.T, c CacheSystem)
func IntOptional ¶
func RunTestCacheSystem ¶
func RunTestCacheSystem(t *testing.T, c CacheSystem)
Types ¶
type AWSEFSCache ¶
type AWSEFSCache struct {
}
func (*AWSEFSCache) Clear ¶
func (A *AWSEFSCache) Clear() error
func (*AWSEFSCache) Delete ¶
func (A *AWSEFSCache) Delete(path string) error
func (*AWSEFSCache) Deploy ¶
func (A *AWSEFSCache) Deploy() error
func (*AWSEFSCache) Flush ¶
func (A *AWSEFSCache) Flush(fs corfs.FileSystem) error
func (*AWSEFSCache) FunctionInjector ¶
func (A *AWSEFSCache) FunctionInjector() CacheConfigIncector
func (*AWSEFSCache) Init ¶
func (A *AWSEFSCache) Init() error
func (*AWSEFSCache) Join ¶
func (A *AWSEFSCache) Join(elem ...string) string
func (*AWSEFSCache) ListFiles ¶
func (A *AWSEFSCache) ListFiles(path string) ([]corfs.FileInfo, error)
func (*AWSEFSCache) OpenReader ¶
func (A *AWSEFSCache) OpenReader(path string, startAt int64) (io.ReadCloser, error)
func (*AWSEFSCache) OpenWriter ¶
func (A *AWSEFSCache) OpenWriter(path string) (io.WriteCloser, error)
func (*AWSEFSCache) Split ¶
func (A *AWSEFSCache) Split(path string) []string
func (*AWSEFSCache) Undeploy ¶
func (A *AWSEFSCache) Undeploy() error
type AWSEFSCacheConfigInjector ¶
type AWSEFSCacheConfigInjector struct {
// contains filtered or unexported fields
}
func (*AWSEFSCacheConfigInjector) CacheSystem ¶
func (a *AWSEFSCacheConfigInjector) CacheSystem() CacheSystem
func (*AWSEFSCacheConfigInjector) ConfigureLambda ¶
func (a *AWSEFSCacheConfigInjector) ConfigureLambda(functionConfig *lambda.CreateFunctionInput) error
type CacheConfigIncector ¶
type CacheConfigIncector interface {
CacheSystem() CacheSystem
}
type CacheSystem ¶
type CacheSystem interface {
corfs.FileSystem
Deploy() error
Undeploy() error
Flush(system corfs.FileSystem) error
Clear() error
//FunctionInjector can be used by function deployment code to modify function deploymentes to use the underling cache system, warning needs to be implmented for each platfrom induvidually
FunctionInjector() CacheConfigIncector
}
CacheSystem represent a ephemeral file system used for intermidiate state between map/reduce phases
func NewCacheSystem ¶
func NewCacheSystem(fsType CacheSystemType) (CacheSystem, error)
NewCacheSystem intializes a CacheSystem of the given type
type CacheSystemType ¶
type CacheSystemType int
FileSystemType is an identifier for supported FileSystems
const ( NoCache CacheSystemType = iota Local Redis Olric EFS )
Identifiers for supported FileSystemTypes
func CacheSystemTypes ¶
func CacheSystemTypes(fs CacheSystem) CacheSystemType
CacheSystemTypes retunrs a type for a given CacheSystem or the NoCache type.
type ClientConfig ¶
type DeploymentStrategy ¶
type DeploymentStrategy interface {
Deploy() (*ClientConfig, error)
Undeploy() error
}
func NewDeploymentStrategy ¶
func NewDeploymentStrategy(deploymentType DeploymentType) (DeploymentStrategy, error)
type DeploymentType ¶
type DeploymentType int
const ( LocalDeployment DeploymentType = iota KubernetesDeployment AWS )
type KubernetesRedisDeploymentStrategy ¶
type KubernetesRedisDeploymentStrategy struct {
Namespace string
StorageClass string
NodePort *int
// contains filtered or unexported fields
}
func (*KubernetesRedisDeploymentStrategy) Deploy ¶
func (k *KubernetesRedisDeploymentStrategy) Deploy() (*ClientConfig, error)
func (*KubernetesRedisDeploymentStrategy) Undeploy ¶
func (k *KubernetesRedisDeploymentStrategy) Undeploy() error
type LocalCache ¶
type LocalCache struct {
// contains filtered or unexported fields
}
func NewLocalInMemoryProvider ¶
func NewLocalInMemoryProvider(maxSize uint64) *LocalCache
func (*LocalCache) Clear ¶
func (l *LocalCache) Clear() error
func (*LocalCache) Delete ¶
func (l *LocalCache) Delete(path string) error
func (*LocalCache) Deploy ¶
func (l *LocalCache) Deploy() error
func (*LocalCache) Flush ¶
func (l *LocalCache) Flush(fs corfs.FileSystem) error
func (*LocalCache) FunctionInjector ¶
func (l *LocalCache) FunctionInjector() CacheConfigIncector
func (*LocalCache) Init ¶
func (l *LocalCache) Init() error
func (*LocalCache) Join ¶
func (l *LocalCache) Join(elem ...string) string
func (*LocalCache) ListFiles ¶
func (l *LocalCache) ListFiles(path string) ([]corfs.FileInfo, error)
func (*LocalCache) OpenReader ¶
func (l *LocalCache) OpenReader(path string, startAt int64) (io.ReadCloser, error)
func (*LocalCache) OpenWriter ¶
func (l *LocalCache) OpenWriter(path string) (io.WriteCloser, error)
func (*LocalCache) Split ¶
func (l *LocalCache) Split(path string) []string
func (*LocalCache) Undeploy ¶
func (l *LocalCache) Undeploy() error
type LocalRedisDeploymentStrategy ¶
type LocalRedisDeploymentStrategy struct {
// contains filtered or unexported fields
}
func (*LocalRedisDeploymentStrategy) Deploy ¶
func (l *LocalRedisDeploymentStrategy) Deploy() (*ClientConfig, error)
func (*LocalRedisDeploymentStrategy) Undeploy ¶
func (l *LocalRedisDeploymentStrategy) Undeploy() error
type RedisBackedCache ¶
type RedisBackedCache struct {
DeploymentStragey DeploymentStrategy
Client redis.UniversalClient
Config *ClientConfig
}
func NewRedisBackedCache ¶
func NewRedisBackedCache(deploymentType DeploymentType) (*RedisBackedCache, error)
func (*RedisBackedCache) Clear ¶
func (r *RedisBackedCache) Clear() error
func (*RedisBackedCache) Delete ¶
func (r *RedisBackedCache) Delete(filePath string) error
func (*RedisBackedCache) Deploy ¶
func (r *RedisBackedCache) Deploy() error
func (*RedisBackedCache) Flush ¶
func (r *RedisBackedCache) Flush(fs corfs.FileSystem) error
func (*RedisBackedCache) FunctionInjector ¶
func (r *RedisBackedCache) FunctionInjector() CacheConfigIncector
func (*RedisBackedCache) Init ¶
func (r *RedisBackedCache) Init() error
func (*RedisBackedCache) Join ¶
func (r *RedisBackedCache) Join(elem ...string) string
func (*RedisBackedCache) ListFiles ¶
func (r *RedisBackedCache) ListFiles(pathGlob string) ([]corfs.FileInfo, error)
func (*RedisBackedCache) OpenReader ¶
func (r *RedisBackedCache) OpenReader(filePath string, startAt int64) (io.ReadCloser, error)
func (*RedisBackedCache) OpenWriter ¶
func (r *RedisBackedCache) OpenWriter(filePath string) (io.WriteCloser, error)
func (*RedisBackedCache) Split ¶
func (r *RedisBackedCache) Split(path string) []string
func (*RedisBackedCache) Stat ¶
func (r *RedisBackedCache) Stat(filePath string) (corfs.FileInfo, error)
func (*RedisBackedCache) Undeploy ¶
func (r *RedisBackedCache) Undeploy() error
type RedisCacheConfigInjector ¶
type RedisCacheConfigInjector struct {
// contains filtered or unexported fields
}
func (*RedisCacheConfigInjector) CacheSystem ¶
func (r *RedisCacheConfigInjector) CacheSystem() CacheSystem
func (*RedisCacheConfigInjector) ConfigureLambda ¶
func (r *RedisCacheConfigInjector) ConfigureLambda(function *lambda.CreateFunctionInput) error
func (*RedisCacheConfigInjector) ConfigureWhisk ¶
func (r *RedisCacheConfigInjector) ConfigureWhisk(action *whisk.Action) error
WE strongly assume astion.Paramters are injected at runtime...
type WriteCloser ¶
func (*WriteCloser) Close ¶
func (w *WriteCloser) Close() error
Click to show internal directories.
Click to hide internal directories.