cacheme

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

nolint

Index

Constants

View Source
const (
	Hit   = "HIT"
	Miss  = "MISS"
	Fetch = "FETCH"
)

Variables

View Source
var FooCacheStore = &fooCache{tag: "Foo"}
View Source
var FooListCacheStore = &fooListCache{tag: "FooList"}
View Source
var FooListPCacheStore = &fooListPCache{tag: "FooListP"}
View Source
var FooMapCacheStore = &fooMapCache{tag: "FooMap"}
View Source
var FooMapSCacheStore = &fooMapSCache{tag: "FooMapS"}
View Source
var FooPCacheStore = &fooPCache{tag: "FooP"}
View Source
var SimpleCacheStore = &simpleCache{tag: "Simple"}
View Source
var SimpleFlightCacheStore = &simpleFlightCache{tag: "SimpleFlight"}

Functions

This section is empty.

Types

type Client

type Client struct {
	SimpleCacheStore *simpleCache

	FooMapCacheStore *fooMapCache

	FooCacheStore *fooCache

	FooPCacheStore *fooPCache

	FooListCacheStore *fooListCache

	FooListPCacheStore *fooListPCache

	FooMapSCacheStore *fooMapSCache

	SimpleFlightCacheStore *simpleFlightCache
	// contains filtered or unexported fields
}

func New

func New(redis cacheme.RedisClient) *Client

func NewCluster

func NewCluster(redis cacheme.RedisClient) *Client

func (*Client) NewPipeline

func (c *Client) NewPipeline() *cacheme.CachePipeline

func (*Client) Redis

func (c *Client) Redis() cacheme.RedisClient

func (*Client) SetLogger added in v0.1.1

func (c *Client) SetLogger(l cacheme.Logger)

type FooListPPromise

type FooListPPromise struct {
	// contains filtered or unexported fields
}

func (*FooListPPromise) Result

func (p *FooListPPromise) Result() ([]*model.Foo, error)

func (*FooListPPromise) WaitExecute

func (p *FooListPPromise) WaitExecute(cp *cacheme.CachePipeline, key string, ID string)

type FooListPromise

type FooListPromise struct {
	// contains filtered or unexported fields
}

func (*FooListPromise) Result

func (p *FooListPromise) Result() ([]model.Foo, error)

func (*FooListPromise) WaitExecute

func (p *FooListPromise) WaitExecute(cp *cacheme.CachePipeline, key string, ID string)

type FooMapPromise

type FooMapPromise struct {
	// contains filtered or unexported fields
}

func (*FooMapPromise) Result

func (p *FooMapPromise) Result() (map[string]string, error)

func (*FooMapPromise) WaitExecute

func (p *FooMapPromise) WaitExecute(cp *cacheme.CachePipeline, key string, ID string)

type FooMapSPromise added in v0.1.1

type FooMapSPromise struct {
	// contains filtered or unexported fields
}

func (*FooMapSPromise) Result added in v0.1.1

func (p *FooMapSPromise) Result() (map[model.Foo]model.Bar, error)

func (*FooMapSPromise) WaitExecute added in v0.1.1

func (p *FooMapSPromise) WaitExecute(cp *cacheme.CachePipeline, key string, ID string)

type FooPPromise

type FooPPromise struct {
	// contains filtered or unexported fields
}

func (*FooPPromise) Result

func (p *FooPPromise) Result() (*model.Foo, error)

func (*FooPPromise) WaitExecute

func (p *FooPPromise) WaitExecute(cp *cacheme.CachePipeline, key string, ID string)

type FooPromise

type FooPromise struct {
	// contains filtered or unexported fields
}

func (*FooPromise) Result

func (p *FooPromise) Result() (model.Foo, error)

func (*FooPromise) WaitExecute

func (p *FooPromise) WaitExecute(cp *cacheme.CachePipeline, key string, ID string)

type SimpleFlightPromise added in v0.1.1

type SimpleFlightPromise struct {
	// contains filtered or unexported fields
}

func (*SimpleFlightPromise) Result added in v0.1.1

func (p *SimpleFlightPromise) Result() (string, error)

func (*SimpleFlightPromise) WaitExecute added in v0.1.1

func (p *SimpleFlightPromise) WaitExecute(cp *cacheme.CachePipeline, key string, ID string)

type SimplePromise

type SimplePromise struct {
	// contains filtered or unexported fields
}

func (*SimplePromise) Result

func (p *SimplePromise) Result() (string, error)

func (*SimplePromise) WaitExecute

func (p *SimplePromise) WaitExecute(cp *cacheme.CachePipeline, key string, ID string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL