client

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Getter

type Getter interface {
	Get(key string) ([]byte, error)
}

Getter 加载key的数据

type GetterFunc

type GetterFunc func(key string) ([]byte, error)

GetterFunc 通过函数实现Getter

func (GetterFunc) Get

func (f GetterFunc) Get(key string) ([]byte, error)

Get implements Getter interface function

type Group

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

func (*Group) Get

func (g *Group) Get(key string) (cachebackend.Valuer, error)

Get 通过key获取value

func (*Group) Set

func (g *Group) Set(key string, value cachebackend.Valuer, isLocalCache bool) (newValue cachebackend.Valuer, err error)

type Hit

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

func NewHit

func NewHit(config *hit.Config) *Hit

func NewHitFromPath

func NewHitFromPath(path string) *Hit

func (*Hit) GetGroup

func (h *Hit) GetGroup(name string) *Group

func (*Hit) NewGroup

func (h *Hit) NewGroup(name, nodeName string, mainCache *cache.SyncCache, getter Getter) *Group

func (*Hit) NewGroupDefault

func (h *Hit) NewGroupDefault(name, nodeName string, cacheBytes int64, getter Getter) *Group

NewGroup create a new instance of Loader

Directories

Path Synopsis
* Copyright 2020 Chen Quan * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
* Copyright 2020 Chen Quan * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.

Jump to

Keyboard shortcuts

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