Skip to content
Snippets Groups Projects
Commit b041945f authored by Yordan Kinkov's avatar Yordan Kinkov
Browse files

#2 merge request review comments

parent 377312bc
No related branches found
No related tags found
2 merge requests!3Create SET cache endpoint,!2Resolve "Create cache GET endpoint"
Pipeline #49732 passed with stage
in 20 seconds
This diff is collapsed.
......@@ -11,7 +11,7 @@ type Config struct {
type httpConfig struct {
Host string `envconfig:"HTTP_HOST"`
Port string `envconfig:"HTTP_PORT" default:"8083"`
Port string `envconfig:"HTTP_PORT" default:"8080"`
IdleTimeout time.Duration `envconfig:"HTTP_IDLE_TIMEOUT" default:"120s"`
ReadTimeout time.Duration `envconfig:"HTTP_READ_TIMEOUT" default:"10s"`
WriteTimeout time.Duration `envconfig:"HTTP_WRITE_TIMEOUT" default:"10s"`
......
......@@ -22,7 +22,7 @@ type Service struct {
func New(cache Cache, logger *zap.Logger) *Service {
return &Service{
cache: cache,
logger: logger.With(zap.String("service", "cache")),
logger: logger,
}
}
......@@ -47,6 +47,6 @@ func (s *Service) Get(ctx context.Context, req *cache.CacheGetRequest) ([]byte,
return data, nil
}
func makeCacheKey(key, namespace, scope string) string {
func makeCacheKey(namespace, scope, key string) string {
return fmt.Sprintf("%s,%s,%s", namespace, scope, key)
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment