A faas-flow statestore implementation that uses redis to store state
TODO:
kubectl apply -f resource/redis-k8s-standalone.ymlor you can install redis service by your self
- Set the
stack.ymlwith the necessary environments
redis_url: "redis.default.svc.cluster.local:6379"- Use the
RedisStateStoreas a DataStore onhandler.go
redisStateStore "github.com/chennqqi/faas-flow-redis-statestore"
func DefineStateStore() (faasflow.StateStore, error) {
ss, err := redisStateStore.GetConsulStateStore(os.Getenv("redis_url"), os.Getenv("redis_master"))
if err != nil {
return nil, err
}
return ss, nil
}