mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-12 11:15:12 +00:00
17 lines
305 B
Go
Executable File
17 lines
305 B
Go
Executable File
package example
|
|
|
|
import (
|
|
"fmt"
|
|
"github.com/micro/services/clients/go/cache"
|
|
"os"
|
|
)
|
|
|
|
// Get an item from the cache by key
|
|
func GetAvalue() {
|
|
cacheService := cache.NewCacheService(os.Getenv("MICRO_API_TOKEN"))
|
|
rsp, err := cacheService.Get(&cache.GetRequest{
|
|
Key: "foo",
|
|
})
|
|
fmt.Println(rsp, err)
|
|
}
|