cache_strategy

package
v0.14.6 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "strategy-cache"

Variables

This section is empty.

Functions

func Check added in v0.9.0

func Check(v *Config, workers map[eosc.RequireId]eosc.IWorker) error

func Create added in v0.9.0

func Create(id, name string, v *Config, workers map[eosc.RequireId]eosc.IWorker) (eosc.IWorker, error)

func DoStrategy added in v0.9.0

func DoStrategy(ctx eocontext.EoContext, next eocontext.IChain, cache resources.ICache) error

func Register

func Register(register eosc.IExtenderDriverRegister)

Register 注册http路由驱动工厂

Types

type ActuatorSet

type ActuatorSet interface {
	Strategy(ctx eocontext.EoContext, next eocontext.IChain, cache resources.ICache) error
	Set(string, *CacheValidTimeHandler)
	Del(id string)
}

type CacheCompleteHandler added in v0.9.0

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

func NewCacheGetCompleteHandler

func NewCacheGetCompleteHandler(orgHandler eocontext.CompleteHandler, validTime int, uri string, cache resources.ICache) *CacheCompleteHandler

func (*CacheCompleteHandler) Complete added in v0.9.0

func (c *CacheCompleteHandler) Complete(ctx eocontext.EoContext) error

type CacheValidTime

type CacheValidTime struct {
	drivers.WorkerBase
	// contains filtered or unexported fields
}

func (*CacheValidTime) CheckSkill

func (l *CacheValidTime) CheckSkill(skill string) bool

func (*CacheValidTime) Destroy

func (l *CacheValidTime) Destroy() error

func (*CacheValidTime) Reset

func (l *CacheValidTime) Reset(v interface{}, workers map[eosc.RequireId]eosc.IWorker) error

func (*CacheValidTime) Start

func (l *CacheValidTime) Start() error

func (*CacheValidTime) Stop

func (l *CacheValidTime) Stop() error

type CacheValidTimeHandler

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

func NewCacheValidTimeHandler

func NewCacheValidTimeHandler(conf *Config) (*CacheValidTimeHandler, error)

type Config

type Config struct {
	Name        string                `json:"name" skip:"skip"`
	Description string                `json:"description" skip:"skip"`
	Stop        bool                  `json:"stop" label:"禁用"`
	Priority    int                   `json:"priority" label:"优先级" description:"1-999"`
	Filters     strategy.FilterConfig `json:"filters" label:"过滤规则"`
	ValidTime   int                   `json:"valid_time" label:"有效期" description:"有效期"`
}

type Controller

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

func NewController

func NewController() *Controller

func (*Controller) AllWorkers

func (c *Controller) AllWorkers() []string

func (*Controller) Check

func (c *Controller) Check(cfg interface{}) (profession, name, driver, desc string, err error)

func (*Controller) ConfigType

func (c *Controller) ConfigType() reflect.Type

func (*Controller) Del

func (c *Controller) Del(id string)

func (*Controller) Get

func (c *Controller) Get() interface{}

func (*Controller) Mode

func (c *Controller) Mode() eosc.SettingMode

func (*Controller) Set

func (c *Controller) Set(conf interface{}) (err error)

func (*Controller) Store

func (c *Controller) Store(id string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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