redis

package
v0.0.0-...-55524bd Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheType

type CacheType = rediscache.CacheType

CacheType exports

const (
	CacheRaw CacheType = iota + 1
	CacheRawDoc
	CacheRawList

	CachePoly
	CachePolyDoc
	CachePolyList

	CacheNS     // namespace
	CacheNSList // namespace list

	CacheService
	CacheServiceList

	CacheGateRawStat
	CacheGatePolyStat

	CacheGateIPBlack
	CacheGateIPWhite

	CacheSchema
	CacheSchemaList
)

cache types, NEVER CHANGE THE ORDER

type Client

type Client struct {
	*rediscache.Client
	// contains filtered or unexported fields
}

Client represend the redis client

func NewRedisClient

func NewRedisClient(client *redis.ClusterClient) *Client

NewRedisClient create a redis client

func (*Client) GetAPIStat

func (c *Client) GetAPIStat(apiPath string, raw bool) (int64, error)

GetAPIStat GetAPIStat

func (*Client) IncAPIStat

func (c *Client) IncAPIStat(apiPath string, raw bool) (int64, error)

IncAPIStat IncAPIStat

func (*Client) QueryNamespace

func (c *Client) QueryNamespace(fullPath string) (*models.APINamespace, error)

QueryNamespace query namespace cache by fullPath

func (*Client) QueryNamespaceList

func (c *Client) QueryNamespaceList(fullPath string) (*models.APINamespaceList, error)

QueryNamespaceList query namespace list cache by fullPath

func (*Client) QueryPoly

func (c *Client) QueryPoly(fullPath string) (*models.PolyAPIScript, error)

QueryPoly query poly api cache by fullPath

func (*Client) QueryPolyDoc

func (c *Client) QueryPolyDoc(fullPath string) (*models.PolyAPIDoc, error)

QueryPolyDoc query poly api doc cache by fullPath

func (*Client) QueryPolyList

func (c *Client) QueryPolyList(fullPath string) (*models.PolyAPIList, error)

QueryPolyList query poly api list cache by fullPath

func (*Client) QueryRaw

func (c *Client) QueryRaw(fullPath string) (*models.RawAPICore, error)

QueryRaw query cache of raw api by fullPath

func (*Client) QueryRawDoc

func (c *Client) QueryRawDoc(fullPath string) (*models.RawAPIDoc, error)

QueryRawDoc query cache of raw api doc by fullPath

func (*Client) QueryRawList

func (c *Client) QueryRawList(fullPath string) (*models.RawAPIList, error)

QueryRawList query cache of raw api list by fullPath

func (*Client) QuerySchema

func (c *Client) QuerySchema(fullPath string) (*models.APISchemaFull, error)

QuerySchema query schema cache by fullPath

func (*Client) QuerySchemaList

func (c *Client) QuerySchemaList(fullPath string) (*models.APISchemaList, error)

QuerySchemaList query schema list cache by fullPath

func (*Client) QueryService

func (c *Client) QueryService(fullPath string) (*models.APIService, error)

QueryService query service cache by fullPath

func (*Client) QueryServiceList

func (c *Client) QueryServiceList(fullPath string) (*models.APIServiceList, error)

QueryServiceList query service list cache by fullPath

func (*Client) SetAPIStatKeyDuration

func (c *Client) SetAPIStatKeyDuration(dur time.Duration) error

SetAPIStatKeyDuration SetAPIStatKeyDuration

Jump to

Keyboard shortcuts

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