go-micro: github.com/micro/go-micro/store/cloudflare Index | Files

package cloudflare

import "github.com/micro/go-micro/store/cloudflare"

Package cloudflare is a store implementation backed by cloudflare workers kv Note that the cloudflare workers KV API is eventually consistent.


Package Files

cloudflare.go options.go

func Account Uses

func Account(id string) store.Option

Account sets the cloudflare account id

func Namespace Uses

func Namespace(ns string) store.Option

Namespace sets the KV namespace

func NewStore Uses

func NewStore(opts ...store.Option) store.Store

New returns a cloudflare Store implementation. Account ID, Token and Namespace must either be passed as options or environment variables. If set as env vars we expect the following; CF_API_TOKEN to a cloudflare API token scoped to Workers KV. CF_ACCOUNT_ID to contain a string with your cloudflare account ID. KV_NAMESPACE_ID to contain the namespace UUID for your KV storage.

func Token Uses

func Token(t string) store.Option

Token sets the cloudflare api token

Package cloudflare imports 15 packages (graph) and is imported by 5 packages. Updated 2020-02-22. Refresh now. Tools for package owners.